ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbstractXMLWriter.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file AbstractXMLWriter.h
1 // Copyright FreeHEP, 2005.
2 #ifndef ABSTRACTXMLWRITER_H
3 #define ABSTRACTXMLWRITER_H 1
4 
5 #include "cheprep/config.h"
6 
7 #include <string>
8 
12 namespace cheprep {
13 
15 
16  public:
17  AbstractXMLWriter(std::string aDefaultNameSpace) : defaultNameSpace(aDefaultNameSpace) {
18  }
19  virtual ~AbstractXMLWriter() {
20  }
21 
22  virtual void openTag(std::string ns, std::string name) = 0;
23  virtual void printTag(std::string ns, std::string name) = 0;
24  virtual void setAttribute(std::string ns, std::string name, std::string value) = 0;
25  virtual void setAttribute(std::string ns, std::string name, double value) = 0;
26 
27  virtual void close() = 0;
28  virtual void openDoc(std::string version = "1.0", std::string encoding = "", bool standalone = false) = 0;
29  virtual void closeDoc(bool force = false) = 0;
30  virtual void openTag(std::string name) = 0;
31  virtual void closeTag() = 0;
32  virtual void printTag(std::string name) = 0;
33  virtual void setAttribute(std::string name, char* value) = 0;
34  virtual void setAttribute(std::string name, std::string value) = 0;
35  virtual void setAttribute(std::string name, std::vector<double> value) = 0;
36  virtual void setAttribute(std::string name, int64 value) = 0;
37  virtual void setAttribute(std::string name, int value) = 0;
38  virtual void setAttribute(std::string name, bool value) = 0;
39  virtual void setAttribute(std::string name, double value) = 0;
40 
41  protected:
42  std::string defaultNameSpace;
43  };
44 
45 } // cheprep
46 
47 #endif // ABSTRACTXMLWRITER_H