#include <ALFA_ConfigParams.h>
Definition at line 20 of file ALFA_ConfigParams.h.
◆ ALFA_ConfigParams()
ALFA_ConfigParams::ALFA_ConfigParams |
( |
| ) |
|
◆ ~ALFA_ConfigParams()
ALFA_ConfigParams::~ALFA_ConfigParams |
( |
| ) |
|
|
virtual |
◆ GetMap()
void ALFA_ConfigParams::GetMap |
( |
MAPSTR2STR & |
mapParams | ) |
const |
|
inline |
◆ GetParameter()
const char * ALFA_ConfigParams::GetParameter |
( |
const char * |
szKey | ) |
const |
Definition at line 82 of file ALFA_ConfigParams.cxx.
87 memset(szbuff,0,
sizeof(szbuff));
88 if(szKey) strncpy(szbuff,szKey,
sizeof(szbuff)-1);
91 MAPSTR2STR::const_iterator iter;
93 return (*iter).second.c_str();
◆ GetParamsCnt()
int ALFA_ConfigParams::GetParamsCnt |
( |
| ) |
const |
|
inline |
◆ GetSectionName()
const char* ALFA_ConfigParams::GetSectionName |
( |
| ) |
const |
|
inline |
◆ Init()
int ALFA_ConfigParams::Init |
( |
const char * |
szFile, |
|
|
const char * |
szSection |
|
) |
| |
Definition at line 36 of file ALFA_ConfigParams.cxx.
40 char szbuff[256],szsec[256];
45 if((
pfile=fopen(szFile,
"r"))==
nullptr)
return false;
48 memset(szsec,0,
sizeof(szsec));
49 if(szSection) strncpy(szsec,szSection,
sizeof(szsec)-1);
54 fgets(szbuff,
sizeof(szbuff),
pfile);
55 if(*(szbuff+strlen(szbuff)-1)==
'\n') *(szbuff+strlen(szbuff)-1)=0;
56 if(strcmp(szbuff,szsec) != 0)
continue;
57 else{ bRes=
true;
break; }
66 fgets(szbuff,
sizeof(szbuff),
pfile);
67 if(*szbuff==0 || *szbuff==
' ' || *szbuff==
'\n' || *szbuff==
';')
continue;
68 if(*szbuff==
'[')
break;
69 if((ppv=strchr(szbuff,
'='))==
nullptr)
continue;
71 if(*(szbuff+strlen(szbuff)-1)==
'\n') *(szbuff+strlen(szbuff)-1)=0;
73 m_mapParams.insert(MAPSTR2STR::value_type(szbuff,ppv));
◆ IsKey()
bool ALFA_ConfigParams::IsKey |
( |
const char * |
szKey | ) |
const |
Definition at line 98 of file ALFA_ConfigParams.cxx.
103 memset(szbuff,0,
sizeof(szbuff));
104 if(szKey) strncpy(szbuff,szKey,
sizeof(szbuff)-1);
107 MAPSTR2STR::const_iterator iter;
◆ UnInitialize()
void ALFA_ConfigParams::UnInitialize |
( |
| ) |
|
◆ m_bIsValid
bool ALFA_ConfigParams::m_bIsValid |
|
private |
◆ m_mapParams
◆ m_strSection
std::string ALFA_ConfigParams::m_strSection |
|
private |
The documentation for this class was generated from the following files: