textwolf  0.2
Classes | Public Types | Public Member Functions | List of all members
textwolf::XMLPathSelect< CharSet_, StackType_ > Class Template Reference

XML path select template. More...

#include <xmlpathselect.hpp>

Inheritance diagram for textwolf::XMLPathSelect< CharSet_, StackType_ >:
textwolf::throws_exception

Classes

class  iterator
 input iterator for the output of this XMLScanner More...
 

Public Types

typedef XMLPathSelectAutomaton
< CharSet_ > 
ThisXMLPathSelectAutomaton
 
typedef XMLPathSelect
< CharSet_, StackType_ > 
ThisXMLPathSelect
 
- Public Types inherited from textwolf::throws_exception
enum  Cause {
  Unknown, DimOutOfRange, StateNumbersNotAscending, InvalidParamState,
  InvalidParamChar, DuplicateStateTransition, InvalidState, IllegalParam,
  IllegalAttributeName, OutOfMem, ArrayBoundsReadWrite, NotAllowedOperation,
  FileReadError, IllegalXmlHeader, InvalidTagOffset, CorruptTagStack,
  CodePageIndexNotSupported
}
 Enumeration of error cases. More...
 

Public Member Functions

template<class Buffer >
void getTokenTypeMatchingStates (XMLScannerBase::ElementType type, bool withFollows, Buffer &buf) const
 Get the next states states that match to an element of a type. More...
 
 XMLPathSelect (const ThisXMLPathSelectAutomaton *p_atm)
 Constructor. More...
 
 XMLPathSelect (const XMLPathSelect &o)
 Copy constructor. More...
 
iterator push (XMLScannerBase::ElementType type, const char *key, int keysize)
 Feed the path selector with the next token and get the start iterator for the results. More...
 
iterator push (XMLScannerBase::ElementType type, const std::string &key)
 Feed the path selector with the next token and get the start iterator for the results. More...
 
iterator end ()
 Get the end of results returned by 'push(XMLScannerBase::ElementType,const char*, int)'. More...
 

Detailed Description

template<class CharSet_, template< typename > class StackType_ = DefaultStackType>
class textwolf::XMLPathSelect< CharSet_, StackType_ >

XML path select template.

Template Parameters
CharSet_character set encoding of the automaton elements
StackType_stack type used for tokens,triggers and scopes (as back insertion sequence with random access by index)

Member Typedef Documentation

template<class CharSet_ , template< typename > class StackType_ = DefaultStackType>
typedef XMLPathSelect<CharSet_,StackType_> textwolf::XMLPathSelect< CharSet_, StackType_ >::ThisXMLPathSelect
template<class CharSet_ , template< typename > class StackType_ = DefaultStackType>
typedef XMLPathSelectAutomaton<CharSet_> textwolf::XMLPathSelect< CharSet_, StackType_ >::ThisXMLPathSelectAutomaton

Constructor & Destructor Documentation

template<class CharSet_ , template< typename > class StackType_ = DefaultStackType>
textwolf::XMLPathSelect< CharSet_, StackType_ >::XMLPathSelect ( const ThisXMLPathSelectAutomaton p_atm)
inline

Constructor.

Parameters
[in]p_atmread only ML path select automaton reference
template<class CharSet_ , template< typename > class StackType_ = DefaultStackType>
textwolf::XMLPathSelect< CharSet_, StackType_ >::XMLPathSelect ( const XMLPathSelect< CharSet_, StackType_ > &  o)
inline

Copy constructor.

Parameters
[in]oelement to copy

Member Function Documentation

template<class CharSet_ , template< typename > class StackType_ = DefaultStackType>
iterator textwolf::XMLPathSelect< CharSet_, StackType_ >::end ( )
inline

Get the end of results returned by 'push(XMLScannerBase::ElementType,const char*, int)'.

Returns
the end iterator
template<class CharSet_ , template< typename > class StackType_ = DefaultStackType>
template<class Buffer >
void textwolf::XMLPathSelect< CharSet_, StackType_ >::getTokenTypeMatchingStates ( XMLScannerBase::ElementType  type,
bool  withFollows,
Buffer &  buf 
) const
inline

Get the next states states that match to an element of a type.

Template Parameters
Bufferbuffer type for the result (back insertion sequence)
Parameters
[in]typeelement type to check
[out]bufwhere to append the result to
Remarks
This function works only if called after iterating through the result with the iterator created with XMLPathSelect::push(..)
Note
This function is a helper function for inspecting follow states that match a given type with an arbitrary value
template<class CharSet_ , template< typename > class StackType_ = DefaultStackType>
iterator textwolf::XMLPathSelect< CharSet_, StackType_ >::push ( XMLScannerBase::ElementType  type,
const char *  key,
int  keysize 
)
inline

Feed the path selector with the next token and get the start iterator for the results.

Returns
iterator pointing to the first of the selected XML path elements
template<class CharSet_ , template< typename > class StackType_ = DefaultStackType>
iterator textwolf::XMLPathSelect< CharSet_, StackType_ >::push ( XMLScannerBase::ElementType  type,
const std::string &  key 
)
inline

Feed the path selector with the next token and get the start iterator for the results.

Returns
iterator pointing to the first of the selected XML path elements

The documentation for this class was generated from the following file: