Pioneer
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IniConfig Class Reference

#include <IniConfig.h>

Inheritance diagram for IniConfig:
Inheritance graph
[legend]
Collaboration diagram for IniConfig:
Collaboration graph
[legend]

Public Types

typedef std::map< std::string, std::string > MapType
 
typedef std::map< std::string, MapTypeSectionMapType
 

Public Member Functions

 IniConfig ()=default
 
void Read (FileSystem::FileSource &fs, const std::string &path)
 
bool Write (FileSystem::FileSourceFS &fs, const std::string &path)
 
bool Save ()
 
void SetInt (const std::string &section, const std::string &key, int val)
 
void SetFloat (const std::string &section, const std::string &key, float val)
 
void SetString (const std::string &section, const std::string &key, const std::string &val)
 
int Int (const std::string &section, const std::string &key, int defval) const
 
float Float (const std::string &section, const std::string &key, float defval) const
 
std::string String (const std::string &section, const std::string &key, const std::string &defval) const
 
void SetInt (const std::string &key, int val)
 
void SetFloat (const std::string &key, float val)
 
void SetString (const std::string &key, const std::string &val)
 
int Int (const std::string &key, int defval=0) const
 
float Float (const std::string &key, float defval=0.0f) const
 
std::string String (const std::string &key, const std::string &defval=std::string()) const
 
bool HasSection (const std::string &section) const
 
bool HasEntry (const std::string &section, const std::string &key) const
 
bool HasEntry (const std::string &key) const
 
SectionMapTypeGetSections ()
 

Protected Member Functions

void Read (const FileSystem::FileData &data)
 

Protected Attributes

SectionMapType m_map
 
FileSystem::FileSourceFSm_fs = nullptr
 
std::string m_path
 

Member Typedef Documentation

◆ MapType

typedef std::map<std::string, std::string> IniConfig::MapType

◆ SectionMapType

typedef std::map<std::string, MapType> IniConfig::SectionMapType

Constructor & Destructor Documentation

◆ IniConfig()

IniConfig::IniConfig ( )
default

Member Function Documentation

◆ Float() [1/2]

float IniConfig::Float ( const std::string &  key,
float  defval = 0.0f 
) const
inline
Here is the call graph for this function:

◆ Float() [2/2]

float IniConfig::Float ( const std::string &  section,
const std::string &  key,
float  defval 
) const
Here is the call graph for this function:

◆ GetSections()

SectionMapType & IniConfig::GetSections ( )
inline

◆ HasEntry() [1/2]

bool IniConfig::HasEntry ( const std::string &  key) const
inline
Here is the call graph for this function:

◆ HasEntry() [2/2]

bool IniConfig::HasEntry ( const std::string &  section,
const std::string &  key 
) const
inline

◆ HasSection()

bool IniConfig::HasSection ( const std::string &  section) const
inline

◆ Int() [1/2]

int IniConfig::Int ( const std::string &  key,
int  defval = 0 
) const
inline
Here is the call graph for this function:

◆ Int() [2/2]

int IniConfig::Int ( const std::string &  section,
const std::string &  key,
int  defval 
) const
Here is the call graph for this function:

◆ Read() [1/2]

void IniConfig::Read ( const FileSystem::FileData data)
protected
Here is the call graph for this function:

◆ Read() [2/2]

void IniConfig::Read ( FileSystem::FileSource fs,
const std::string &  path 
)
Here is the call graph for this function:

◆ Save()

bool IniConfig::Save ( )
Here is the call graph for this function:

◆ SetFloat() [1/2]

void IniConfig::SetFloat ( const std::string &  key,
float  val 
)
inline
Here is the call graph for this function:

◆ SetFloat() [2/2]

void IniConfig::SetFloat ( const std::string &  section,
const std::string &  key,
float  val 
)
Here is the call graph for this function:

◆ SetInt() [1/2]

void IniConfig::SetInt ( const std::string &  key,
int  val 
)
inline
Here is the call graph for this function:

◆ SetInt() [2/2]

void IniConfig::SetInt ( const std::string &  section,
const std::string &  key,
int  val 
)
Here is the call graph for this function:

◆ SetString() [1/2]

void IniConfig::SetString ( const std::string &  key,
const std::string &  val 
)
inline
Here is the call graph for this function:

◆ SetString() [2/2]

void IniConfig::SetString ( const std::string &  section,
const std::string &  key,
const std::string &  val 
)

◆ String() [1/2]

std::string IniConfig::String ( const std::string &  key,
const std::string &  defval = std::string() 
) const
inline
Here is the call graph for this function:

◆ String() [2/2]

std::string IniConfig::String ( const std::string &  section,
const std::string &  key,
const std::string &  defval 
) const

◆ Write()

bool IniConfig::Write ( FileSystem::FileSourceFS fs,
const std::string &  path 
)
Here is the call graph for this function:

Member Data Documentation

◆ m_fs

FileSystem::FileSourceFS* IniConfig::m_fs = nullptr
protected

◆ m_map

SectionMapType IniConfig::m_map
protected

◆ m_path

std::string IniConfig::m_path
protected

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