1 /***************************************************************************
2  *  Copyright 2014, 2015 Marcelo Y. Matuda                                 *
3  *                                                                         *
4  *  This program is free software: you can redistribute it and/or modify   *
5  *  it under the terms of the GNU General Public License as published by   *
6  *  the Free Software Foundation, either version 3 of the License, or      *
7  *  (at your option) any later version.                                    *
8  *                                                                         *
9  *  This program is distributed in the hope that it will be useful,        *
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
12  *  GNU General Public License for more details.                           *
13  *                                                                         *
14  *  You should have received a copy of the GNU General Public License      *
15  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
16  ***************************************************************************/
17 
18 #ifndef TRM_CONTROL_MODEL_XML_CONFIG_FILE_WRITER_H_
19 #define TRM_CONTROL_MODEL_XML_CONFIG_FILE_WRITER_H_
20 
21 #include <string>
22 
23 
24 
25 namespace GS {
26 
27 class StreamXMLWriter;
28 
29 namespace TRMControlModel {
30 
31 class Model;
32 
33 /*******************************************************************************
34  *
35  */
36 class XMLConfigFileWriter {
37 public:
38 	XMLConfigFileWriter(const Model& model, const std::string& filePath);
39 	~XMLConfigFileWriter();
40 
41 	void saveModel();
42 private:
43 	XMLConfigFileWriter(const XMLConfigFileWriter&) = delete;
44 	XMLConfigFileWriter& operator=(const XMLConfigFileWriter&) = delete;
45 
46 	void writeElements(StreamXMLWriter& xml);
47 
48 	const Model& model_;
49 	std::string filePath_;
50 };
51 
52 } /* namespace TRMControlModel */
53 } /* namespace GS */
54 
55 #endif /* TRM_CONTROL_MODEL_XML_CONFIG_FILE_WRITER_H_ */
56