#include <dsApprc.h>
Inheritance diagram for dsApprc:
Public Methods | |
dsApprc () | |
dsApprc (const char *filename) | |
dsApprc (std::istream &is) | |
~dsApprc () | |
void | load (const char *filename) |
void | load (std::istream &is) |
void | dump (std::ostream &os) |
void | set_delimiter (char delim) |
void | set_xlat (int table) |
void | add (const char *key, const char *val) |
void | add (const char *key, int val) |
char * | seek (const char *key) |
char * | seek (const char *key, int idx) |
void | push (const char *key) |
void | push (int array_key) |
void | pop () |
int | getbool (const char *key) |
int | getbool (const char *key, int defval) |
long | getlong (const char *key) |
long | getlong (const char *key, long defval) |
double | getdouble (const char *key) |
double | getdouble (const char *key, double defval) |
char * | getstring (const char *key) |
char * | getstring (const char *key, int idx) |
char * | getstring (const char *key, char *defval) |
Protected Methods | |
int | expand_condition (char *cond) |
char * | expand_var (char *ptr, int *vlen=0) |
void | _add (char *line) |
void | _add2 (const char *key, const char *val) |
char * | trim (char *src) |
void | undefined_key_exception (const char *key) |
Protected Attributes | |
dsHashTable * | _h |
int | _recursion_cnt |
char * | _keyst |
int | _kslen |
char | _key_delim |
int | _xlat_table |
Friends | |
class | dsGetoptMore |
Server-startup-chdir=Yes
you can access it by absolute reference GETB("Server-startup-chdir")
or put into stack commopn prefix and then relate them
PUSH("Server");
PUSH("startup");
GETB("-chdir");
It's also possible to use conditional blocks and variables:
Inside your program:
ADD("Debug","Yes");
Inside resource file:
ADD("TesChdir","No");
.if == Yes && == NO
Server-startup-chdir=No
.endif
My-key=/name
My-env-key=/usr/bin:$/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/samba/bin:/usr/local/sybase-12.5/bin:/usr/java/j2sdk_nb/j2sdk1.4.2/bin:/home/oracle/products/8.1.7/bin:/usr/local/palmdev/bin:/usr/local/qt/bin:/usr/local/wine/bin:/usr/local/vslick8.01/bin:/usr/local/mysql/bin:/usr/local/kde/bin:/usr/local/cocor
My-array-key[]=button1
My-array-key[]=button2
My-array-key[]=button3
|
Build object, but doesn't load rc file |
|
Buid object and load file
|
|
Buid object and load stream
|
|
|
|
|
|
|
|
Add key and value. Already defined keys will be redefined.
|
|
Add key and value. Already defined keys will be redefined.
|
|
Output existing keys to stream
|
|
|
|
|
|
Find a key, convert it's value to boolean. Recognised formats Yes/No, True/False,1/0 if key not defined return default value
|
|
Find a key, convert it's value to boolean. Recognised formats Yes/No, True/False,1/0 See Also: GETB()
|
|
Find a key, convert it's value to double. if key not defined return default value
|
|
Find a key, convert it's value to double. See Also: GETD()
|
|
Find a key, convert it's value to long. if key not defined return default value
|
|
Find a key, convert it's value to long. See Also: GETL()
|
|
Find a key, return found value. if key not defined return default value
|
|
Find an array key, return found value See Also: GET()
|
|
Find a key, return found value See Also: GET()
|
|
Load and parse data from stream already loaded data will be overwritten
|
|
Load and parse data from file already loaded data will be overwritten
|
|
Remove topmoust common prefix from stack
|
|
Push array index into key stack to refer array item
|
|
Push common prefix into key stack All keys begins from - will refer to stack
|
|
Find an element of array
|
|
Find a key
|
|
Set delemiter of key parts. Default is hiphen '-'
|
|
Set encoding translation, see xlat.h Default is none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|