#include <data_node_functor.h>
Public Types | |
typedef NodeType | node_type |
Public Member Functions | |
data_node_child_serializer (node_type &dest, const std::string &subname) | |
Creates an object for serializing. | |
template<typename SerializableT> bool | operator() (const SerializableT *src) |
Serializes src into a subnode of dest using the name given in this object's ctor. | |
Public Attributes | |
bool | result |
For use as a "return value catcher" for std::for_each(). |
Designed for use with std::for_each().
NodeType must be compatible with s11n::data_node.
Please see the operator() docs for important usage information, especially if you want to use this object outside the context of for_each().
Definition at line 69 of file data_node_functor.h.
|
Creates an object for serializing. Preconditions:
Definition at line 83 of file data_node_functor.h. References s11n::data_node_child_serializer< NodeType >::result. |
|
Serializes src into a subnode of dest using the name given in this object's ctor. Note that during an, e.g., for_each() this object will return false on a failed serialize, and will CONTINUE to return false on additional serializations. This is to avoid the possibility that for_each() fails on the first item of a list, handles 3000 items, and then the whole thing fails because of the first one. Thus, this operator will never process another request once it has returned false ONCE. Definition at line 102 of file data_node_functor.h. References s11n::data_node_child_serializer< NodeType >::operator()(), s11n::data_node_child_serializer< NodeType >::result, and s11n::serialize_subnode(). Referenced by s11n::data_node_child_serializer< NodeType >::operator()(). |
|
For use as a "return value catcher" for std::for_each(). See operator() for how it is set. The starting value is true, which means that looping over an empty list with this object will return a true result (which is the convention in s11n). Definition at line 117 of file data_node_functor.h. Referenced by s11n::data_node_child_serializer< NodeType >::data_node_child_serializer(), and s11n::data_node_child_serializer< NodeType >::operator()(). |