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

Mask to query for element types, if they match or not. More...

#include <xmlpathautomaton.hpp>

Public Member Functions

bool empty () const
 Tells if mask does not select anything anymore. More...
 
 Mask (unsigned short p_pos=0, unsigned short p_neg=0)
 Constructor by values. More...
 
 Mask (const Mask &orig)
 Copy constructor. More...
 
void reset ()
 Reset operation (deactivate) More...
 
void reject (XMLScannerBase::ElementType e)
 Deactivate operation for a certain element type. More...
 
bool hasReject (XMLScannerBase::ElementType e) const
 
void match (XMLScannerBase::ElementType e)
 Declare an operation to match on an element type. More...
 
bool hasMatch (XMLScannerBase::ElementType e) const
 
bool operator== (const Mask &o)
 
void seekop (Operation op)
 Declare an operation as seek operation. More...
 
const char * seekopName () const
 Get the name of a seek operation. More...
 
void join (const Mask &mask)
 Join two mask definitions. More...
 
bool matches (XMLScannerBase::ElementType e) const
 Check if an element type matches the mask. More...
 
bool rejects (XMLScannerBase::ElementType e) const
 Check if an element type should reset a mask. More...
 

Public Attributes

unsigned short pos
 
unsigned short neg
 

Detailed Description

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

Mask to query for element types, if they match or not.

Constructor & Destructor Documentation

template<class CharSet_ = charset::UTF8>
textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::Mask ( unsigned short  p_pos = 0,
unsigned short  p_neg = 0 
)
inline

Constructor by values.

Parameters
[in]p_pospositively selected elements bitmask
[in]p_negnegatively selected elements bitmask that determines when a search pattern is given up copletely
template<class CharSet_ = charset::UTF8>
textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::Mask ( const Mask orig)
inline

Copy constructor.

Parameters
[in]origmask to copy

Member Function Documentation

template<class CharSet_ = charset::UTF8>
bool textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::empty ( ) const
inline

Tells if mask does not select anything anymore.

Returns
true if it is not active anymore
template<class CharSet_ = charset::UTF8>
bool textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::hasMatch ( XMLScannerBase::ElementType  e) const
inline
template<class CharSet_ = charset::UTF8>
bool textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::hasReject ( XMLScannerBase::ElementType  e) const
inline
template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::join ( const Mask mask)
inline

Join two mask definitions.

Parameters
[in]maskdefinition of mask to join this with
template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::match ( XMLScannerBase::ElementType  e)
inline

Declare an operation to match on an element type.

template<class CharSet_ = charset::UTF8>
bool textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::matches ( XMLScannerBase::ElementType  e) const
inline

Check if an element type matches the mask.

Parameters
[in]eelement type to check
template<class CharSet_ = charset::UTF8>
bool textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::operator== ( const Mask o)
inline
template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::reject ( XMLScannerBase::ElementType  e)
inline

Deactivate operation for a certain element type.

template<class CharSet_ = charset::UTF8>
bool textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::rejects ( XMLScannerBase::ElementType  e) const
inline

Check if an element type should reset a mask.

Parameters
[in]eelement type to check
template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::reset ( )
inline

Reset operation (deactivate)

template<class CharSet_ = charset::UTF8>
void textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::seekop ( Operation  op)
inline

Declare an operation as seek operation.

template<class CharSet_ = charset::UTF8>
const char* textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::seekopName ( ) const
inline

Get the name of a seek operation.

Member Data Documentation

template<class CharSet_ = charset::UTF8>
unsigned short textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::neg
template<class CharSet_ = charset::UTF8>
unsigned short textwolf::XMLPathSelectAutomaton< CharSet_ >::Mask::pos

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