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

xtl_quote_base Class Template Reference

#include <xtl_quote.h>

Inheritance diagram for xtl_quote_base:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename LeftT, typename MiddleT, typename RightT, typename DerivedT>
class cttl_impl::xtl_quote_base< LeftT, MiddleT, RightT, DerivedT >

Defines behavior of generic quote.

LeftT
Template parameter specifying type of grammar expression, describing opening clause of the quote.
MiddleT
Template parameter specifying type of grammar expression, describing interior clause of the quote.
RightT
Template parameter specifying type of grammar expression, describing closing clause of the quote.
DerivedT
Template parameter specifying C++ class that provides implementation of the match_pair function:
    template< typename UniverseT >
    bool match_pair( UniverseT& edge_ );

Definition at line 86 of file xtl_quote.h.

Public Member Functions

 xtl_quote_base (LeftT const &left_, MiddleT const &middle_, RightT const &right_)
 Constructs and initializes the object.
template<typename UniverseT>
size_t match (UniverseT &edge_)
 Implements grammar evaluation method for quote match algorithm.
template<typename UniverseT>
size_t find (UniverseT &edge_)
 Implements grammar evaluation method for quote search algorithm.
template<typename UniverseT>
size_t bang_find (UniverseT &edge_)
 Implements grammar evaluation method for quote repeatable search algorithm.

Protected Attributes

LeftT m_left
 Stores grammar expression describing opening clause of the quote.
MiddleT m_middle
 Stores grammar expression describing interior clause of the quote.
RightT m_right
 Stores grammar expression describing closing clause of the quote.


Member Function Documentation

size_t bang_find UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for quote repeatable search algorithm.

UniverseT
Template parameter specifying type of the parseable universe. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable universe.
Postcondition:
If method succeeds, the universe, specified by the edge_ parameter, gets consumed accordingly to the size of the matched quote.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched quote. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 217 of file xtl_quote.h.

size_t find UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for quote search algorithm.

UniverseT
Template parameter specifying type of the parseable universe. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable universe.
Postcondition:
If method succeeds, the universe, specified by the edge_ parameter, gets consumed accordingly to the size of the matched quote.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched quote. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 176 of file xtl_quote.h.

size_t match UniverseT &  edge_  )  [inline]
 

Implements grammar evaluation method for quote match algorithm.

UniverseT
Template parameter specifying type of the parseable universe. Can be either cttl::const_edge or cttl::edge.
Parameters:
edge_ reference to the parseable universe.
Postcondition:
If method succeeds, the universe, specified by the edge_ parameter, gets consumed accordingly to the size of the matched quote.
Returns:
evaluation result: if method succeeds, it returns absolute offset corresponding to the upper boundary of the matched quote. Otherwise, it returns UniverseT::string_T::npos, indicating that the evaluation method has failed.

Definition at line 134 of file xtl_quote.h.


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 17:46:43 2006 for Common Text Transformation Library by  doxygen 1.3.9.1