Elektra  0.8.4
Data Structures | Functions
kdb Namespace Reference

See examples/cpp_example_userexception.cpp for how to use USER_DEFINED_EXEPTIONS. More...

Data Structures

class  KDB
 Opens the session with the Key database. More...
 
class  Key
 A Key is the essential class that encapsulates key name , value and metainfo . More...
 
class  KeySet
 A keyset holds together a set of keys. More...
 

Functions

std::ostream & operator<< (std::ostream &os, kdb::Key const &k)
 Stream a the name of a key.
 
std::istream & operator>> (std::istream &is, kdb::Key &k)
 Reads a line with a keys name.
 
std::ostream & operator<< (std::ostream &os, kdb::KeySet const &cks)
 Outputs line per line the keynames.
 
std::istream & operator>> (std::istream &is, kdb::KeySet &ks)
 Reads line per line key names and appends those keys to ks.
 

Detailed Description

See examples/cpp_example_userexception.cpp for how to use USER_DEFINED_EXEPTIONS.

See examples/cpp_example_userio.cpp for how to use USER_DEFINED_IO.

Function Documentation

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

Stream a the name of a key.

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
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
Returns
the stream
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
Returns
the stream
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