3 #ifndef __IniSection_hpp
4 #define __IniSection_hpp
7 #include <mix/Exceptions.h>
49 const char* szSectionName);
84 int** err_lines = NULL);
93 virtual int count ()
const;
115 virtual int n2i (
const char* name,
116 int start_index = 0)
const;
120 virtual void remove (
int i);
128 virtual const char*
get_value (
const char* name)
const;
133 int def_value = 0)
const;
135 #ifdef CompilerIs64bitReady
139 long long get_int8_value (
const char* name,
140 long long def_value = 0LL)
const;
147 double def_value = 0.0)
const;
150 const char*
operator() (
const char* name)
const;
174 virtual void add (
const char* name,
const char* value);
177 void add (
const char* name,
int v);
179 #ifdef CompilerIs64bitReady
181 void add (
const char* name,
long long v);
185 void add (
const char* name,
double v);
190 virtual void put (
const char* name,
const char* value);
193 void put (
const char* name,
int v);
195 #ifdef CompilerIs64bitReady
197 void put (
const char* name,
long long v);
201 void put (
const char* name,
double v);
234 Throw(ERROR__OUT_OF_RANGE);
249 Throw(ERROR__OUT_OF_RANGE);
OptionBase ob
Definition: IniSection.hpp:218
void set_section_name(const char *name)
Class for operating with one section of ini-file.
Definition: IniSection.hpp:43
virtual int count() const
virtual char * fetch_value(const char *name)
Definition: IniSection.hpp:208
MergeMode
Definition: IniSection.hpp:204
virtual const char * get_value(const char *name) const
virtual void put(const char *name, const char *value)
virtual int n2i(const char *name, int start_index=0) const
char * section_name
Definition: IniSection.hpp:224
char * section_type
Definition: IniSection.hpp:221
virtual void add(const char *name, const char *value)
const char * get_section_name() const
Definition: IniSection.hpp:205
Definition: IniSection.hpp:207
int get_int_value(const char *name, int def_value=0) const
const char * get_section_type() const
virtual OptionItem ** match(const char *word)
OptionItem & operator[](int i)
Definition: IniSection.hpp:245
virtual char * make_text() const
void merge(const IniSection &ini_sect, MergeMode mode=AppendAll)
const OptionItem & operator()(int i) const
Definition: IniSection.hpp:230
Definition: IniSection.hpp:206
virtual OptionItem * fetch(int i)
double get_double_value(const char *name, double def_value=0.0) const
IniSection(const char *szSectionType, const char *szSectionName)
virtual void parse_text(const char *text, int **err_lines=NULL)