ResultWriter.h
1.48 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
58
59
60
61
#ifndef RESULTWRITER_H
#define RESULTWRITER_H
#include "../Common/TREPSTypes.h"
#include "../XMLManager/XMLManager.h"
#include "../DataRecord/DataRecordList.h"
using namespace TREPS::Common;
using namespace TREPS::XMLManager;
using namespace TREPS::DataRecord;
namespace TREPS
{
namespace RequestManager
{
class ResultWriterClass : public XMLManagerClass
{
public :
ResultWriterClass(void);
//create the root node
bool init(void);
//set error
void setError(const char *msg);
//set success
void setSuccess(void);
//add a string argument
Node * addStrArg(const char *tag_name, const char *value);
//add an integer argument
Node * addIntArg(const char *tag_name, int value);
//add a file info argument
Node * addFileInfoArg(const char *tag_name, t_FileInfo info);
//add a data record list argument
Node * addDataRecordListArg(const char *tag_name, DataRecordListClass *data);
//add a transformation info argument
Node * addTransformationInfoArg(const char *tag_name, t_TransformationInfo info);
private :
//pointer to result node
Node * getResultNode(void);
//create an argument node
Node * createArgNode(const char *tag_name);
//add a vector node
Node * addVectorsNode(Node *parent, t_VectorList *vectors);
//add an attribute node
Node *addAttributesNode(Node *parent, map<string,string> *attributes);
};
}
}
#endif