208bool Add(
const char *key, T &val);
224bool Del(
const char *key, T *valP=0);
249bool Enumerate(
void *&jar,
char *&key, T *&val);
277bool Exists(
const char *key);
290bool Get(
const char *key, T &val);
326int Info(
const char *vname,
char *buff=0,
int blen=0);
342bool Rep(
const char *key, T &val, T *valP=0);
404 const char *implName=0)
405 : shMat(0), hashFunc(hFunc), typeID(strdup(typeName)),
406 implID((implName ? strdup(implName) : 0)) {}
413 if (typeID) free(typeID);
414 if (implID) free(implID);
void Detach()
Detach the map from the shared memory.
bool Del(const char *key, T *valP=0)
bool Get(const char *key, T &val)
bool Attach(const char *path, ShMap_Access access, int tmo=-1)
ShMap(const char *typeName, ShMap_Hash_t hFunc=0, const char *implName=0)
bool Enumerate(void *&jar, char *&key, T *&val)
bool Rep(const char *key, T &val, T *valP=0)
bool Sync(SyncOpt dosync, int syncqsz=256)
int Info(const char *vname, char *buff=0, int blen=0)
bool Add(const char *key, T &val)
bool Resize(ShMap_Parms *parms=0)
ShMap_Access
The action parameter that must be passed to the Attach() method.
@ ReadWrite
reading & writing
int(* ShMap_Hash_t)(const char *key)
SyncOpt
Options valid for the Sync() method.
static const int ShMap_4Resize
static const int MultW
Bit options that may be or'd into he options member above.
int maxKeys
Maximum expected keys.
int mode
Mode setting for the newly created file.
int maxKeyLen
Maximum key length.
int reserved
Reserved for future ABI complaint use.
~ShMap_Parms()
Destructor.
static const int ReUse
Reuse map storage.
static const int ForResize
Constructor suitable for Resize() (use ShMap_Parms(ForResize)).
static const int noReUse
Opposite (default for Create)
static const int noMultW
Opposite (default for Create)
int options
Bit or'd ShMop_xxxx options below.
int indexSize
Number of hash table entries to create.
ShMap_Parms()
Constructor suitable for Create()