Elektra  0.9.6
Namespaces | Classes | Typedefs | Functions
kdb Namespace Reference

This is the main namespace for the C++ binding and libraries. More...

Namespaces

 tools
 This namespace is for the libtool library.
 

Classes

class  KDB
 Constructs a class KDB. More...
 
class  Context
 Provides a context for configuration. More...
 
class  ThreadSubject
 Subject from Observer pattern for ThreadContext. More...
 
struct  PerContext
 A data structure that is stored by context inside the Coordinator. More...
 
class  Coordinator
 Thread safe coordination of ThreadContext per Threads. More...
 
class  none_t
 This type is being used as bottom type that always fails. More...
 
class  Layer
 Base class for all layers. More...
 
class  Wrapped
 Everything implementing this interface can be used as layer. More...
 
class  ValueObserver
 Base class for values to be observed. More...
 
struct  Command
 Used by contexts for callbacks (to run code using a mutex). More...
 
class  DefaultGetPolicy
 Implements lookup with spec. More...
 
class  DefaultSetPolicy
 Implements creating user:/ key when key is not found. More...
 
class  GetPolicyIs
 Needed by the user to set one of the policies. More...
 
class  SetPolicyIs
 Needed by the user to set one of the policies. More...
 
class  ContextPolicyIs
 Needed by the user to set one of the policies. More...
 
class  WritePolicyIs
 Needed by the user to set one of the policies. More...
 
class  ObserverPolicyIs
 Needed by the user to set one of the policies. More...
 
class  LockPolicyIs
 Needed by the user to set one of the policies. More...
 
class  Key
 Key is an essential class that encapsulates key name , value and metainfo . More...
 
class  NameIterator
 For C++ forward Iteration over Names. More...
 
class  NameReverseIterator
 For C++ reverse Iteration over Names. More...
 
struct  VaAlloc
 Needed to avoid constructor ambiguity. More...
 
class  KeySet
 A keyset holds together a set of keys. More...
 
class  KeySetIterator
 For C++ forward Iteration over KeySets. More...
 
class  KeySetReverseIterator
 For C++ reverse Iteration over KeySets. More...
 

Typedefs

typedef std::unordered_map< std::string, LayerAction > LayerMap
 A vector of layers.
 

Functions

int goptsContract (kdb::KeySet &contract, int argc, const char *const *argv, const char *const *envp, const kdb::Key &parentKey, kdb::KeySet &goptsConfig)
 
int goptsContract (kdb::KeySet &contract, const std::string &argsString, const std::string &envString, const kdb::Key &parentKey, kdb::KeySet &goptsConfig)
 Prefer to use goptsContract with argc, argv and envp if possible (especially when you are calling this in your main function) More...
 
int goptsContract (kdb::KeySet &contract, const std::vector< std::string > &args, const std::vector< std::string > &env, const kdb::Key &parentKey, kdb::KeySet &goptsConfig)
 Prefer to use goptsContract with argc, argv and envp if possible (especially when you are calling this in your main function) More...
 
bool operator< (ValueObserver const &lhs, ValueObserver const &rhs)
 Needed to put a ValueObserver in a map. More...
 
std::ostream & operator<< (std::ostream &os, kdb::Key const &k)
 Stream the name of a key. More...
 
std::istream & operator>> (std::istream &is, kdb::Key &k)
 Reads a line with a keys name. More...
 
std::ostream & operator<< (std::ostream &os, kdb::KeySet const &cks)
 Outputs line per line the keynames. More...
 
std::istream & operator>> (std::istream &is, kdb::KeySet &ks)
 Reads line per line key names and appends those keys to ks. More...
 

Detailed Description

This is the main namespace for the C++ binding and libraries.

Classes or Functions directly below this namespace are header-only. Sub namespaces are intended for libraries and you need to link the library if you want to use them.

Function Documentation

◆ goptsContract() [1/3]

int kdb::goptsContract ( kdb::KeySet contract,
const std::string &  argsString,
const std::string &  envString,
const kdb::Key parentKey,
kdb::KeySet goptsConfig 
)
inline

Prefer to use goptsContract with argc, argv and envp if possible (especially when you are calling this in your main function)

This function mainly exists for use from language bindings.

See also
elektraGOptsContractFromStrings

◆ goptsContract() [2/3]

int kdb::goptsContract ( kdb::KeySet contract,
const std::vector< std::string > &  args,
const std::vector< std::string > &  env,
const kdb::Key parentKey,
kdb::KeySet goptsConfig 
)
inline

Prefer to use goptsContract with argc, argv and envp if possible (especially when you are calling this in your main function)

This function mainly exists for use from language bindings.

See also
elektraGOptsContractFromStrings

◆ goptsContract() [3/3]

int kdb::goptsContract ( kdb::KeySet contract,
int  argc,
const char *const *  argv,
const char *const *  envp,
const kdb::Key parentKey,
kdb::KeySet goptsConfig 
)
inline

◆ operator<()

bool kdb::operator< ( ValueObserver const &  lhs,
ValueObserver const &  rhs 
)
inline

Needed to put a ValueObserver in a map.

Returns
Comparison result

◆ operator<<() [1/2]

std::ostream& kdb::operator<< ( std::ostream &  os,
kdb::Key const &  k 
)
inline

Stream the name of a key.

Use setf(std::ios_base::showbase) on the stream if you want to also output all metakeys (warning, cannot be parsed back!)

If you also want to stream the value, use the plugin framework.

Parameters
osthe stream to write to
kthe key which name should be streamed
Returns
the stream

◆ operator<<() [2/2]

std::ostream& kdb::operator<< ( std::ostream &  os,
kdb::KeySet const &  cks 
)
inline

Outputs line per line the keynames.

To output values you should use the plugin framework.

Parameters
osthe stream to write to
cksthe keyset which should be streamed

Use unsetf(std::ios_base::skipws) or use noskipws iomanip on the stream if you want a null terminated sequence of key names.

Use setf(std::ios_base::unitbuf) on the stream if you want to flush the buffer after each key.

Returns
the stream

◆ operator>>() [1/2]

std::istream& kdb::operator>> ( std::istream &  is,
kdb::Key k 
)
inline

Reads a line with a keys name.

Parameters
isthe stream to read from
kthe key whose name will be set

Use unsetf(std::ios_base::skipws) on the stream if the keyname is terminated with an null character and not a newline.

Returns
the stream

◆ operator>>() [2/2]

std::istream& kdb::operator>> ( std::istream &  is,
kdb::KeySet ks 
)
inline

Reads line per line key names and appends those keys to ks.

To input values you need to use the plugin framework.

Parameters
isthe stream to read from
ksthe keyset to append to
Returns
the stream