Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

data_node_format.hpp File Reference

#include <string>
#include <list>
#include <map>
#include <stdexcept>
#include <s11n.net/s11n/s11n_debuggering_macros.hpp>
#include <s11n.net/s11n/phoenix.hpp>
#include <s11n.net/s11n/io/strtool.hpp>
#include <s11n.net/s11n/classload.hpp>
#include <s11n.net/s11n/algo.hpp>
#include <s11n.net/s11n/serialize.hpp>
#include <s11n.net/s11n/traits.hpp>
#include <s11n.net/s11n/io/data_node_io.hpp>
#include <s11n.net/s11n/io/FlexLexer.hpp>
#include <s11n.net/s11n/factory.hpp>
#include <s11n.net/s11n/factory_reg.hpp>

Go to the source code of this file.

Namespaces

namespace  s11n
namespace  s11n::io
namespace  s11n::io::Private

Defines

#define IFNOLEXER(RET)   if( lmap().end() == lmap().find(lexer) ) return RET;
#define S11N_FACREG_TYPE   s11n::io::tree_builder
#define S11N_FACREG_TYPE_NAME   "s11n::io::tree_builder"
#define S11N_FACREG_TYPE_IS_ABSTRACT   1

Typedefs

typedef std::map< std::string,
std::string > 
entity_translation_map
 convenience typedef

Functions

int lex_api_hider_yylex (FlexLexer *, std::istream &)
 A helper to hide FlexLexer subclasses from needing to be included in header files.
template<typename NodeType, typename BuilderContext>
NodeType * deserialize_lex_forwarder (const std::string &lexerClassName, std::istream &src)
 This function exists for a really long, strange reason involving accessing templatized types from template-free code (FlexLexers).


Define Documentation

#define IFNOLEXER RET   )     if( lmap().end() == lmap().find(lexer) ) return RET;
 

Definition at line 236 of file data_node_format.hpp.

Referenced by s11n::io::tree_builder_context< ContextT >::add_property(), s11n::io::tree_builder_context< ContextT >::change_node_class(), s11n::io::tree_builder_context< ContextT >::close_node(), s11n::io::tree_builder_context< ContextT >::node_depth(), and s11n::io::tree_builder_context< ContextT >::open_node().

#define S11N_FACREG_TYPE   s11n::io::tree_builder
 

Definition at line 844 of file data_node_format.hpp.

Referenced by s11n_factory_reg_context< Context >::placeholder().

#define S11N_FACREG_TYPE_IS_ABSTRACT   1
 

Definition at line 846 of file data_node_format.hpp.

#define S11N_FACREG_TYPE_NAME   "s11n::io::tree_builder"
 

Definition at line 845 of file data_node_format.hpp.


Typedef Documentation

typedef std::map< std::string, std::string > s11n::io::entity_translation_map
 

convenience typedef

Definition at line 56 of file data_node_format.hpp.


Function Documentation

template<typename NodeType, typename BuilderContext>
NodeType* deserialize_lex_forwarder const std::string &  lexerClassName,
std::istream &  src
 

This function exists for a really long, strange reason involving accessing templatized types from template-free code (FlexLexers).

  • lexerClassName is the name of a FlexLexer subclass. It must be registered with the FlexLexer classloader.

  • src is the stream to pass on to the lexer.

  • BuilderContext should be the same one expected by the specific lexer. See the existing lexers for examples. You want to pass the actual BuilderContext's context here, not a tree_builder_context<> type.

The caller owns the returned poiner, which may be 0.

As of s11n version 1.1.3, this function may throw on error, and is guaranteed to propagate any exceptions it catches (after cleaning up). Except when passing on a (...) exception, all thrown exceptions are guaranteed to be std::exception types.

Definition at line 593 of file data_node_format.hpp.

References s11n::io::Private::lex_api_hider_yylex().

Referenced by s11n::io::tree_builder_lexer< NodeType, sharing::simplexml_sharing_context >::deserialize().

int lex_api_hider_yylex FlexLexer ,
std::istream & 
 

A helper to hide FlexLexer subclasses from needing to be included in header files.

(FlexLexer's subclassing technique (via macros) makes them impracticle to mix together in the same headers.)

May throw std::runtime_error.

Referenced by s11n::io::deserialize_lex_forwarder().


Generated on Thu Sep 29 20:01:15 2005 for libs11n-1.1.3-dev by  doxygen 1.4.1