![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cXmlDocument.h>
Public Member Functions | |
virtual | ~cXmlContainer () |
virtual cXmlNode * | ToNode ()=0 |
cast cXmlContainer is a cXmlDocument or cXmlElement More... | |
cXmlNode * | GetChildFirst (const char *value) const |
The first child of this node with the matching 'value'. Will be null if none found. More... | |
cXmlNode * | GetChildLast (const char *value) const |
The last child of this node matching 'value'. Will be null if there are no children. More... | |
cXmlNode * | IterateChildren (const char *value, const cXmlNode *previous) const |
This flavor of IterateChildren searches for children with a particular 'value'. More... | |
HRESULT | LinkChildEnd (cXmlNode *addThis) |
void | SetCopyChildren (const cXmlContainer &cont) |
cXmlNode * | InsertChildEnd (const cXmlNode &addThis) |
cXmlNode * | InsertChildAfter (cXmlNode *afterThis, const cXmlNode &addThis) |
cXmlNode * | InsertChildBefore (cXmlNode *beforeThis, const cXmlNode &addThis) |
bool | RemoveChild (cXmlNode *removeThis) |
Delete a child of this node. More... | |
cXmlElement * | get_FirstChildElement () const |
Convenience function to get through elements. More... | |
cXmlElement * | GetFirstChildElement (const char *pszValue) const |
Convenience function to get through elements. More... | |
![]() | |
cXmlNode * | GetAt (ITERATE_t index) const |
cXmlNode * | get_Head () const |
cXmlNode * | get_Tail () const |
![]() | |
cListBase () noexcept | |
virtual | ~cListBase () |
virtual void | InsertListNode (cListNodeBase *pNodeNew, cListNodeBase *pNodePrev=nullptr) |
void | InsertList (cListBase *pListSrc, cListNodeBase *pNodePrev=nullptr) |
void | InsertBefore (cListNodeBase *pNodeNew, const cListNodeBase *pNodeNext) |
void | InsertHead (cListNodeBase *pNodeNew) |
void | InsertTail (cListNodeBase *pNodeNew) |
void | DisposeAll () |
void | Empty () |
cListNodeBase * | get_Head (void) const noexcept |
cListNodeBase * | get_Tail (void) const noexcept |
ITERATE_t | get_Count () const noexcept |
bool | isEmpty () const noexcept |
cListNodeBase * | GetAt (ITERATE_t index) const |
iterate the linked list. More... | |
bool | IsMyChild (const cListNodeBase *pNode) const noexcept |
Additional Inherited Members | |
![]() | |
enum | XMLNODE_TYPE { XMLNODE_QTY } |
![]() | |
static StrLen_t GRAYCALL | ParseMicrosoftBOM (const BYTE *pszData) |
static bool GRAYCALL | IsXML (const IniChar_t *pszStr, StrLen_t iLenMax=StrT::k_LEN_MAX) |
static cXmlString GRAYCALL | GetAttributeStr (const IniChar_t *pszName, const cXmlString &sValue) |
static void | AddPathElement (cXmlString &sPath, const cXmlString &sElement) |
static void | RemovePathElement (cXmlString &sPath, const cXmlString &sElement) |
![]() | |
static const char | k_xmlHeader [6] = "<?xml" |
"<?xml" // not case sensitive ! More... | |
static const char | k_xmlEnd [3] = "?>" |
"?>" More... | |
static const char | k_commentHeader [5] = "<!--" |
"<!--" // comments are not reentrant! More... | |
static const char | k_commentEnd [4] = "-->" |
"-->" More... | |
static const char | k_cdataHeader [10] = "<![CDATA[" |
"<![CDATA[" More... | |
static const char | k_cdataEnd [4] = "]]>" |
"]]>" More... | |
static const char | k_dtdHeader [3] = "<!" |
"<!" More... | |
![]() | |
virtual void | RemoveListNode (cListNodeBase *pNode) |
allow Override of this. called when child pObRec removed from list. More... | |
![]() | |
ITERATE_t | m_iCount |
how many children? nice to get read only direct access to this for scripting. More... | |
Document, Element node types may contain child cXmlNode(s).
|
inlinevirtual |
cXmlElement * GrayLib::cXmlContainer::get_FirstChildElement | ( | ) | const |
Convenience function to get through elements.
cXmlNode * GrayLib::cXmlContainer::GetChildFirst | ( | const char * | value | ) | const |
The first child of this node with the matching 'value'. Will be null if none found.
cXmlNode * GrayLib::cXmlContainer::GetChildLast | ( | const char * | value | ) | const |
The last child of this node matching 'value'. Will be null if there are no children.
cXmlElement * GrayLib::cXmlContainer::GetFirstChildElement | ( | const char * | pszValue | ) | const |
Convenience function to get through elements.
cXmlNode * GrayLib::cXmlContainer::InsertChildAfter | ( | cXmlNode * | afterThis, |
const cXmlNode & | addThis | ||
) |
Add a new node related to this. Adds a child after the specified child. Returns a pointer to the new object or nullptr if an error occurred.
Copy this node into the child list.
cXmlNode * GrayLib::cXmlContainer::InsertChildBefore | ( | cXmlNode * | beforeThis, |
const cXmlNode & | addThis | ||
) |
Add a new node related to this. Adds a child before the specified child. Returns a pointer to the new object or nullptr if an error occurred.
Copy this node into the child list.
Add a new node related to this. Adds a child past the LastChild.
Copy this node into the child list.
cXmlNode * GrayLib::cXmlContainer::IterateChildren | ( | const char * | value, |
const cXmlNode * | previous | ||
) | const |
This flavor of IterateChildren searches for children with a particular 'value'.
An alternate way to walk the children of a node. One way to iterate over nodes is:
//! for( child = parent->FirstChild(); child; child = child->NextSibling()) //!
IterateChildren does the same thing with the syntax: @verbatim
//! child = 0; //! while( child = parent->IterateChildren( child )) //!
IterateChildren takes the previous child as input and finds the next one. If the previous child is null, it returns the first. IterateChildren will return null when done.
Add a new node related to this. Adds a child past the LastChild.
bool GrayLib::cXmlContainer::RemoveChild | ( | cXmlNode * | removeThis | ) |
Delete a child of this node.
void GrayLib::cXmlContainer::SetCopyChildren | ( | const cXmlContainer & | cont | ) |
|
pure virtual |
cast cXmlContainer is a cXmlDocument or cXmlElement
Implemented in GrayLib::cXmlDocument, and GrayLib::cXmlElement.