Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CFileIni Class Reference

#include <CFileIni.hpp>

Public Member Functions

 CFileIni ()
 
 CFileIni (std::string pathFile)
 
 CFileIni (const CFileIni &other)=delete
 
 CFileIni (CFileIni &&other)=delete
 
virtual ~CFileIni ()
 
CFileInioperator= (const CFileIni &other)=delete
 
CFileInioperator= (CFileIni &&other)=delete
 
bool readFile ()
 
bool saveFile () const
 
bool deleteKey (const std::string &section, const std::string &key)
 
bool deleteSection (const std::string &section)
 
bool getValueBoolean (std::string_view section, std::string_view key, bool defaultValue=false) const
 
double getValueDouble (std::string_view section, std::string_view key, double defaultValue=0.0) const
 
std::set< std::string > getValueList (std::string_view section, std::string_view key, std::string_view defaultValue, char delimiter) const
 
int64_t getValueLong (std::string_view section, std::string_view key, int64_t defaultValue=0) const
 
std::string getValueString (std::string_view section, std::string_view key, const std::string &defaultValue="") const
 
bool setValueBoolean (std::string_view section, std::string_view key, bool value)
 
bool setValueDouble (std::string_view section, std::string_view key, double value)
 
bool setValueList (std::string_view section, std::string_view key, const std::set< std::string > &list, char delimiter)
 
bool setValueLong (std::string_view section, std::string_view key, int64_t value)
 
bool setValueString (std::string_view section, std::string_view key, const std::string &value)
 
bool existsSection (std::string_view section)
 

Private Attributes

std::string m_pathFile
 
CSimpleIniA m_ini
 

Constructor & Destructor Documentation

◆ CFileIni() [1/4]

CFileIni::CFileIni ( )
default

◆ CFileIni() [2/4]

CFileIni::CFileIni ( std::string pathFile)
explicit

Construct class CConfig

Parameters
pathFilePath where file config is

◆ CFileIni() [3/4]

CFileIni::CFileIni ( const CFileIni & other)
delete

◆ CFileIni() [4/4]

CFileIni::CFileIni ( CFileIni && other)
delete

◆ ~CFileIni()

CFileIni::~CFileIni ( )
virtual

Destructor class CConfig

Member Function Documentation

◆ deleteKey()

bool CFileIni::deleteKey ( const std::string & section,
const std::string & key )

◆ deleteSection()

bool CFileIni::deleteSection ( const std::string & section)

◆ existsSection()

bool CFileIni::existsSection ( std::string_view section)

◆ getValueBoolean()

bool CFileIni::getValueBoolean ( std::string_view section,
std::string_view key,
bool defaultValue = false ) const
nodiscard

◆ getValueDouble()

double CFileIni::getValueDouble ( std::string_view section,
std::string_view key,
double defaultValue = 0.0 ) const
nodiscard

◆ getValueList()

std::set< std::string > CFileIni::getValueList ( std::string_view section,
std::string_view key,
std::string_view defaultValue,
char delimiter ) const
nodiscard

◆ getValueLong()

int64_t CFileIni::getValueLong ( std::string_view section,
std::string_view key,
int64_t defaultValue = 0 ) const
nodiscard

◆ getValueString()

std::string CFileIni::getValueString ( std::string_view section,
std::string_view key,
const std::string & defaultValue = "" ) const
nodiscard

◆ operator=() [1/2]

CFileIni & CFileIni::operator= ( CFileIni && other)
delete

◆ operator=() [2/2]

CFileIni & CFileIni::operator= ( const CFileIni & other)
delete

◆ readFile()

bool CFileIni::readFile ( )

◆ saveFile()

bool CFileIni::saveFile ( ) const
nodiscard

◆ setValueBoolean()

bool CFileIni::setValueBoolean ( std::string_view section,
std::string_view key,
bool value )

◆ setValueDouble()

bool CFileIni::setValueDouble ( std::string_view section,
std::string_view key,
double value )

◆ setValueList()

bool CFileIni::setValueList ( std::string_view section,
std::string_view key,
const std::set< std::string > & list,
char delimiter )

◆ setValueLong()

bool CFileIni::setValueLong ( std::string_view section,
std::string_view key,
int64_t value )

◆ setValueString()

bool CFileIni::setValueString ( std::string_view section,
std::string_view key,
const std::string & value )

Member Data Documentation

◆ m_ini

CSimpleIniA CFileIni::m_ini
private

◆ m_pathFile

std::string CFileIni::m_pathFile
private

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