Class that simplifies the creation of yaml strings representing metadata. More...
#include <message_with_metadata.h>
Public Member Functions | |
template<typename T > | |
MetadataString & | add (const std::string &key, const T &value) |
MetadataString () | |
operator std::string () | |
Private Attributes | |
bool | done |
YAML::Emitter | out |
Class that simplifies the creation of yaml strings representing metadata.
Usage: std::string meta = MetadataString().add("foo", "foo-val").add("bar", 42);
Definition at line 83 of file message_with_metadata.h.
warehouse::MetadataString::MetadataString | ( | ) | [inline] |
Definition at line 87 of file message_with_metadata.h.
MetadataString& warehouse::MetadataString::add | ( | const std::string & | key, | |
const T & | value | |||
) | [inline] |
Definition at line 94 of file message_with_metadata.h.
warehouse::MetadataString::operator std::string | ( | ) | [inline] |
Definition at line 103 of file message_with_metadata.h.
bool warehouse::MetadataString::done [private] |
Definition at line 114 of file message_with_metadata.h.
YAML::Emitter warehouse::MetadataString::out [private] |
Definition at line 113 of file message_with_metadata.h.