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 Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Burger::FileINI::Generic Class Reference

Base class for INI file line objects. More...

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

Public Types

enum  eType { LINEENTRY_ROOT , LINEENTRY_SECTION , LINEENTRY_ENTRY , LINEENTRY_COMMENT }
 Enumeration to identify derived classes. More...
 

Public Member Functions

 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 charget_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.
 

Private Member Functions

 Generic (const Generic &)=delete
 
Genericoperator= (const Generic &)=delete
 
 Generic (Generic &&)=delete
 
Genericoperator= (Generic &&)=delete
 

Private Attributes

LinkedListPointer m_Link
 Linked list entry.
 
eType m_eType
 Type of derived class.
 

Additional Inherited Members

- Static Public Attributes inherited from Burger::Base
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
 

Detailed Description

Base class for INI file line objects.


Base class used to contain line objects for INI files. This is used as is as a root object to start and end a linked list loop.

See also
Burger::FileINI, Burger::FileINI::Entry, Burger::FileINI::Comment or Burger::FileINI::Section

Member Enumeration Documentation

◆ eType

Enumeration to identify derived classes.


To remove the need for Run Time Type Information, all derived classes must self-identify by assigning themselves with a unique enumeration so a Generic class can be upcast to the true derived class.

See also
Burger::FileINI, Burger::FileINI::Entry, Burger::FileINI::Comment or Burger::FileINI::Section
Enumerator
LINEENTRY_ROOT 

Only used for root objects.

LINEENTRY_SECTION 

INI section header.

LINEENTRY_ENTRY 

Data entries attached to a section.

LINEENTRY_COMMENT 

"Comment" strings to retain user supplied information

Constructor & Destructor Documentation

◆ Generic() [1/3]

Burger::FileINI::Generic::Generic ( const Generic & )
privatedelete

◆ Generic() [2/3]

Burger::FileINI::Generic::Generic ( Generic && )
privatedelete

◆ Generic() [3/3]

Burger::FileINI::Generic::Generic ( eType uType)

Initialize a generic object.


Parameters
uTypeType enumeration for the derived class

◆ ~Generic()

Burger::FileINI::Generic::~Generic ( )
virtual

Call the destructor for a generic object.


Unlink itself from the linked list and release resources

Note
This is a base class, so the destructor is virtual

Member Function Documentation

◆ GetNext()

Burger::FileINI::Generic * Burger::FileINI::Generic::GetNext ( void ) const
inline

Get the pointer to the next object in the list.


Follow the linked list forward and get the item's pointer

Returns
Pointer to the next Generic object in the list
See also
GetPrevious(void) const

◆ GetPrevious()

Burger::FileINI::Generic * Burger::FileINI::Generic::GetPrevious ( void ) const
inline

Get the pointer to the previous object in the list.


Follow the linked list backward and get the item's pointer

Returns
Pointer to the previous Generic object in the list
See also
GetNext(void) const

◆ GetType()

Burger::FileINI::Generic::eType * Burger::FileINI::Generic::GetType ( void ) const
inline

Get the enumeration of the derived class' type.


Returns the enumeration that will identify the type of derived class from Generic this class is. If it's not derived, the value will be LINEENTRY_ROOT

Returns
eType enumeration
See also
eType or Generic

◆ InsertAfter()

void Burger::FileINI::Generic::InsertAfter ( Generic * pGeneric)
inline

Insert this object after this one in the linked list.


Add this object into the linked list AFTER this object. If this is the root object, it's effectively adding the new object to the start of the list.

Parameters
pGenericPointer to the Generic object to insert in the list after this one
See also
InsertBefore(Generic *)

◆ InsertBefore()

void Burger::FileINI::Generic::InsertBefore ( Generic * pGeneric)
inline

Insert this object before this one in the linked list.


Add this object into the linked list BEFORE this object. If this is the root object, it's effectively adding the new object to the end of the list.

Parameters
pGenericPointer to the Generic object to insert in the list before this one
See also
InsertAfter(Generic *)

◆ operator=() [1/2]

Generic & Burger::FileINI::Generic::operator= ( const Generic & )
privatedelete

◆ operator=() [2/2]

Generic & Burger::FileINI::Generic::operator= ( Generic && )
privatedelete

Member Data Documentation

◆ m_eType

eType Burger::FileINI::Generic::m_eType
private

Type of derived class.

◆ m_Link

LinkedListPointer Burger::FileINI::Generic::m_Link
private

Linked list entry.