![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cXmlDocument.h>
Public Member Functions | |
| cXmlElement (cXmlString sValue) | |
| cXmlElement (const cXmlElement &rCopy) | |
| virtual | ~cXmlElement () |
| void | operator= (const cXmlElement &rCopy) |
| const char * | get_Text () const |
| virtual cXmlNode * | Clone () const |
| Creates a new Element and returns it - the returned element is a copy. More... | |
| virtual HRESULT | SetParseNode (cXmlReader &rReader) |
| virtual HRESULT | Print (cStreamOutput &rOut, int nDepth=0) const |
| Print the Element to a cStreamOutput stream. More... | |
| virtual bool | OnVisit (IXmlVisitor *visitor) const |
| Walk the XML tree visiting this node and all of its children. More... | |
| virtual cXmlContainer * | ToContainer () |
| virtual cXmlNode * | ToNode () |
| cast cXmlContainer is a cXmlDocument or cXmlElement More... | |
| virtual cXmlElement * | ToElement () |
| virtual const cXmlElement * | ToElement () const |
Public Member Functions inherited from GrayLib::cXmlNode | |
| virtual | ~cXmlNode () |
| XMLNODE_TYPE | get_Type () const |
| bool | isType (XMLNODE_TYPE eType) const |
| void | put_UserData (void *pUserData) |
| void * | get_UserData () const |
| void | put_Value (cXmlString sValue) |
| const cXmlString & | get_Value () const |
| HRESULT | QueryValueInt (int *piValue) const |
| HRESULT | QueryValueDouble (double *pdValue) const |
| QueryValueDouble examines the value string. See QueryValueInt(). More... | |
| int | get_ValueInt () const |
| Return the value of this attribute, converted to an integer. More... | |
| double | get_ValueDouble () const |
| Return the value of this attribute, converted to a double. More... | |
| void | put_ValueInt (int iValue) |
| Set the value from an integer. More... | |
| void | put_ValueDouble (double dValue) |
| Set the value from a double. More... | |
| cXmlDocument * | get_Document () const |
| cXmlNode * | GetPreviousSibling (const char *pszValue) const |
| Navigate to a sibling node. More... | |
| cXmlNode * | GetNextSiblingX (const char *pszValue) const |
| Navigate to a sibling node with the given 'value'. More... | |
| cXmlElement * | get_NextSiblingElement () const |
| cXmlElement * | GetNextSiblingElement (const char *pszValue) const |
| HRESULT | SetParse (const char *pszData, CXML_ENCODING_TYPE eEncoding=CXML_ENCODING_UNKNOWN) |
| ITERATE_t | get_Row () const |
| StrLen_t | get_Column () const |
Public Member Functions inherited from Gray::cListNodeT< cXmlNode > | |
| cXmlNode * | get_Next () const |
| cXmlNode * | get_Prev () const |
Public Member Functions inherited from Gray::cListNodeBase | |
| virtual | ~cListNodeBase () |
| cListBase * | get_Parent () const noexcept |
| cListNodeBase * | get_Next () const noexcept |
| cListNodeBase * | get_Prev () const noexcept |
| bool | hasParent () const noexcept |
| void | RemoveFromParent () |
| virtual HRESULT | DisposeThis () |
Public Member Functions inherited from Gray::cHeapObject | |
| cHeapObject () | |
| virtual | ~cHeapObject () |
| bool | IsValidInsideN (INT_PTR index) const |
| bool | IsValidInsidePtr (void const *pTest) const |
| virtual size_t | GetHeapStatsThis (OUT ITERATE_t &iAllocCount) const |
| virtual bool | isValidCheck () const noexcept |
Public Member Functions inherited from GrayLib::cXmlContainer | |
| virtual | ~cXmlContainer () |
| 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... | |
Public Member Functions inherited from Gray::cListT< cXmlNode > | |
| cXmlNode * | GetAt (ITERATE_t index) const |
| cXmlNode * | get_Head () const |
| cXmlNode * | get_Tail () const |
Public Member Functions inherited from Gray::cListBase | |
| 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 |
Public Attributes | |
| cXmlAttributeSet | m_Attributes |
Public Attributes inherited from GrayLib::cXmlNode | |
| cTextPos | m_Pos |
| Where (line,col) in the parsed XML document is this node? m_PosNode. More... | |
Protected Member Functions | |
| virtual void | SetCopy (const cXmlElement &n) |
| My set of attributes. More... | |
| virtual void | SetClear () |
| Delete all the children of this node. Does not affect 'this'. More... | |
Protected Member Functions inherited from GrayLib::cXmlNode | |
| cXmlNode (XMLNODE_TYPE eNodeType, cXmlString sValue="") | |
| Only instantiate as a derived type. More... | |
| virtual void | SetCopy (const cXmlNode &n) |
Protected Member Functions inherited from Gray::cListNodeBase | |
| virtual void | put_Parent (cListBase *pParent) |
| cListNodeBase () noexcept | |
Protected Member Functions inherited from Gray::cHeapObject | |
| const void * | get_HeapPtr () const noexcept override |
| Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr(). More... | |
Protected Member Functions inherited from Gray::cNonCopyable | |
| cNonCopyable () noexcept | |
| Force the use of Factory creation via protected constructor. More... | |
| ~cNonCopyable () noexcept | |
Protected Member Functions inherited from Gray::cListBase | |
| virtual void | RemoveListNode (cListNodeBase *pNode) |
| allow Override of this. called when child pObRec removed from list. More... | |
Additional Inherited Members | |
Public Types inherited from GrayLib::cXml | |
| enum | XMLNODE_TYPE { XMLNODE_QTY } |
Static Public Member Functions inherited from GrayLib::cXmlNode | |
| static HRESULT | PrintDepth (cStreamOutput &rOut, int nDepth) |
Static Public Member Functions inherited from GrayLib::cXml | |
| 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 Public Attributes inherited from GrayLib::cXml | |
| 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... | |
Protected Attributes inherited from GrayLib::cXmlNode | |
| const XMLNODE_TYPE | m_eNodeType |
| cXmlString | m_sValue |
| parent usage dependent m_eNodeType. More... | |
| void * | m_pUserData |
| Field containing a generic pointer to arbitrary user data. More... | |
Protected Attributes inherited from Gray::cListBase | |
| ITERATE_t | m_iCount |
| how many children? nice to get read only direct access to this for scripting. More... | |
The XMLNODE_Element is a container class. It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes.
| GrayLib::cXmlElement::cXmlElement | ( | cXmlString | sValue | ) |
| GrayLib::cXmlElement::cXmlElement | ( | const cXmlElement & | rCopy | ) |
|
virtual |
|
virtual |
Creates a new Element and returns it - the returned element is a copy.
Implements GrayLib::cXmlNode.
| const char * GrayLib::cXmlElement::get_Text | ( | void | ) | const |
get just the first text block.
|
virtual |
Walk the XML tree visiting this node and all of its children.
Walk the XML tree visiting this node and all of its children.
Implements GrayLib::cXmlNode.
|
inline |
|
virtual |
Print the Element to a cStreamOutput stream.
There are 3 different formatting approaches: 1) An element without children is printed as a "<foo />" pXNode 2) An element with only a text pChild is printed as "<foo> text </foo>" 3) An element with children is printed on multiple lines.
Implements GrayLib::cXmlNode.
|
protectedvirtual |
Delete all the children of this node. Does not affect 'this'.
Reimplemented from GrayLib::cXmlNode.
|
protectedvirtual |
My set of attributes.
|
virtual |
Attribute parsing starts: next char past '<'
Parse and populate XMLNODE_Element Attribute parsing starts: next char past '<'
Implements GrayLib::cXmlNode.
|
inlinevirtual |
Reimplemented from GrayLib::cXmlNode.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
cast cXmlContainer is a cXmlDocument or cXmlElement
cast cXmlContainer as a cXmlElement
Implements GrayLib::cXmlContainer.
| cXmlAttributeSet GrayLib::cXmlElement::m_Attributes |