Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::ConfigObject::Section Struct Reference

Section. More...

#include <ConfigUtil.h>

Public Types

using Ptr = std::shared_ptr<Section>
 

Public Member Functions

 Section (std::string name)
 
std::string getValueByKey (const std::string &key, const std::string &default_value) const
 
void setKeyValue (const std::string &key, const std::string &value)
 

Public Attributes

std::string name
 
std::map< std::string, std::string > parameter {}
 

Detailed Description

Member Typedef Documentation

◆ Ptr

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

Constructor & Destructor Documentation

◆ Section()

sese::ConfigObject::Section::Section ( std::string name)
explicit

Member Function Documentation

◆ getValueByKey()

std::string sese::ConfigObject::Section::getValueByKey ( const std::string & key,
const std::string & default_value ) const
nodiscard

Retrieves the value based on the key name

Parameters
keyThe key name
default_valueThe default value
Returns
The corresponding value if the key exists, otherwise returns the default value

◆ setKeyValue()

void sese::ConfigObject::Section::setKeyValue ( const std::string & key,
const std::string & value )

Member Data Documentation

◆ name

std::string sese::ConfigObject::Section::name

◆ parameter

std::map<std::string, std::string> sese::ConfigObject::Section::parameter {}

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