textwolf  0.2
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
textwolf::XMLPathSelectAutomaton< CharSet_ > Class Template Reference

Automaton to define XML path expressions and assign types (int values) to them. More...

#include <xmlpathautomaton.hpp>

Inheritance diagram for textwolf::XMLPathSelectAutomaton< CharSet_ >:
textwolf::throws_exception

Classes

class  Core
 Core of an automaton state definition that is used during XML processing. More...
 
class  Mask
 Mask to query for element types, if they match or not. More...
 
class  PathElement
 Defines one node in the XML Path element tree in the construction phase. More...
 
class  Scope
 Tag scope definition. More...
 
class  State
 State of an automaton in its definition. More...
 
class  Token
 Active or passive but still valid token of the XML processing (this is a trigger waiting to match) More...
 

Public Types

enum  Operation {
  Content, OpenTag, CloseTag, Attribute,
  ThisAttributeValue, AttributeValue, ContentStart
}
 Enumeration of operation types in the automaton definition. More...
 
typedef CharSet_ CharSet
 
typedef int Hash
 
typedef XMLPathSelectAutomaton
< CharSet
ThisXMLPathSelectAutomaton
 
- 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

 XMLPathSelectAutomaton ()
 Constructor. More...
 
virtual ~XMLPathSelectAutomaton ()
 
std::string tostring () const
 Returns the content of the automaton as pretty printed string for debug output. More...
 
template<class Buffer >
void getEmmitedTokens (unsigned int stateidx, XMLScannerBase::ElementType e, Buffer &buf) const
 Get the emmitted results for a successor state that match to an element of a type. More...
 
PathElement operator* ()
 Get automaton root element to start an XML path definition. More...
 

Static Public Member Functions

static const char * operationName (Operation op)
 Get the name of the operation as string. More...
 

Public Attributes

std::vector< Statestates
 

Detailed Description

template<class CharSet_ = charset::UTF8>
class textwolf::XMLPathSelectAutomaton< CharSet_ >

Automaton to define XML path expressions and assign types (int values) to them.

Template Parameters
CharSet_character set of the token defintions of the automaton

Member Typedef Documentation

template<class CharSet_ = charset::UTF8>
typedef CharSet_ textwolf::XMLPathSelectAutomaton< CharSet_ >::CharSet
template<class CharSet_ = charset::UTF8>
typedef int textwolf::XMLPathSelectAutomaton< CharSet_ >::Hash
template<class CharSet_ = charset::UTF8>
typedef XMLPathSelectAutomaton<CharSet> textwolf::XMLPathSelectAutomaton< CharSet_ >::ThisXMLPathSelectAutomaton

Member Enumeration Documentation

template<class CharSet_ = charset::UTF8>
enum textwolf::XMLPathSelectAutomaton::Operation

Enumeration of operation types in the automaton definition.

Enumerator
Content 
OpenTag 
CloseTag 
Attribute 
ThisAttributeValue 
AttributeValue 
ContentStart 

Constructor & Destructor Documentation

template<class CharSet_ = charset::UTF8>
textwolf::XMLPathSelectAutomaton< CharSet_ >::XMLPathSelectAutomaton ( )
inline

Constructor.

template<class CharSet_ = charset::UTF8>
virtual textwolf::XMLPathSelectAutomaton< CharSet_ >::~XMLPathSelectAutomaton ( )
inlinevirtual

Member Function Documentation

template<class CharSet_ = charset::UTF8>
template<class Buffer >
void textwolf::XMLPathSelectAutomaton< CharSet_ >::getEmmitedTokens ( unsigned int  stateidx,
XMLScannerBase::ElementType  e,
Buffer &  buf 
) const
inline

Get the emmitted results for a successor state that match to an element of a type.

Template Parameters
Bufferbuffer type for the result (back insertion sequence)
Parameters
[in]stateidxstate to check
[in]efollow element type to check
[out]bufwhere to append the result to
Note
This function is a helper function for inspecting the follow nodes for a state
template<class CharSet_ = charset::UTF8>
static const char* textwolf::XMLPathSelectAutomaton< CharSet_ >::operationName ( Operation  op)
inlinestatic

Get the name of the operation as string.

Returns
the operation as string
template<class CharSet_ = charset::UTF8>
PathElement textwolf::XMLPathSelectAutomaton< CharSet_ >::operator* ( )
inline

Get automaton root element to start an XML path definition.

Returns
the automaton root element
template<class CharSet_ = charset::UTF8>
std::string textwolf::XMLPathSelectAutomaton< CharSet_ >::tostring ( ) const
inline

Returns the content of the automaton as pretty printed string for debug output.

Member Data Documentation

template<class CharSet_ = charset::UTF8>
std::vector<State> textwolf::XMLPathSelectAutomaton< CharSet_ >::states

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