10 #ifndef VTDATA_CONTENTH
11 #define VTDATA_CONTENTH
28 m_attempted_load =
false;
34 bool m_attempted_load;
47 bool operator==(
const vtTag &v)
const
49 return (name == v.name && value == v.value);
51 bool operator!=(
const vtTag &v)
const
53 return (name != v.name || value != v.value);
69 void AddTag(
const vtTag &pTag);
70 void AddTag(
const char *name,
const char *value);
72 vtTag *FindTag(
const char *szTagName);
73 const vtTag *FindTag(
const char *szTagName)
const;
75 vtTag *GetTag(
int index);
76 const vtTag *GetTag(
int index)
const;
79 void RemoveTag(
int index);
80 void RemoveTag(
const char *szTagName);
84 void SetValueString(
const char *szTagName,
const vtString &
string,
bool bCreating =
false);
85 void SetValueBool(
const char *szTagName,
bool value,
bool bCreating =
false);
86 void SetValueInt(
const char *szTagName,
int value,
bool bCreating =
false);
87 void SetValueFloat(
const char *szTagName,
float value,
bool bCreating =
false);
88 void SetValueDouble(
const char *szTagName,
double value,
bool bCreating =
false);
89 void SetValueRGBi(
const char *szTagName,
const RGBi &value,
bool bCreating =
false);
92 const char *GetValueString(
const char *szTagName,
bool bSuppressWarning =
false)
const;
93 bool GetValueBool(
const char *szTagName)
const;
94 int GetValueInt(
const char *szTagName)
const;
95 float GetValueFloat(
const char *szTagName)
const;
96 double GetValueDouble(
const char *szTagName)
const;
97 RGBi GetValueRGBi(
const char *szTagName)
const;
100 bool GetValueString(
const char *szTagName,
vtString &
string)
const;
101 bool GetValueBool(
const char *szTagName,
bool &bValue)
const;
102 bool GetValueInt(
const char *szTagName,
int &iValue)
const;
103 bool GetValueFloat(
const char *szTagName,
float &fValue)
const;
104 bool GetValueDouble(
const char *szTagName,
double &dValue)
const;
105 bool GetValueRGBi(
const char *szTagName,
RGBi &color)
const;
116 bool WriteToXML(
const char *fname,
const char *title)
const;
117 void WriteToXMLBody(FILE *fp,
int iIndent)
const;
118 bool LoadFromXML(
const char *fname);
121 virtual bool OverrideValue(
const char *szTagName,
const vtString &
string)
125 virtual void WriteOverridesToXML(FILE *fp)
const {}
128 static void SetVerbose(
bool value);
129 void LogTags()
const;
132 std::vector<vtTag> m_tags;
133 static bool s_bVerbose;
146 void data(
const char *s,
int length);
168 void RemoveModel(
vtModel *model);
169 uint NumModels() {
return m_models.GetSize(); }
196 void ReadXML(
const char *filename);
197 void WriteXML(
const char *filename)
const;
201 void RemoveItem(
vtItem *item);
202 uint NumItems() {
return m_items.GetSize(); }
204 vtItem *GetItem(
int i) {
return m_items.
GetAt(i); }
205 vtItem *FindItemByName(
const char *name);
206 vtItem *FindItemByType(
const char *type,
const char *subtype);
207 vtString GetFilename() {
return m_strFilename; }
214 #endif // VTDATA_CONTENTH