Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Burger::FileINI::Comment Class Reference

Untouched text object. More...

Inheritance diagram for Burger::FileINI::Comment:
Inheritance graph
[legend]
Collaboration diagram for Burger::FileINI::Comment:
Collaboration graph
[legend]

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.
 
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::FileINI::Generic
 Generic (eType uType)
 Initialize a generic object.
 
virtual ~Generic ()
 Call the destructor for a generic object.
 
GenericGetNext (void) const
 Get the pointer to the next object in the list.
 
GenericGetPrevious (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.
 
- Public Member Functions inherited from Burger::Base
const char * get_class_name (void) const noexcept
 Get the name of the class.
 
virtual const Burger::StaticRTTIget_StaticRTTI (void) const noexcept
 Get the description to the class.
 
virtual ~Base () noexcept=default
 Destructor.
 

Static Public Member Functions

static CommentNew (void)
 Allocate an empty comment object.
 
static CommentNew (const char *pComment)
 Allocate a comment object with text.
 

Private Attributes

String m_Comment
 Unmodified text for a comment line.
 

Additional Inherited Members

- Public Types inherited from Burger::FileINI::Generic
enum  eType { LINEENTRY_ROOT , LINEENTRY_SECTION , LINEENTRY_ENTRY , LINEENTRY_COMMENT }
 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.
 

Detailed Description

Untouched text object.


For every line in an INI file that's not part of the data, store the text in one of these objects. It will not be parsed and yet retained so when the file is saved, the comments will be intact.

Note
This will identify with eType of LINEENTRY_COMMENT
See also
Burger::FileINI, Burger::FileINI::Entry, Burger::FileINI::Generic or Burger::FileINI::Section

Constructor & Destructor Documentation

◆ Comment() [1/2]

Burger::FileINI::Comment::Comment ( )

Create an empty comment object.


◆ Comment() [2/2]

Burger::FileINI::Comment::Comment ( const char * pComment)

Create a comment object with text.


Parameters
pCommentText to store in this newly created object

◆ ~Comment()

Burger::FileINI::Comment::~Comment ( )
virtual

Call the destructor for a Comment object.


Unlink itself from the linked list and release the contained string

Member Function Documentation

◆ GetText()

const char * Burger::FileINI::Comment::GetText ( void ) const
inline

Return a pointer to the contained comment string.


See also
SetText(const char *) or SetText(const String *)

◆ New() [1/2]

Burger::FileINI::Comment *BURGER_API Burger::FileINI::Comment::New ( const char * pComment)
static

Allocate a comment object with text.


Parameters
pCommentText to store in this newly created object

◆ New() [2/2]

Burger::FileINI::Comment *BURGER_API Burger::FileINI::Comment::New ( void )
static

Allocate an empty comment object.


◆ SetText() [1/2]

void Burger::FileINI::Comment::SetText ( const char * pInput)
inline

Set a new comment string.


Replace the contained comment string with a new one

Parameters
pInputPointer to a "C" string
See also
GetText(void) const or SetText(const String *)

◆ SetText() [2/2]

void Burger::FileINI::Comment::SetText ( const String * pInput)
inline

Set a new comment string.


Replace the contained comment string with a new one

Parameters
pInputPointer to a String class instance
See also
GetText(void) const or SetText(const char *)

Member Data Documentation

◆ m_Comment

String Burger::FileINI::Comment::m_Comment
private

Unmodified text for a comment line.