2 #ifndef CHEPREP_BHEPREPWRITER_H
3 #define CHEPREP_BHEPREPWRITER_H
35 void setAttribute(std::string name, std::vector<double> value);
60 static const unsigned char UTF8 = 0x6a;
64 static const unsigned char END = 0x01;
65 static const unsigned char ENTITY = 0x02;
66 static const unsigned char STR_I = 0x03;
67 static const unsigned char LITERAL = 0x04;
69 static const unsigned char CONTENT = 0x40;
70 static const unsigned char EXT_I_0 = 0x40;
71 static const unsigned char EXT_I_1 = 0x41;
72 static const unsigned char EXT_I_2 = 0x42;
73 static const unsigned char PI = 0x43;
77 static const unsigned char EXT_T_0 = 0x80;
78 static const unsigned char EXT_T_1 = 0x81;
79 static const unsigned char EXT_T_2 = 0x82;
80 static const unsigned char STR_T = 0x83;
83 static const unsigned char EXT_0 = 0xC0;
84 static const unsigned char EXT_1 = 0xC1;
85 static const unsigned char EXT_2 = 0xC2;
86 static const unsigned char OPAQUE = 0xC3;
94 static std::map<std::string, unsigned char>
tags;
96 static std::map<std::string, unsigned char>
values;
118 void writeTag(std::string name,
bool content =
false);
131 #endif // CHEPREP_BHEPREPWRITER_H
static const unsigned char EXT_T_0
void openTag(std::string ns, std::string name)
void closeDoc(bool force=false)
static const unsigned char EXT_T_1
void writeMultiByteInt(unsigned int ui)
std::map< std::string, int > intAttributes
std::map< std::string, int64 > longAttributes
std::map< std::string, double > doubleAttributes
static const unsigned char STR_D
static const unsigned char STR_I
void setAttribute(std::string ns, std::string name, double value)
static const unsigned char SWITCH_PAGE
static const unsigned char LITERAL_AC
void openDoc(std::string version="BinaryHepRep/1.0", std::string encoding="UTF-8", bool standalone=false)
static const unsigned char PI
const XML_Char const XML_Char int standalone
void setAttribute(std::string name, char *value)
void writeTag(std::string name, bool content=false)
static const unsigned char CONTENT
static const unsigned char OPAQUE
const XML_Char int const XML_Char * value
static const unsigned char EXT_I_1
void printTag(std::string name)
static const unsigned char EXT_1
static const unsigned char EXT_I_0
static const unsigned char EXT_T_2
static const unsigned char UNKNOWN_PID
static const unsigned char LITERAL_C
BHepRepWriter(std::ostream &os)
static const unsigned char EXT_2
std::map< std::string, std::vector< double > > colorAttributes
static std::map< std::string, unsigned char > values
std::map< std::string, bool > booleanAttributes
static const unsigned char STR_T
static const unsigned char WBXML_VERSION
static const unsigned char EXT_0
void writeString(std::string s)
static const unsigned char EXT_I_2
void writeByte(unsigned char b)
static const unsigned char LITERAL_A
static const unsigned char LITERAL
std::string defaultNameSpace
static std::map< std::string, unsigned char > tags
void printTag(std::string ns, std::string name)
static std::map< std::string, unsigned char > attributes
static const unsigned char UTF8
void setAttribute(std::string ns, std::string name, std::string value)
static const unsigned char END
std::vector< double > points
std::map< std::string, std::string > stringAttributes
void writeStringDefine(std::string s)
void writeReal(double ui)
std::map< std::string, unsigned int > stringValues
static const unsigned char STR_R
void openTag(std::string name)