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

s11n::io::tree_builder_lexer< NodeType, LexerSharingContext > Class Template Reference

tree_builder_lexer is a type intended to ease the implementation of lex-based node tree parsers. More...

#include <data_node_format.hpp>

Inheritance diagram for s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >:

s11n::io::data_node_serializer< NodeType > List of all members.

Public Types

typedef NodeType node_type
typedef LexerSharingContext sharing_context
typedef data_node_serializer<
NodeType > 
parent_type

Public Member Functions

 tree_builder_lexer (const std::string &lexerClassName)
 lexerClassName = the class name of the FlexLexer subtype associated with this serializer.
virtual ~tree_builder_lexer ()
virtual node_typedeserialize (std::istream &src)
 Overridden to parse src using this object's lexer.
virtual node_typedeserialize (const std::string &src)
std::string lexer_class () const
 Returns this object's lexer class name.

Protected Member Functions

void lexer_class (const std::string &classname)
 Sets this object's lexer class name.

Detailed Description

template<typename NodeType, typename LexerSharingContext>
class s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >

tree_builder_lexer is a type intended to ease the implementation of lex-based node tree parsers.

It is useless standalone: it must be subclassed.

It holds the class name of a FlexLexer type so it can be dynamically loaded as needed. It takes the responsibility of instantiating that type and passing off input to subclasses.

Definition at line 646 of file data_node_format.hpp.


Member Typedef Documentation

template<typename NodeType, typename LexerSharingContext>
typedef NodeType s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::node_type
 

Reimplemented from s11n::io::data_node_serializer< NodeType >.

Reimplemented in s11n::io::compact_serializer< NodeType >, s11n::io::funtxt_serializer< NodeType >, s11n::io::funxml_serializer< NodeType >, s11n::io::parens_serializer< NodeType >, s11n::io::simplexml_serializer< NodeType >, and s11n::io::wesnoth_serializer< NodeType >.

Definition at line 650 of file data_node_format.hpp.

template<typename NodeType, typename LexerSharingContext>
typedef data_node_serializer<NodeType> s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::parent_type
 

Reimplemented in s11n::io::compact_serializer< NodeType >, s11n::io::funtxt_serializer< NodeType >, s11n::io::funxml_serializer< NodeType >, s11n::io::parens_serializer< NodeType >, s11n::io::simplexml_serializer< NodeType >, and s11n::io::wesnoth_serializer< NodeType >.

Definition at line 652 of file data_node_format.hpp.

template<typename NodeType, typename LexerSharingContext>
typedef LexerSharingContext s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::sharing_context
 

Definition at line 651 of file data_node_format.hpp.


Constructor & Destructor Documentation

template<typename NodeType, typename LexerSharingContext>
s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::tree_builder_lexer const std::string &  lexerClassName  )  [inline, explicit]
 

lexerClassName = the class name of the FlexLexer subtype associated with this serializer.

Definition at line 658 of file data_node_format.hpp.

template<typename NodeType, typename LexerSharingContext>
virtual s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::~tree_builder_lexer  )  [inline, virtual]
 

Definition at line 662 of file data_node_format.hpp.


Member Function Documentation

template<typename NodeType, typename LexerSharingContext>
virtual node_type* s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::deserialize const std::string &  src  )  [inline, virtual]
 

Reimplemented from s11n::io::data_node_serializer< NodeType >.

Reimplemented in s11n::io::funxml_serializer< NodeType >.

Definition at line 677 of file data_node_format.hpp.

template<typename NodeType, typename LexerSharingContext>
virtual node_type* s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::deserialize std::istream &  src  )  [inline, virtual]
 

Overridden to parse src using this object's lexer.

It uses deserialize_lex_forwarder<sharing_context>(), passing it this object's lexer_class().

Reimplemented from s11n::io::data_node_serializer< NodeType >.

Reimplemented in s11n::io::funxml_serializer< NodeType >.

Definition at line 669 of file data_node_format.hpp.

template<typename NodeType, typename LexerSharingContext>
void s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::lexer_class const std::string &  classname  )  [inline, protected]
 

Sets this object's lexer class name.

Definition at line 695 of file data_node_format.hpp.

template<typename NodeType, typename LexerSharingContext>
std::string s11n::io::tree_builder_lexer< NodeType, LexerSharingContext >::lexer_class  )  const [inline]
 

Returns this object's lexer class name.

Definition at line 688 of file data_node_format.hpp.

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


The documentation for this class was generated from the following file:
Generated on Thu Sep 29 20:01:16 2005 for libs11n-1.1.3-dev by  doxygen 1.4.1