CDATASegment



Member Functions

CDATASegment

   public:

CDATASegment(class CElement* elem):mElement(elem) {mIsCDATA=false;};

object constructor; in this form, not really CDATA but a container for CElement, used in the mixed-model mode of a CElement. Bad design...i know.

Parameters

NameDescription
elema CElement object

CDATASegment

   public:

CDATASegment(const char* cdata, int len):mCDATA(cdata, len), mIsCDATA(true), mElement(NULL) {;};

object constructor

Parameters

NameDescription
cdatathe CDATA
lenthe character length of the CDATA

getCDATA

   public:

std::string& getCDATA() {return mCDATA;};

accessor of the actual CDATA stored by this object

Result: a reference to a basic_string

getElement

   public:

class CElement *getElement() {return mElement;};

returns the CElement stored by this object


isCDATA

   public:

virtual Boolean isCDATA() {return mIsCDATA;};

Result: returns true if this is a CDATA chunk or a holder of an CElement (cheap, hack form of RTTI, i should be slapped pretty hard)

Member Data

mCDATA

protected:
 std::string mCDATA;

the character data contained by this segment


mElement

protected:
 class CElement* mElement;

the element containing this character data


mIsCDATA

protected:
 Boolean mIsCDATA;


© 1999-2000, Thomas Bednarz, Jr. — (Last Updated 7/16/2000)