Raw text object. More...


Public Member Functions | |
| RawText () | |
| Create an empty raw text object. | |
| RawText (const char *pText) | |
| Create a raw text object with default text. | |
| virtual | ~RawText () |
| Call the destructor for a raw text object. | |
| virtual uint_t | Parse (InputMemoryStream *pInput) |
| Parse raw text between XML objects. | |
| virtual uint_t | Save (OutputMemoryStream *pOutput, uint_t uDepth) const |
| Write out a raw text object. | |
| const char * | GetText (void) const |
| Return a pointer to the contained text string. | |
| void | SetText (const char *pInput) |
| Set a new string. | |
| void | SetText (const String *pInput) |
| Set a new string. | |
| uint_t | GetBoolean (uint_t bDefault) const |
| Return a boolean. | |
| void | SetBoolean (uint_t bValue) |
| Return a boolean. | |
| uint_t | GetWord (uint_t uDefault, uint_t uMin=0, uint_t uMax=UINT32_MAX) const |
| Return an unsigned integer value. | |
| void | SetWord (uint_t uValue) |
| Set an unsigned integer value. | |
| void | SetWordHex (uint_t uValue) |
| Set an unsigned integer value as hex. | |
| int_t | GetInt (int_t iDefault, int_t iMin=INT32_MIN, int_t iMax=INT32_MAX) const |
| Return a signed integer value. | |
| void | SetInt (int_t iValue) |
| Set a signed integer value. | |
| float | GetFloat (float fDefault) const |
| Return a floating point value. | |
| float | GetFloat (float fDefault, float fMin, float fMax) const |
| Return a floating point value. | |
| void | SetFloat (float fValue) |
| Set a 32 bit floating point value. | |
| double | GetDouble (double dDefault) const |
| Return a 64 bit floating point value. | |
| double | GetDouble (double dDefault, double dMin, double dMax) const |
| Return a 64 bit floating point value. | |
| void | SetDouble (double dValue) |
| Set a 64 bit floating point value. | |
| 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 RawText * | new_object (InputMemoryStream *pInput) |
| Create a new RawText structure and initialize it from an input file. | |
| static RawText * | new_object (const char *pText) |
| Create a new RawText structure and initialize it. | |
Private Attributes | |
| String | m_Text |
| Name of the element. | |
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. | |
Raw text object.
In between Element markers can exist raw text, store the text in one or more of these objects.
| Burger::FileXML::RawText::RawText | ( | ) |
Create an empty raw text object.
| Burger::FileXML::RawText::RawText | ( | const char * | pText | ) |
Create a raw text object with default text.
| pText | Text to store in this newly created object |
|
virtual |
Call the destructor for a raw text object.
Unlink itself from the linked list and release the contained string
Return a boolean.
Calls String::GetBoolean(uint_t) on the text and returns the result.
| bDefault | Value to return on parse failure |
|
inline |
Return a 64 bit floating point value.
Calls String::GetDouble(double) on the text and returns the result.
| dDefault | Value to return on error |
|
inline |
Return a 64 bit floating point value.
Calls String::GetDouble(double,double,double) on the text and returns the result.
| dDefault | Value to return on error |
| dMin | Minimum acceptable value |
| dMax | Maximum acceptable value |
|
inline |
Return a floating point value.
Calls String::GetFloat(float) on the text and returns the result.
| fDefault | Value to return on error |
|
inline |
Return a floating point value.
Calls String::GetFloat(float,float,float) on the text and returns the result.
| fDefault | Value to return on error |
| fMin | Minimum acceptable value |
| fMax | Maximum acceptable value |
|
inline |
Return a signed integer value.
Calls String::GetInt(int_t,int_t,int_t) on the text and returns the result.
| iDefault | Value to return on error |
| iMin | Minimum acceptable value |
| iMax | Maximum acceptable value |
|
inline |
Return a pointer to the contained text string.
|
inline |
Return an unsigned integer value.
Calls String::GetWord(uint_t,uint_t,uint_t) on the text and returns the result.
| uDefault | Value to return on error |
| uMin | Minimum acceptable value |
| uMax | Maximum acceptable value |
|
static |
|
static |
Create a new RawText structure and initialize it from an input file.
Parse the input file after whitespace and it will copy the text until a '>' or a '<' is found. Trailing whitespace will be removed.
Will return NULL on a parsing error or if it's out of memory
| pInput | Pointer to an input stream at the byte after whitespace. |
|
virtual |
Parse raw text between XML objects.
Given a data string that's starting outside of an encapsulated element token, parse out the raw text until a '>' or '<' is found. Trailing whitespace is removed from the text string.
| pInput | Pointer to the input text stream |
Reimplemented from Burger::FileXML::Generic.
|
virtual |
Write out a raw text object.
Output raw text as is. Only print leading tabs if the previously output object was not a XML_ROOT or XML_TEXT. Append a \n if the next object is not XML_ROOT or XML_TEXT.
| 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 |
Return a boolean.
Calls String::SetYesNo(uint_t) on the text and returns the result.
| bValue | Value to pass to String::SetYesNo(uint_t) |
|
inline |
Set a 64 bit floating point value.
Calls String::SetDouble(double) on the text
| dValue | Value to store as an integer string |
|
inline |
Set a 32 bit floating point value.
Calls String::SetFloat(float) on the text
| fValue | Value to store as an integer string |
|
inline |
Set a signed integer value.
Calls String::SetInt(int_t) on the text
| iValue | Value to store as an integer string |
|
inline |
Set a new string.
Replace the contained string with a new one
| pInput | Pointer to a "C" string |
|
inline |
Set a new string.
Replace the contained string with a new one
| pInput | Pointer to a String class instance |
|
inline |
Set an unsigned integer value.
Calls String::SetWord(uint_t) on the text
| uValue | Value to store as an unsigned integer string |
|
inline |
Set an unsigned integer value as hex.
Calls String::SetWordHex(uint_t) on the text
| uValue | Value to store as an unsigned integer hex string |
|
private |
Name of the element.