#include <data_node_format.hpp>
Public Types | |
typedef NodeType | node_type |
typedef node_type::value_type | pair_type |
typedef std::map < std::string, std::string > | entity_translation_map |
Public Member Functions | |
key_value_serializer (const entity_translation_map *map, std::ostream &dest, const std::string &prefix, const std::string &separator, const std::string &suffix) | |
map: needed so we can do entity translation in a unified manner here. | |
void | operator() (const pair_type &src) const |
Sends the following formatted string to os:. |
Intended for use by Serializers, not Serializables.
NodeType is the container type used for data serialization (e.g. s11n::data_node).
Definition at line 717 of file data_node_format.hpp.
typedef NodeType s11n::io::key_value_serializer< NodeType >::node_type |
Definition at line 720 of file data_node_format.hpp.
typedef node_type::value_type s11n::io::key_value_serializer< NodeType >::pair_type |
Definition at line 721 of file data_node_format.hpp.
typedef std::map<std::string,std::string> s11n::io::key_value_serializer< NodeType >::entity_translation_map |
Definition at line 723 of file data_node_format.hpp.
s11n::io::key_value_serializer< NodeType >::key_value_serializer | ( | const entity_translation_map * | map, | |
std::ostream & | dest, | |||
const std::string & | prefix, | |||
const std::string & | separator, | |||
const std::string & | suffix | |||
) | [inline] |
map: needed so we can do entity translation in a unified manner here.
It must outlive this object. Pass it 0 for no translation. Translations are only applied on VALUES, not KEYS.
prefix: inserted before each property.
separator: inserted between the key and value.
suffix: appended after each entry.
Definition at line 740 of file data_node_format.hpp.
void s11n::io::key_value_serializer< NodeType >::operator() | ( | const pair_type & | src | ) | const [inline] |
Sends the following formatted string to os:.
{prefix}{src.first}{separator}{src.second}{suffix}
Definition at line 756 of file data_node_format.hpp.
References s11n::io::strtool::to(), s11n::io::strtool::translate_entities(), and s11n::val().