sot-talos-balance
2.0.5
Collection of dynamic-graph entities aimed at implementing balance control on talos.
|
|
Go to the documentation of this file. 1 #ifndef QUALISYS_NBC_NBC_MARKUP_H_INCLUDED
2 #define QUALISYS_NBC_NBC_MARKUP_H_INCLUDED
17 #define _DS(i) (i ? &((const char*)m_csDoc.c_str())[m_aPos[i].nStartL] : 0)
18 #define MARKUP_SETDEBUGSTATE \
19 m_pMainDS = _DS(m_iPos); \
20 m_pChildDS = _DS(m_iPosChild)
22 #define MARKUP_SETDEBUGSTATE
41 bool AddElem(
const char* szName,
const char* szData = NULL) {
42 return x_AddElem(szName, szData,
false,
false);
45 return x_AddElem(szName, szData,
false,
true);
47 bool AddAttrib(
const char* szAttrib,
const char* szValue) {
53 bool SetAttrib(
const char* szAttrib,
const char* szValue) {
61 bool SetDoc(
const char* szDoc);
63 bool FindElem(
const char* szName = NULL);
82 static std::string
Format(
const char* fmt, ...);
97 const char* m_pMainDS;
98 const char* m_pChildDS;
155 bool Match(
const char* szName)
const;
163 void x_SetPos(
int iPosParent,
int iPos,
int iPosChild) {
174 int x_ParseError(
const char* szError,
const char* szName = NULL);
175 static bool x_FindChar(
const char* szDoc,
int& nChar,
char c);
176 static bool x_FindAny(
const char* szDoc,
int& nChar);
178 std::string
x_GetToken(
const TokenPos& token)
const;
179 int x_FindElem(
int iPosParent,
int iPos,
const char* szPath);
182 std::string
x_GetAttrib(
int iPos,
const char* szAttrib)
const;
183 bool x_AddElem(
const char* szName,
const char* szValue,
bool bInsert,
185 bool x_FindAttrib(TokenPos& token,
const char* szAttrib = NULL)
const;
186 bool x_SetAttrib(
int iPos,
const char* szAttrib,
const char* szValue);
187 void x_LocateNew(
int iPosParent,
int& iPosRel,
int& nOffset,
int nLength,
190 void x_DocChange(
int nLeft,
int nReplace,
const std::string& csInsert);
191 void x_Adjust(
int iPos,
int nShift,
bool bAfterPos =
false);
192 std::string
x_TextToDoc(
const char* szText,
bool bAttrib =
false)
const;
200 std::string Mid(
const std::string& tStr,
int nFirst)
const;
201 std::string Mid(
const std::string& tStr,
int nFirst,
int nCount)
const;
202 char* GetBuffer(std::string& tStr,
int nMinLen = -1)
const;
203 void ReleaseBuffer(std::string& tStr,
int nNewLen = -1)
const;
std::string x_GetData(int iPos) const
int x_FindElem(int iPosParent, int iPos, const char *szPath)
ElemPos(const ElemPos &pos)
std::vector< ElemPos > m_aPos
int x_ParseError(const char *szError, const char *szName=NULL)
int x_ParseElem(int iPos)
std::string GetChildAttrib(const char *szAttrib) const
bool FindChildElem(const char *szName=NULL)
static bool x_FindChar(const char *szDoc, int &nChar, char c)
bool Match(const char *szName) const
CMarkup(const CMarkup &markup)
std::string GetChildTagName() const
static bool x_FindAny(const char *szDoc, int &nChar)
std::string x_GetTagName(int iPos) const
bool SetAttrib(const char *szAttrib, const char *szValue)
CMarkup(const char *szDoc)
@ MNT_PROCESSING_INSTRUCTION
bool x_FindAttrib(TokenPos &token, const char *szAttrib=NULL) const
void x_DocChange(int nLeft, int nReplace, const std::string &csInsert)
void x_SetPos(int iPosParent, int iPos, int iPosChild)
int x_ParseNode(TokenPos &token)
bool AddChildElem(const char *szName, const char *szData=NULL)
std::string GetData() const
std::string GetTagName() const
std::string x_GetToken(const TokenPos &token) const
std::string GetChildData() const
bool x_SetAttrib(int iPos, const char *szAttrib, const char *szValue)
bool IsEmptyElement() const
void operator=(const CMarkup &markup)
std::string GetAttrib(const char *szAttrib) const
std::string GetError() const
std::string x_GetAttrib(int iPos, const char *szAttrib) const
#define MARKUP_SETDEBUGSTATE
bool x_AddElem(const char *szName, const char *szValue, bool bInsert, bool bAddChild)
bool AddAttrib(const char *szAttrib, const char *szValue)
void x_Adjust(int iPos, int nShift, bool bAfterPos=false)
void x_LocateNew(int iPosParent, int &iPosRel, int &nOffset, int nLength, int nFlags)
static bool x_FindToken(TokenPos &token)
bool SetDoc(const char *szDoc)
std::string x_TextToDoc(const char *szText, bool bAttrib=false) const
bool AddElem(const char *szName, const char *szData=NULL)
bool FindElem(const char *szName=NULL)
std::string GetDoc() const
static std::string Format(const char *fmt,...)
std::string x_TextFromDoc(int nLeft, int nRight) const
bool SetChildAttrib(const char *szAttrib, const char *szValue)
bool AddChildAttrib(const char *szAttrib, const char *szValue)
void SetIndent(int nIndent=4)