FileWriterBodies.h
1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef FILEWRITERBODIES_H
#define FILEWRITERBODIES_H
//#define TREPS_VOTABLE_XSD "votable-V1.2.xsd"
//#include "FileWriterAbstract.h"
//#include <stdio.h>
//#include <stdlib.h>
#include "../XMLManager/XMLManager.h"
#include "../../CDPP3DViewSOAPClient/cdpp3dviewcdppBinderProxy.h"
using namespace TREPS::XMLManager;
namespace TREPS
{
namespace File
{
//declare stype as in Bodies/BodiesCDPP3DView.h
typedef vector<ns4__Body*> t_Bodies;
class FileWriterBodiesClass
{
public :
FileWriterBodiesClass(void);
~FileWriterBodiesClass(void);
//create XML file and add general attributes
bool init(const char *file_path, const map<string,string> *attributes);
//write bodies in xml file
bool writeData(const t_Bodies *bodies);
//save the XML file
bool save(void);
//close the xml file
bool close(void);
//test if a file is opened
bool isOpened(void);
protected :
ApplicationClass *app;
private :
//path to the initialized file
string filePath;
//pointer to the xml writer
XMLManagerClass *writer;
};
}
}
#endif