AnimatLab  2
Test
StdUtils::CMarkupSTL Class Reference
+ Inheritance diagram for StdUtils::CMarkupSTL:
+ Collaboration diagram for StdUtils::CMarkupSTL:

Classes

struct  ElemPos
 
struct  SavedPos
 
struct  TokenPos
 

Public Types

enum  MarkupNodeType {
  MNT_ELEMENT = 1, MNT_TEXT = 2, MNT_WHITESPACE = 4, MNT_CDATA_SECTION = 8,
  MNT_PROCESSING_INSTRUCTION = 16, MNT_COMMENT = 32, MNT_DOCUMENT_TYPE = 64, MNT_EXCLUDE_WHITESPACE = 123
}
 

Public Member Functions

 CMarkupSTL (const char *szDoc)
 
 CMarkupSTL (const CMarkupSTL &markup)
 
bool AddAttrib (const char *szAttrib, const char *szValue)
 
bool AddAttrib (const char *szAttrib, int nValue)
 
bool AddChildAttrib (const char *szAttrib, const char *szValue)
 
bool AddChildAttrib (const char *szAttrib, int nValue)
 
bool AddChildElem (const char *szName, const char *szData=NULL)
 
bool AddChildSubDoc (const char *szSubDoc)
 
bool AddElem (const char *szName, const char *szData=NULL)
 
bool FindChildElem (const char *szName=NULL)
 
bool FindElem (const char *szName=NULL)
 
std::string GetAttrib (const char *szAttrib) const
 
std::string GetAttribName (int n) const
 
std::string GetChildAttrib (const char *szAttrib) const
 
std::string GetChildData () const
 
std::string GetChildSubDoc () const
 
std::string GetChildTagName () const
 
std::string GetData () const
 
std::string GetDoc () const
 
std::string GetError () const
 
bool GetOffsets (int &nStart, int &nEnd) const
 
std::string GetTagName () const
 
bool InsertChildElem (const char *szName, const char *szData=NULL)
 
bool InsertChildSubDoc (const char *szSubDoc)
 
bool InsertElem (const char *szName, const char *szData=NULL)
 
virtual bool IntoElem ()
 
bool IsWellFormed ()
 
bool Load (const char *szFileName)
 
void operator= (const CMarkupSTL &markup)
 
virtual bool OutOfElem ()
 
bool RemoveChildElem ()
 
bool RemoveElem ()
 
void ResetChildPos ()
 
void ResetMainPos ()
 
void ResetPos ()
 
bool RestorePos (const char *szPosName="")
 
bool Save (const char *szFileName)
 
bool SavePos (const char *szPosName="")
 
bool SetAttrib (const char *szAttrib, const char *szValue)
 
bool SetAttrib (const char *szAttrib, int nValue)
 
bool SetChildAttrib (const char *szAttrib, const char *szValue)
 
bool SetChildAttrib (const char *szAttrib, int nValue)
 
bool SetChildData (const char *szData, int nCDATA=0)
 
bool SetData (const char *szData, int nCDATA=0)
 
bool SetDoc (const char *szDoc)
 

Protected Types

typedef std::map< std::string, SavedPosmapSavedPosT
 
typedef std::vector< ElemPosvectorElemPosT
 

Protected Member Functions

bool x_AddElem (const char *szName, const char *szValue, bool bInsert, bool bAddChild)
 
bool x_AddSubDoc (const char *szSubDoc, bool bInsert, bool bAddChild)
 
void x_Adjust (int iPos, int nShift, bool bAfterPos=false)
 
bool x_CreateNode (std::string &strNode, int nNodeType, const char *szText)
 
void x_DocChange (int nLeft, int nReplace, const std::string &strInsert)
 
bool x_FindAttrib (TokenPos &token, const char *szAttrib=NULL) const
 
int x_FindElem (int iPosParent, int iPos, const char *szPath)
 
std::string x_GetAttrib (int iPos, const char *szAttrib) const
 
std::string x_GetData (int iPos) const
 
int x_GetFreePos ()
 
std::string x_GetTagName (int iPos) const
 
std::string x_GetToken (const TokenPos &token) const
 
void x_LocateNew (int iPosParent, int &iPosRel, int &nOffset, int nLength, int nFlags)
 
int x_ParseElem (int iPos)
 
int x_ParseError (const char *szError, const char *szName=NULL)
 
int x_ParseNode (TokenPos &token)
 
void x_PosInsert (int iPos, int nInsertLength)
 
int x_ReleasePos ()
 
int x_RemoveElem (int iPos)
 
bool x_SetAttrib (int iPos, const char *szAttrib, const char *szValue)
 
bool x_SetAttrib (int iPos, const char *szAttrib, int nValue)
 
bool x_SetData (int iPos, const char *szData, int nCDATA)
 
void x_SetPos (int iPosParent, int iPos, int iPosChild)
 
std::string x_TextFromDoc (int nLeft, int nRight) const
 
std::string x_TextToDoc (const char *szText, bool bAttrib=false) const
 

Static Protected Member Functions

static bool x_FindChar (const char *szDoc, int &nChar, char c)
 
static bool x_FindToken (TokenPos &token)
 

Protected Attributes

vectorElemPosT m_aPos
 
int m_iPos
 
int m_iPosChild
 
int m_iPosFree
 
int m_iPosParent
 
mapSavedPosT m_mapSavedPos
 
int m_nNodeType
 
std::string m_strDoc
 
std::string m_strError
 

Detailed Description

Definition at line 28 of file MarkupSTL.h.


The documentation for this class was generated from the following files: