| 1 | // Copyright (C) 2006 Erik Dahlberg |
| 2 | // |
| 3 | // This file is part of LSystem3d. |
| 4 | // |
| 5 | // LSystem3D is free software; you can redistribute it and/or |
| 6 | // modify it under the terms of the GNU General Public License |
| 7 | // as published by the Free Software Foundation; either version 2 |
| 8 | // of the License, or (at your option) any later version. |
| 9 | // |
| 10 | // LSystem3D is distributed in the hope that it will be useful, |
| 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | // GNU General Public License for more details. |
| 14 | // |
| 15 | // You should have received a copy of the GNU General Public License |
| 16 | // along with LSystem3D; if not, write to the Free Software |
| 17 | // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | #ifndef LSYSTEMPARAMETERS_H |
| 23 | #define LSYSTEMPARAMETERS_H |
| 24 | |
| 25 | #include <string> |
| 26 | |
| 27 | #include "lindenmayersystem.h" |
| 28 | #include "xmlstructure.h" |
| 29 | |
| 30 | using namespace std; |
| 31 | |
| 32 | |
| 33 | |
| 34 | /** |
| 35 | * Save and load a L-system specification |
| 36 | */ |
| 37 | class LSystemParameters : protected XMLStructure |
| 38 | { |
| 39 | public: |
| 40 | /** |
| 41 | * Constructor |
| 42 | */ |
| 43 | LSystemParameters(); |
| 44 | |
| 45 | /** |
| 46 | * Destructor |
| 47 | */ |
| 48 | ~LSystemParameters(); |
| 49 | |
| 50 | /** |
| 51 | * Load parameters from xml file |
| 52 | * @param lsystem put parameters into this L-system |
| 53 | * @param path path to xml file |
| 54 | */ |
| 55 | void load(LindenmayerSystem *lsystem, string path); |
| 56 | |
| 57 | /** |
| 58 | * Save parameters to xml file |
| 59 | * @param lsystem get parameters from this L-system |
| 60 | * @param path path to xml file |
| 61 | */ |
| 62 | void save(LindenmayerSystem *lsystem, string path); |
| 63 | }; |
| 64 | |
| 65 | |
| 66 | |
| 67 | #endif |