Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cXmlText Class Reference

#include <cXmlDocument.h>

Inheritance diagram for GrayLib::cXmlText:
GrayLib::cXmlNode Gray::cListNodeT< cXmlNode > GrayLib::cXml Gray::cNonCopyable Gray::cListNodeBase Gray::cHeapObject Gray::IHeapObject

Public Member Functions

 cXmlText (cXmlString sValue="", bool bCDATA=false)
 
virtual ~cXmlText ()
 
 cXmlText (const cXmlText &rCopy)
 
void operator= (const cXmlText &rCopy)
 
bool isCDATA () const
 
void put_CDATA (bool bCDATA)
 
virtual cXmlNodeClone () const
 [internal use] Creates a new Element and returns it. More...
 
virtual HRESULT SetParseNode (cXmlReader &rReader)
 
virtual HRESULT Print (cStreamOutput &rOut, int nDepth=0) const
 Write this text object to a cStreamOutput stream. More...
 
virtual bool OnVisit (IXmlVisitor *content) const
 Walk the XML tree visiting this node and all of its children. More...
 
virtual cXmlTextToText ()
 
virtual const cXmlTextToText () 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 cXmlStringget_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...
 
cXmlDocumentget_Document () const
 
cXmlNodeGetPreviousSibling (const char *pszValue) const
 Navigate to a sibling node. More...
 
cXmlNodeGetNextSiblingX (const char *pszValue) const
 Navigate to a sibling node with the given 'value'. More...
 
cXmlElementget_NextSiblingElement () const
 
cXmlElementGetNextSiblingElement (const char *pszValue) const
 
virtual cXmlContainerToContainer ()
 
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 ()
 
cListBaseget_Parent () const noexcept
 
cListNodeBaseget_Next () const noexcept
 
cListNodeBaseget_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
 

Protected Member Functions

virtual void SetCopy (const cXmlText &n)
 
virtual void SetClear ()
 Delete all the children of this node. Does not affect 'this'. More...
 
bool isBlank () const
 returns true if all white space and new lines 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
 

Friends

class cXmlElement
 

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)
 
- Public Attributes inherited from GrayLib::cXmlNode
cTextPos m_Pos
 Where (line,col) in the parsed XML document is this node? m_PosNode. More...
 
- 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...
 

Detailed Description

XMLNODE_Text. A text node can have 2 ways to output the next. "normal" output and CDATA. It will default to the mode it was parsed from the XML file and you generally want to leave it alone, but you can change the output mode with SetCDATA() and query it with CDATA().

Constructor & Destructor Documentation

◆ cXmlText() [1/2]

GrayLib::cXmlText::cXmlText ( cXmlString  sValue = "",
bool  bCDATA = false 
)
inline

Constructor for text element. By default, it is treated as normal, encoded text. If you want it be output as a CDATA text element, set the parameter _cdata to 'true'

◆ ~cXmlText()

virtual GrayLib::cXmlText::~cXmlText ( )
inlinevirtual

◆ cXmlText() [2/2]

GrayLib::cXmlText::cXmlText ( const cXmlText rCopy)
inline

Member Function Documentation

◆ Clone()

cXmlNode * GrayLib::cXmlText::Clone ( ) const
virtual

[internal use] Creates a new Element and returns it.

Implements GrayLib::cXmlNode.

◆ isBlank()

bool GrayLib::cXmlText::isBlank ( ) const
protected

returns true if all white space and new lines

< returns true if all white space and new lines

◆ isCDATA()

bool GrayLib::cXmlText::isCDATA ( ) const
inline

Queries whether this represents text using a CDATA section.

◆ OnVisit()

bool GrayLib::cXmlText::OnVisit ( IXmlVisitor content) const
virtual

Walk the XML tree visiting this node and all of its children.

Implements GrayLib::cXmlNode.

◆ operator=()

void GrayLib::cXmlText::operator= ( const cXmlText rCopy)
inline

◆ Print()

HRESULT GrayLib::cXmlText::Print ( cStreamOutput rOut,
int  nDepth = 0 
) const
virtual

Write this text object to a cStreamOutput stream.

Implements GrayLib::cXmlNode.

◆ put_CDATA()

void GrayLib::cXmlText::put_CDATA ( bool  bCDATA)
inline

Turns on or off a CDATA representation of text.

◆ SetClear()

virtual void GrayLib::cXmlText::SetClear ( )
inlineprotectedvirtual

Delete all the children of this node. Does not affect 'this'.

Reimplemented from GrayLib::cXmlNode.

◆ SetCopy()

void GrayLib::cXmlText::SetCopy ( const cXmlText n)
protectedvirtual

◆ SetParseNode()

HRESULT GrayLib::cXmlText::SetParseNode ( cXmlReader rReader)
virtual

Populate node. Parse XMLNODE_Text Read in text chunk. Don't ReadWhitespace.

Implements GrayLib::cXmlNode.

◆ ToText() [1/2]

virtual cXmlText* GrayLib::cXmlText::ToText ( )
inlinevirtual

◆ ToText() [2/2]

virtual const cXmlText* GrayLib::cXmlText::ToText ( ) const
inlinevirtual

Friends And Related Function Documentation

◆ cXmlElement

friend class cXmlElement
friend

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