48 #ifndef CCXX_MISSING_H_ 52 #ifndef CCXX_THREAD_H_ 56 #define KEYDATA_INDEX_SIZE 97 57 #define KEYDATA_PAGER_SIZE 512 61 #define KEYDATA_PATH_SIZE 512 63 #define KEYDATA_PATH_SIZE PATH_MAX 66 #define KEYDATA_PATH_SIZE 256 69 #ifdef CCXX_NAMESPACES 115 virtual void* first(
size_t size);
124 virtual void* alloc(
size_t size);
135 char* first(
char *str);
146 char* alloc(
const char *str);
197 typedef struct frame {
219 void *push(
const void *
object,
size_t size);
227 void *push(
const char *
string);
272 void* first(
size_t size);
280 void* alloc(
size_t size);
382 static std::ifstream *cfgFile;
397 unsigned getIndex(
const char *sym);
400 Keysym* getSymbol(
const char *sym,
bool create);
414 void load(
const char *keypath);
429 void loadPrefix(
const char *prefix,
const char *keypath);
440 void loadFile(
const char *filepath,
const char *keys = NULL,
const char *pre = NULL);
499 int getCount(
const char *sym);
508 const char* getFirst(
const char *sym);
517 const char* getLast(
const char *sym);
525 bool isKey(
const char *sym);
534 const char *getString(
const char *sym,
const char *def = NULL);
543 long getLong(
const char *sym,
long def = 0);
551 bool getBool(
const char *key);
560 double getDouble(
const char *key,
double def = 0.);
570 unsigned getIndex(
char **data,
unsigned max);
578 unsigned getCount(
void);
588 void setValue(
const char *sym,
const char *data);
597 const char *
const* getList(
const char *sym);
605 void clrValue(
const char *sym);
612 {
return getLast(keyword);};
617 static void end(
void);
643 inline void *
operator new(
size_t size,
MemPager &pager)
644 {
return pager.alloc(size);};
652 inline void *
operator new[](
size_t size,
MemPager &pager)
653 {
return pager.alloc(size);};
658 inline void operator delete(
void *) {};
663 inline void operator delete[](
void *) {};
691 virtual void *getMemory(
size_t size) = 0;
694 void *getPointer(
const char *
id)
const;
695 void setPointer(
const char *
id,
void *data);
748 void set(
unsigned limit);
772 virtual void ready(
void) = 0;
791 #ifdef CCXX_NAMESPACES
short count
Definition: misc.h:368
This is a generic and portable string class.
Definition: string.h:77
Keyval * data
Definition: misc.h:366
Keyval * next
Definition: misc.h:360
#define KEYDATA_INDEX_SIZE
Definition: misc.h:56
const char * operator[](const char *keyword)
A convient notation for accessing the keydata as an associative array of keyword/value pairs through ...
Definition: misc.h:611
#define __EXPORT
Definition: config.h:980
Keydata objects are used to load and hold "configuration" data for a given application.
Definition: misc.h:352
substitute functions which may be missing in target platform libc.
class __EXPORT Runable
Definition: misc.h:74
Keysym * next
Definition: misc.h:365
#define KEYDATA_PATH_SIZE
Definition: misc.h:66
const char * keyword
Definition: misc.h:373
Synchronization and threading services.
const char * value
Definition: misc.h:374
const char ** list
Definition: misc.h:367
This class is used to associate (object) pointers with named strings.
Definition: misc.h:674
unsigned used
Definition: misc.h:714
static void end(void)
static member to end keydata i/o allocations.
class __EXPORT Runlist
Definition: misc.h:73
The Mutex class is used to protect a section of code so that at any given time only a single thread c...
Definition: thread.h:186
A runlist is used to restrict concurrent exection to a limited set of concurrent sessions, much like a semaphore.
Definition: misc.h:708
__EXPORT void endKeydata(void)
Definition: misc.h:623
A container for objects that can be queued against a runlist.
Definition: misc.h:757