Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00043 #ifdef _MSC_VER
00044 #pragma once
00045 #endif
00046
00047 #ifndef OGDF_XML_OBJECT_H
00048 #define OGDF_XML_OBJECT_H
00049
00050
00051
00052 namespace ogdf {
00053
00054
00055 typedef HashElement<String,int> *XmlKey;
00056 enum XmlObjectType { xmlIntValue, xmlDoubleValue, xmlStringValue, xmlListBegin,
00057 xmlListEnd, xmlKey, xmlEOF, xmlError };
00058
00059
00060
00061
00062
00063
00064 struct OGDF_EXPORT XmlObject {
00065
00066 XmlObject *m_pBrother;
00067 XmlKey m_key;
00068 XmlObjectType m_valueType;
00069
00070
00071
00072
00073
00074
00075
00076 union {
00077 int m_intValue;
00078 double m_doubleValue;
00079 const char *m_stringValue;
00080 XmlObject *m_pFirstSon;
00081 };
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103 XmlObject(XmlKey key) : m_pBrother(0), m_key(key),
00104 m_valueType(xmlListBegin), m_pFirstSon(0) { }
00105
00106
00107 XmlObject(XmlKey key, int intValue) : m_pBrother(0), m_key(key),
00108 m_valueType(xmlIntValue), m_intValue(intValue) { }
00109
00110
00111 XmlObject(XmlKey key, double doubleValue) : m_pBrother(0), m_key(key),
00112 m_valueType(xmlDoubleValue), m_doubleValue(doubleValue) { }
00113
00114
00115 XmlObject(XmlKey key, const char *stringValue) : m_pBrother(0), m_key(key),
00116 m_valueType(xmlStringValue), m_stringValue(stringValue) { }
00117
00118
00119 XmlObject(const char *stringValue) : m_pBrother(0), m_key(0),
00120 m_valueType(xmlStringValue), m_stringValue(stringValue) { }
00121
00122
00123 OGDF_NEW_DELETE
00124 };
00125
00126 }
00127
00128 #endif