Public Member Functions | |
Comment () | |
Create an empty comment object. | |
Comment (const char *pComment) | |
Create a comment object with text. | |
virtual | ~Comment () |
Call the destructor for a Comment object. | |
virtual uint_t | Parse (InputMemoryStream *pInput) |
Parse an XML comment object. | |
virtual uint_t | Save (OutputMemoryStream *pOutput, uint_t uDepth) const |
Write out an XML comment object. | |
const char * | GetText (void) const |
Return a pointer to the contained comment string. | |
void | SetText (const char *pInput) |
Set a new comment string. | |
void | SetText (const String *pInput) |
Set a new comment string. | |
Public Member Functions inherited from Burger::FileXML::Generic | |
Generic (eType uType) | |
Initialize a generic object. | |
virtual | ~Generic () |
Call the destructor for a generic object. | |
Generic * | GetNext (void) const |
Get the pointer to the next object in the list. | |
Generic * | GetPrevious (void) const |
Get the pointer to the previous object in the list. | |
eType | GetType (void) const |
Get the enumeration of the derived class' type. | |
void | InsertBefore (Generic *pGeneric) |
Insert this object before this one in the linked list. | |
void | InsertAfter (Generic *pGeneric) |
Insert this object after this one in the linked list. | |
Element * | GetNextElement (void) const |
Follow the linked list of items to the next Element. | |
Element * | GetNextElement (const char *pElementName) const |
Follow the linked list of items to the next named Element. | |
Generic * | GetNextItem (void) const |
Follow the linked list of items to the next object. | |
Public Member Functions inherited from Burger::Base | |
const char * | get_class_name (void) const noexcept |
Get the name of the class. | |
virtual const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept |
Get the description to the class. | |
virtual | ~Base () noexcept=default |
Destructor. | |
Static Public Member Functions | |
static Comment * | New (InputMemoryStream *pInput) |
Create a new Comment structure and initialize it from an input file. | |
static Comment * | New (const char *pComment) |
Create a new Comment structure and initialize it with a string. | |
Private Attributes | |
String | m_Comment |
Unmodified text for a comment line. | |
Additional Inherited Members | |
Public Types inherited from Burger::FileXML::Generic | |
enum | eType { XML_ROOT , XML_COMMENT , XML_CDATA , XML_ATTRIBUTE , XML_DECLARATION , XML_DOCUMENT , XML_ELEMENT , XML_TEXT , XML_UNKNOWN } |
Enumeration to identify derived classes. More... | |
Static Public Attributes inherited from Burger::Base | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Comment text object.
For every record in an XML file, store the text in one of these objects. It will not be translated and is retained so when the file is saved, the comments will be intact.
Burger::FileXML::Comment::Comment | ( | ) |
Create an empty comment object.
Burger::FileXML::Comment::Comment | ( | const char * | pComment | ) |
Create a comment object with text.
pComment | Text to store in this newly created object |
|
virtual |
Call the destructor for a Comment object.
Unlink itself from the linked list and release the contained string
|
inline |
Return a pointer to the contained comment string.
|
static |
|
static |
Create a new Comment structure and initialize it from an input file.
Parse the input file after the starting Will return NULL on a parsing error or if it's out of memory
pInput | Pointer to an input stream at the byte after the |
|
virtual |
Parse an XML comment object.
Given a data string that's starting right after the initial <!--
in an XML file, parse out the comment and remove the trailing -->
. Return an error if a -->
was not found before the data stream was exhausted.
pInput | Pointer to the input text stream |
Reimplemented from Burger::FileXML::Generic.
|
virtual |
Write out an XML comment object.
Encapsulate a comment record with \n and send it out the data stream
pOutput | Pointer to the output text stream |
uDepth | Number of tabs to output for formatting before writing out the comment |
Reimplemented from Burger::FileXML::Generic.
|
inline |
Set a new comment string.
Replace the contained comment string with a new one
pInput | Pointer to a "C" string |
|
inline |
Set a new comment string.
Replace the contained comment string with a new one
pInput | Pointer to a String class instance |
|
private |
Unmodified text for a comment line.