/usr/include/elektra/keyio.hpp is in libelektra-dev 0.8.7-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #ifndef ELEKTRA_KEY_IO_HPP
#define ELEKTRA_KEY_IO_HPP
#include <key.hpp>
#include <iostream>
namespace kdb
{
/**
* @brief Stream the name of a key
*
* If you also want to stream the value, use the plugin framework.
*
* @param os the stream to write to
* @param k the key which name should be streamed
*
* @return the stream
*/
inline std::ostream & operator << (std::ostream & os, kdb::Key const & k)
{
os << k.getName();
return os;
}
/**
* @brief Reads a line with a keys name
*
* @param is the stream to read from
* @param k the key whose name will be set
*
* @return the stream
*/
inline std::istream & operator >> (std::istream & is, kdb::Key & k)
{
std::string name;
getline(is, name);
k.setName(name);
return is;
}
}
#endif
|