Sese Framework  3.0.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::ConfigObject Class Reference

Traditional configuration file class. More...

#include <ConfigUtil.h>

Classes

struct  Section
 Section. More...
 

Public Types

using Ptr = std::shared_ptr<ConfigObject>
 

Public Member Functions

 ConfigObject ()
 
Section::Ptr getDefaultSection () const noexcept
 
Section::Ptr getSectionByName (const std::string &section_name) const
 
void setSection (const Section::Ptr &section)
 
const std::map< std::string, Section::Ptr > & getAllSection () const
 

Private Attributes

Section::Ptr defaultSection
 
std::map< std::string, Section::Ptrsections
 

Detailed Description

Traditional configuration file class.

Member Typedef Documentation

◆ Ptr

using sese::ConfigObject::Ptr = std::shared_ptr<ConfigObject>

Constructor & Destructor Documentation

◆ ConfigObject()

sese::ConfigObject::ConfigObject ( )

Member Function Documentation

◆ getAllSection()

const std::map< std::string, Section::Ptr > & sese::ConfigObject::getAllSection ( ) const
nodiscard

◆ getDefaultSection()

Section::Ptr sese::ConfigObject::getDefaultSection ( ) const
inlinenodiscardnoexcept

References defaultSection.

◆ getSectionByName()

Section::Ptr sese::ConfigObject::getSectionByName ( const std::string & section_name) const
nodiscard

Retrieves the section based on the section name

Parameters
section_nameThe name of the section
Returns
Returns a pointer to the section if it exists, otherwise returns nullptr

◆ setSection()

void sese::ConfigObject::setSection ( const Section::Ptr & section)

Member Data Documentation

◆ defaultSection

Section::Ptr sese::ConfigObject::defaultSection
private

Referenced by getDefaultSection().

◆ sections

std::map<std::string, Section::Ptr> sese::ConfigObject::sections
private

The documentation for this class was generated from the following file: