s11nlite.hpp File Reference

#include <memory>
#include <iterator>
#include <s11n.net/s11n/s11n.hpp>
#include <s11n.net/s11n/io/data_node_io.hpp>
#include <s11n.net/s11n/client_api.hpp>
#include <s11n.net/s11n/export.hpp>

Go to the source code of this file.

Classes

struct  s11nlite::save_binary_f
 A binary functor to save s-nodes and Serializables using s11nlite::save(). More...
struct  s11nlite::save_string_unary_f
 A functor which forwards to s11nlite::save(node_type,string). More...
struct  s11nlite::save_stream_unary_f
 A unary functor which forwards to s11nlite::save(node_type|SerializableT,ostream). More...
struct  s11nlite::save_nullary_base_f< T, OutputT >
 An "implementation detail" nullary functor type to simplify implementations of save_xxx_nullary_f. More...
struct  s11nlite::save_node_string_nullary_f
 A nullary functor forwarding to s11nlite::save(node,string). More...
struct  s11nlite::save_node_stream_nullary_f
 A nullary functor forwarding to s11nlite::save(node,string). More...
struct  s11nlite::save_serializable_string_nullary_f< SerT >
 A nullary functor forwarding to s11nlite::save(SerT,string). More...
struct  s11nlite::save_serializable_stream_nullary_f< SerT >
 A nullary functor forwarding to s11nlite::save(Serializable,ostream). More...
struct  s11nlite::load_node_stream_nullary_f
 A nullary functor to call s11nlite::load_node(istream&). More...
struct  s11nlite::load_node_nullary_string_f
 A nullary functor to call s11nlite::load_node(string). More...
struct  s11nlite::load_node_unary_f
 A unary functor to call s11nlite::load_node(string|stream). More...

Namespaces

namespace  s11nlite
 

s11nlite is a simplified subset of the s11n interface, combining the APIs from the core and the s11n::io namespace into a single API.


Defines

#define S11N_LITE_H_INCLUDED   1
#define s11n_S11NLITE_INCLUDED   1

Typedefs

typedef client_api
< s11n::s11n_node
s11nlite::client_interface
 client_interface defines the interface used/returned by the instance() functions.
typedef client_interface::node_type s11nlite::node_type
 node_type is the type used to store/load a Serializable object's data.
typedef
client_interface::node_traits 
s11nlite::node_traits
 The s11n::node_traits type for node_type.
typedef
client_interface::serializer_interface 
s11nlite::serializer_interface
 This is the base-most type of the serializers used by s11nlite.

Functions

S11N_EXPORT_API client_interface & s11nlite::instance ()
 Returns the client_interface object used by the s11nlite API.
void s11nlite::instance (client_interface *newinstance)
 Sets the client_interface object used by the s11nlite API.
serializer_interface * s11nlite::create_serializer ()
 Returns a new instance of the default serializer class.
serializer_interface * s11nlite::create_serializer (const std::string &classname)
 Returns a new instance of the given serializer class, or 0 if one could not be loaded.
void s11nlite::serializer_class (const std::string &)
 Sets the current Serializer class used by s11nlite's create_serializer().
std::string s11nlite::serializer_class ()
 Gets the name of the current Serializer type.
node_type * s11nlite::find_child (node_type &parent, const std::string subnodename)
 A non-const overload.
const node_type * s11nlite::find_child (const node_type &parent, const std::string subnodename)
 Equivalent to s11n::find_child_by_name( parent, subnodename ).
template<typename SerializableType >
bool s11nlite::serialize (node_type &dest, const SerializableType &src)
 See s11n::serialize().
template<typename SerializableType >
bool s11nlite::serialize_subnode (node_type &dest, const std::string &subnodename, const SerializableType &src)
 See s11n::serialize().
bool s11nlite::save (const node_type &src, std::ostream &dest)
 Saves the given node to the given ostream using the default serializer type.
bool s11nlite::save (const node_type &src, const std::string &filename)
 Saves the given node to the given filename using the default serializer type.
template<typename SerializableType >
bool s11nlite::save (const SerializableType &src, std::ostream &dest)
 Saves the given Serializable to the given ostream using the default serializer type.
template<typename SerializableType >
bool s11nlite::save (const SerializableType &src, const std::string &dest)
 Saves the given Serializable to the given filename using the default serializer type.
node_type * s11nlite::load_node (const std::string &src)
 Tries to load a node from the given filename.
node_type * s11nlite::load_node (std::istream &src)
 Tries to load a node from the given input stream.
bool s11nlite::load_node (const std::string &src, node_type &dest)
 Tries to load a node_type from the given source.
bool s11nlite::load_node (std::istream &src, node_type &dest)
 Overloaded form taking an input stream instead of a string.
template<typename SerializableType >
SerializableType * s11nlite::deserialize (const node_type &src)
 See s11n::deserialize().
template<typename DeserializableT >
bool s11nlite::deserialize (const node_type &src, DeserializableT &target)
 Tries to deserialize src into target.
template<typename DeserializableT >
bool s11nlite::deserialize_subnode (const node_type &src, const std::string &subnodename, DeserializableT &target)
 Exactly like deserialize(), but operates on a subnode of src named subnodename.
template<typename DeserializableT >
DeserializableT * s11nlite::deserialize_subnode (const node_type &src, const std::string &subnodename)
 Exactly like deserialize(), but operates on a subnode of src named subnodename.
template<typename SerializableType >
SerializableType * s11nlite::load_serializable (std::istream &src)
 Tries to load a data_node from src, then deserialize that to a SerializableType.
template<typename SerializableType >
SerializableType * s11nlite::load_serializable (const std::string &src)
 Overloaded form which takes a file name.
template<typename SerializableType >
SerializableType * s11nlite::s11n_clone (const SerializableType &tocp)
 See s11n::s11n_clone().
template<typename Type1 , typename Type2 >
bool s11nlite::s11n_cast (const Type1 &t1, Type2 &t2)
 See s11n::s11n_cast().
template<typename SerT >
save_serializable_string_nullary_f
< SerT > 
s11nlite::save_nullary_f (SerT const &src, std::string const &dest)
 Returns save_serializable_string_nullary_f<SerT>( src, dest ).
template<typename SerT >
save_serializable_stream_nullary_f
< SerT > 
s11nlite::save_nullary_f (SerT const &src, std::ostream &dest)
 Returns save_serializable_stream_nullary_f<SerT>( src, dest ).
save_node_string_nullary_f s11nlite::save_nullary_f (node_type const &src, std::string const &dest)
 Returns save_node_string_nullary_f( src, dest ).
save_node_stream_nullary_f s11nlite::save_nullary_f (node_type const &src, std::ostream &dest)
 Returns save_node_stream_nullary_f( src, dest ).
load_node_nullary_string_f s11nlite::load_node_nullary_f (std::string const &s)
 Returns load_node_nullary_string_f(s).
load_node_stream_nullary_f s11nlite::load_node_nullary_f (std::istream &s)
 Returns load_node_stream_nullary_f(s).

Define Documentation

#define S11N_LITE_H_INCLUDED   1

Definition at line 2 of file s11nlite.hpp.

#define s11n_S11NLITE_INCLUDED   1

Definition at line 7 of file s11nlite.hpp.


Generated on Sat Mar 20 12:29:24 2010 for libs11n-1.2.10 by  doxygen 1.6.1