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

Defines one node in the XML Path element tree in the construction phase. More...

#include <xmlpathautomaton.hpp>

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

Public Member Functions

 PathElement ()
 Constructor. More...
 
 PathElement (XMLPathSelectAutomaton *p_xs, int p_si=0)
 Constructor by values. More...
 
 PathElement (const PathElement &orig)
 Copy constructor. More...
 
PathElementoperator-- (int)
 Corresponds to "//" in abbreviated syntax of XPath. More...
 
PathElementoperator[] (const char *name) throw (exception,std::bad_alloc)
 Find tag by name. More...
 
PathElementselectTag (const char *name) throw (exception,std::bad_alloc)
 Find tag by name. More...
 
PathElementselectCloseTag () throw (exception,std::bad_alloc)
 Find close tag of current tag selected. More...
 
PathElementoperator() (const char *name) throw (exception,std::bad_alloc)
 Find tag with one attribute. More...
 
PathElementselectAttribute (const char *name) throw (exception,std::bad_alloc)
 Find tag with one attribute. More...
 
PathElementoperator() (const char *name, const char *value) throw (exception,std::bad_alloc)
 Find tag with one attribute,value condition. More...
 
PathElementifAttribute (const char *name, const char *value) throw (exception,std::bad_alloc)
 Find tag with one attribute,value condition. More...
 
PathElementTO (int idx) throw (exception,std::bad_alloc)
 Define maximum element index to push. More...
 
PathElementFROM (int idx) throw (exception,std::bad_alloc)
 Define minimum element index to push. More...
 
PathElementRANGE (int idx1, int idx2) throw (exception,std::bad_alloc)
 Define minimum and maximum element index to push. More...
 
PathElementINDEX (int idx) throw (exception,std::bad_alloc)
 Define index of the element index to push. More...
 
PathElementoperator= (int type) throw (exception,std::bad_alloc)
 Define element type to push. More...
 
PathElementassignType (int type) throw (exception,std::bad_alloc)
 Define element type to push. More...
 
PathElementoperator() () throw (exception,std::bad_alloc)
 Define grab content. More...
 
PathElementselectContent () throw (exception,std::bad_alloc)
 Define grab content. More...
 

Additional Inherited Members

- 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...
 

Detailed Description

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

Defines one node in the XML Path element tree in the construction phase.

Remarks
This is just a construct for building the tree with cascading operators forming a path representation

Constructor & Destructor Documentation

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

Constructor.

template<class CharSet_ = charset::UTF8>
textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::PathElement ( XMLPathSelectAutomaton p_xs,
int  p_si = 0 
)
inline

Constructor by values.

Parameters
[in]p_xsautomaton of this element
[in]p_sistate index of this element in the automaton definition
template<class CharSet_ = charset::UTF8>
textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::PathElement ( const PathElement orig)
inline

Copy constructor.

Parameters
[in]origelement to copy

Member Function Documentation

template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::assignType ( int  type)
throw (exception,
std::bad_alloc
)
inline

Define element type to push.

Parameters
[in]typeelement type
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::FROM ( int  idx)
throw (exception,
std::bad_alloc
)
inline

Define minimum element index to push.

Parameters
[in]idxminimum element index
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::ifAttribute ( const char *  name,
const char *  value 
)
throw (exception,
std::bad_alloc
)
inline

Find tag with one attribute,value condition.

Parameters
[in]namename of the attribute
[in]valuevalue of the attribute
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::INDEX ( int  idx)
throw (exception,
std::bad_alloc
)
inline

Define index of the element index to push.

Parameters
[in]idxelement index
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::operator() ( const char *  name)
throw (exception,
std::bad_alloc
)
inline

Find tag with one attribute.

Parameters
[in]namename of the attribute
Returns
*this
Remarks
same as selectAttribute(const char*)
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::operator() ( const char *  name,
const char *  value 
)
throw (exception,
std::bad_alloc
)
inline

Find tag with one attribute,value condition.

Remarks
same as ifAttribute(const char*,const char*)
Parameters
[in]namename of the attribute
[in]valuevalue of the attribute
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::operator() ( )
throw (exception,
std::bad_alloc
)
inline

Define grab content.

Remarks
same as selectContent()
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::operator-- ( int  )
inline

Corresponds to "//" in abbreviated syntax of XPath.

Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::operator= ( int  type)
throw (exception,
std::bad_alloc
)
inline

Define element type to push.

Parameters
[in]typeelement type
Returns
*this
Remarks
same as assignType(int)
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::operator[] ( const char *  name)
throw (exception,
std::bad_alloc
)
inline

Find tag by name.

Parameters
[in]namename of the tag
Returns
*this
Remarks
same as selectTag(const char*)
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::RANGE ( int  idx1,
int  idx2 
)
throw (exception,
std::bad_alloc
)
inline

Define minimum and maximum element index to push.

Parameters
[in]idx1minimum element index
[in]idx2maximum element index
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::selectAttribute ( const char *  name)
throw (exception,
std::bad_alloc
)
inline

Find tag with one attribute.

Parameters
[in]namename of the attribute
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::selectCloseTag ( )
throw (exception,
std::bad_alloc
)
inline

Find close tag of current tag selected.

Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::selectContent ( )
throw (exception,
std::bad_alloc
)
inline

Define grab content.

Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::selectTag ( const char *  name)
throw (exception,
std::bad_alloc
)
inline

Find tag by name.

Parameters
[in]namename of the tag
Returns
*this
template<class CharSet_ = charset::UTF8>
PathElement& textwolf::XMLPathSelectAutomaton< CharSet_ >::PathElement::TO ( int  idx)
throw (exception,
std::bad_alloc
)
inline

Define maximum element index to push.

Parameters
[in]idxmaximum element index
Returns
*this

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