Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
ost::DynamicKeydata Class Reference

Bayonne specific dynamic keydata class. More...

#include <bayonne.h>

Inheritance diagram for ost::DynamicKeydata:
Inheritance graph
[legend]
Collaboration diagram for ost::DynamicKeydata:
Collaboration graph
[legend]

Public Member Functions

 DynamicKeydata (const char *keypath, Keydata::Define *def=NULL, const char *homepath=NULL)
 
const char * getString (const char *key, char *buf, size_t size)
 
long getValue (const char *key)
 
bool isKey (const char *key)
 
bool getBoolean (const char *key)
 
void readLock (void)
 Aquire a read lock for the current object. More...
 
void writeLock (void)
 Aquire a write lock for the current object. More...
 
bool tryReadLock (void)
 Attempt read lock for current object. More...
 
bool tryWriteLock (void)
 Attempt write lock for current object. More...
 
void unlock (void)
 Release any held locks. More...
 

Static Public Member Functions

static void reload (void)
 

Protected Member Functions

virtual void updateConfig (Keydata *keydata)
 

Private Member Functions

void loadConfig (void)
 

Private Attributes

DynamicKeydatanextConfig
 
const char * keypath
 
const char * homepath
 
Keydatakeys
 
Keydata::Definedefkeys
 

Static Private Attributes

static DynamicKeydatafirstConfig
 

Friends

class __EXPORT BayonneConfig
 
class __EXPORT ReconfigKeydata
 

Detailed Description

Bayonne specific dynamic keydata class.

This class is used for keydata items which can be reloaded from the config file during runtime. The normal Bayonne "reload" operatio will be used for this purpose.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org Dynamically reloadable key data class.

Definition at line 183 of file bayonne.h.

Constructor & Destructor Documentation

ost::DynamicKeydata::DynamicKeydata ( const char *  keypath,
Keydata::Define def = NULL,
const char *  homepath = NULL 
)

Member Function Documentation

bool ost::DynamicKeydata::getBoolean ( const char *  key)
const char* ost::DynamicKeydata::getString ( const char *  key,
char *  buf,
size_t  size 
)
long ost::DynamicKeydata::getValue ( const char *  key)
bool ost::DynamicKeydata::isKey ( const char *  key)
void ost::DynamicKeydata::loadConfig ( void  )
private
void ThreadLock::readLock ( void  )
inherited

Aquire a read lock for the current object.

static void ost::DynamicKeydata::reload ( void  )
static
bool ThreadLock::tryReadLock ( void  )
inherited

Attempt read lock for current object.

Returns
true on success.
bool ThreadLock::tryWriteLock ( void  )
inherited

Attempt write lock for current object.

Returns
true on success.
void ThreadLock::unlock ( void  )
inherited

Release any held locks.

virtual void ost::DynamicKeydata::updateConfig ( Keydata keydata)
protectedvirtual
void ThreadLock::writeLock ( void  )
inherited

Aquire a write lock for the current object.

Friends And Related Function Documentation

friend class __EXPORT BayonneConfig
friend

Definition at line 186 of file bayonne.h.

friend class __EXPORT ReconfigKeydata
friend

Definition at line 187 of file bayonne.h.

Field Documentation

Keydata::Define* ost::DynamicKeydata::defkeys
private

Definition at line 193 of file bayonne.h.

DynamicKeydata* ost::DynamicKeydata::firstConfig
staticprivate

Definition at line 188 of file bayonne.h.

const char* ost::DynamicKeydata::homepath
private

Definition at line 191 of file bayonne.h.

const char* ost::DynamicKeydata::keypath
private

Definition at line 190 of file bayonne.h.

Keydata* ost::DynamicKeydata::keys
private

Definition at line 192 of file bayonne.h.

DynamicKeydata* ost::DynamicKeydata::nextConfig
private

Definition at line 189 of file bayonne.h.


The documentation for this class was generated from the following file: