textwolf  0.2
Public Member Functions | Public Attributes | List of all members
textwolf::XMLPathSelectAutomaton< CharSet_ >::State Class Reference

State of an automaton in its definition. More...

#include <xmlpathautomaton.hpp>

Public Member Functions

 State ()
 Constructor. More...
 
 State (const State &orig)
 Copy constructor. More...
 
 ~State ()
 Destructor. More...
 
bool isempty ()
 Check it the state definition is empty. More...
 
void defineKey (unsigned int p_keysize, const char *p_key, const char *p_srckey)
 Define the matching key of this state. More...
 
void defineNext (Operation op, unsigned int p_keysize, const char *p_key, const char *p_srckey, int p_next, bool p_follow=false)
 Define a state transition by key and operation. More...
 
void defineOutput (const Mask &mask, int p_typeidx, bool p_follow, int p_start, int p_end)
 Define an element output operation. More...
 
void defLink (int p_link)
 Link another state to check to the current state. More...
 
std::string tostring () const
 

Public Attributes

Core core
 
unsigned int keysize
 
char * key
 
char * srckey
 
int next
 
int link
 

Detailed Description

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

State of an automaton in its definition.

Constructor & Destructor Documentation

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

Constructor.

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

Copy constructor.

Parameters
[in]origelement to copy
template<class CharSet_ = charset::UTF8>
textwolf::XMLPathSelectAutomaton< CharSet_ >::State::~State ( )
inline

Destructor.

Member Function Documentation

template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::State::defineKey ( unsigned int  p_keysize,
const char *  p_key,
const char *  p_srckey 
)
inline

Define the matching key of this state.

Parameters
[in]p_keysizesize of the key in bytes
[in]p_keypointer to the key
[in]p_srckeythe source form of the key (ASCII with encoded entities for everything else)
template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::State::defineNext ( Operation  op,
unsigned int  p_keysize,
const char *  p_key,
const char *  p_srckey,
int  p_next,
bool  p_follow = false 
)
inline

Define a state transition by key and operation.

Parameters
[in]opoperation type
[in]p_keysizesize of the key in bytes
[in]p_keypointer to the key
[in]p_srckeythe source form of the key (ASCII with encoded entities for everything else)
[in]p_nextfollow state on a match
[in]p_followtrue if the search reaches all included follow scopes of the definition scope
template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::State::defineOutput ( const Mask mask,
int  p_typeidx,
bool  p_follow,
int  p_start,
int  p_end 
)
inline

Define an element output operation.

Parameters
[in]maskmask defining the element types to output
[in]p_typeidxthe type of the element produced
[in]p_followtrue if the output reaches all included follow scopes of the definition scope
[in]p_startstart index of the element range produced
[in]p_endupper bound index of the element range produced
template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::State::defLink ( int  p_link)
inline

Link another state to check to the current state.

Parameters
[in]p_linkthe index of the state to link
template<class CharSet_ = charset::UTF8>
bool textwolf::XMLPathSelectAutomaton< CharSet_ >::State::isempty ( )
inline

Check it the state definition is empty.

Returns
true for an empty state
template<class CharSet_ = charset::UTF8>
std::string textwolf::XMLPathSelectAutomaton< CharSet_ >::State::tostring ( ) const
inline

Member Data Documentation

template<class CharSet_ = charset::UTF8>
Core textwolf::XMLPathSelectAutomaton< CharSet_ >::State::core
template<class CharSet_ = charset::UTF8>
char* textwolf::XMLPathSelectAutomaton< CharSet_ >::State::key
template<class CharSet_ = charset::UTF8>
unsigned int textwolf::XMLPathSelectAutomaton< CharSet_ >::State::keysize
template<class CharSet_ = charset::UTF8>
int textwolf::XMLPathSelectAutomaton< CharSet_ >::State::link
template<class CharSet_ = charset::UTF8>
int textwolf::XMLPathSelectAutomaton< CharSet_ >::State::next
template<class CharSet_ = charset::UTF8>
char* textwolf::XMLPathSelectAutomaton< CharSet_ >::State::srckey

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