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);
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);
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
#define KEYDATA_INDEX_SIZE
substitute functions which may be missing in target platform libc.
static void end(void)
static member to end keydata i/o allocations.
The Mutex class is used to protect a section of code so that at any given time only a single thread c...
This class is used to associate (object) pointers with named strings.
#define KEYDATA_PATH_SIZE
This is a generic and portable string class.
__EXPORT void endKeydata(void)
static std::ifstream * cfgFile
Keydata objects are used to load and hold "configuration" data for a given application.
Synchronization and threading services.
const char * operator[](const char *keyword)
A convient notation for accessing the keydata as an associative array of keyword/value pairs through ...
A runlist is used to restrict concurrent exection to a limited set of concurrent sessions, much like a semaphore.
A container for objects that can be queued against a runlist.