vtdata library
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
vtTagArray Class Reference
Inheritance diagram for vtTagArray:
Inheritance graph
[legend]

Public Member Functions

void AddTag (const vtTag &pTag)
 
void AddTag (const char *name, const char *value)
 
vtTagFindTag (const char *szTagName)
 
const vtTagFindTag (const char *szTagName) const
 
vtTagGetTag (int index)
 
const vtTagGetTag (int index) const
 
uint NumTags () const
 
void RemoveTag (int index)
 
void RemoveTag (const char *szTagName)
 
void Clear ()
 
void SetValueString (const char *szTagName, const vtString &string, bool bCreating=false)
 
void SetValueBool (const char *szTagName, bool value, bool bCreating=false)
 
void SetValueInt (const char *szTagName, int value, bool bCreating=false)
 
void SetValueFloat (const char *szTagName, float value, bool bCreating=false)
 
void SetValueDouble (const char *szTagName, double value, bool bCreating=false)
 
void SetValueRGBi (const char *szTagName, const RGBi &value, bool bCreating=false)
 
const char * GetValueString (const char *szTagName, bool bSuppressWarning=false) const
 
bool GetValueBool (const char *szTagName) const
 
int GetValueInt (const char *szTagName) const
 
float GetValueFloat (const char *szTagName) const
 
double GetValueDouble (const char *szTagName) const
 
RGBi GetValueRGBi (const char *szTagName) const
 
bool GetValueString (const char *szTagName, vtString &string) const
 
bool GetValueBool (const char *szTagName, bool &bValue) const
 
bool GetValueInt (const char *szTagName, int &iValue) const
 
bool GetValueFloat (const char *szTagName, float &fValue) const
 
bool GetValueDouble (const char *szTagName, double &dValue) const
 
bool GetValueRGBi (const char *szTagName, RGBi &color) const
 
vtTagArrayoperator= (const vtTagArray &v)
 
bool operator== (const vtTagArray &v) const
 
bool operator!= (const vtTagArray &v) const
 
void CopyTagsFrom (const vtTagArray &v)
 
bool WriteToXML (const char *fname, const char *title) const
 
void WriteToXMLBody (FILE *fp, int iIndent) const
 
bool LoadFromXML (const char *fname)
 
virtual bool OverrideValue (const char *szTagName, const vtString &string)
 
virtual void WriteOverridesToXML (FILE *fp) const
 
void LogTags () const
 

Static Public Member Functions

static void SetVerbose (bool value)
 

Protected Attributes

std::vector< vtTagm_tags
 

Static Protected Attributes

static bool s_bVerbose = false
 

Detailed Description

A simple set of tags. Each tag (vtTag) has two strings: a Name and a Value. This is similar to the concept of a tag in XML.

If this gets used for something more performance-sensitive, we could replace the linear lookup with a hash map.