fsf::CPassiveFilterBase Class Reference
[Filters]

The passive filter base class. More...

#include <FsfFilter.h>

Inherits fsf::CFilter.

Inherited by fsf::CPassiveFilter< N >.

Collaboration diagram for fsf::CPassiveFilterBase:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Creators
 CPassiveFilterBase ()
 0-parameter constructor
 CPassiveFilterBase (const std::string &strName, long nFilterID=-1, bool bOptional=false)
 3-parameter constructor: target name, filter ID, optional flag
 CPassiveFilterBase (const CPassiveFilterBase &f)
 Copy constructor.
virtual ~CPassiveFilterBase ()
 Virtual destructor.
virtual CPassiveFilterBaseclone () const =0
 Cloning: necessary for runtime polymorphism This is a pure virtual function that must be overriden by derived classes.
Accessors
bool hasChildren ()
 Checks whether this filter has any subfilters.
void getChildren (std::list< CPassiveFilterBase * > &listFilters)
 Gets a list of pointers to this filter's subfilters.
Manipulators
void addChild (CPassiveFilterBase *pFilter)
 Adds argument passive filter to this filter's list of subfilters.
Local matching
virtual bool testType (CNode *pNode)
 Tests whether the agument's node type is compatible with this filter's node type This is aplace holder that must be overridden in derived classes.
virtual bool testExact (CNode *pNode)
 Tests whether the argument's type and names match this filter's node type and name (regular name case).
virtual bool testWildcard (CNode *pNode)
 Tests whether the argument's type and names match this filter's node type and name (pattern case).
virtual bool test (CNode *pNode)
 Tests whether the argument's type and names match this filter's node type and name Calls testExact or testWildcard as appropriate.

Filtering

Filtering functions.

bool filter (PassiveHandleList &listHandles, CPassiveHandle *pRootHandle)
 Passive filtering is performed using handles to avoid problems if nodes on passive pulse are destroyed by other threads.
bool matchNode (CPassiveHandle *pNHandle)
bool matchList (PassiveHandleList &listHandles, PassiveHandleList &listRHandles, PassiveHandleList &listNHandles)
static bool matchListList (PassiveHandleList &listHandles, PassiveFilterList &listFilter, PassiveHandleList &listRHandles, PassiveHandleList &listNHandles)


Detailed Description

The passive filter base class.

Constructor & Destructor Documentation

fsf::CPassiveFilterBase::CPassiveFilterBase (  )  [inline]

0-parameter constructor

fsf::CPassiveFilterBase::CPassiveFilterBase ( const std::string &  strName,
long  nFilterID = -1,
bool  bOptional = false 
) [inline]

3-parameter constructor: target name, filter ID, optional flag

CPassiveFilterBase::CPassiveFilterBase ( const CPassiveFilterBase f  ) 

Copy constructor.

Recursively calls copy constructors on this filter's subfilters.

CPassiveFilterBase::~CPassiveFilterBase (  )  [virtual]

Virtual destructor.

Recursively deletes this filter's subfilters.


Member Function Documentation

void fsf::CPassiveFilterBase::addChild ( CPassiveFilterBase pFilter  )  [inline]

Adds argument passive filter to this filter's list of subfilters.

virtual CPassiveFilterBase* fsf::CPassiveFilterBase::clone (  )  const [pure virtual]

Cloning: necessary for runtime polymorphism This is a pure virtual function that must be overriden by derived classes.

Implemented in fsf::CPassiveFilter< N >.

bool CPassiveFilterBase::filter ( PassiveHandleList listHandles,
CPassiveHandle pRootHandle 
)

Passive filtering is performed using handles to avoid problems if nodes on passive pulse are destroyed by other threads.

Passive filtering returns at most one passive handle.

Parameters:
[in] pRootHandle Pointer to a handle to the target root
[out] listHandles List of handles corresponding to matches for this filter in the subtree rooted in pRootHandle
Returns:
true if match found Only one match allowed: listHandles has only one handle in it!

void fsf::CPassiveFilterBase::getChildren ( std::list< CPassiveFilterBase * > &  listFilters  )  [inline]

Gets a list of pointers to this filter's subfilters.

bool fsf::CPassiveFilterBase::hasChildren (  )  [inline]

Checks whether this filter has any subfilters.

bool CPassiveFilterBase::matchList ( PassiveHandleList listHandles,
PassiveHandleList listRHandles,
PassiveHandleList listNHandles 
)

Parameters:
[out] listHandles List of matched handles
[out] listRHandles list of residual handles (unmatched)
[in] listNHandles list of node handles to match
Returns:
true if match found

bool CPassiveFilterBase::matchListList ( PassiveHandleList listHandles,
PassiveFilterList listFilter,
PassiveHandleList listRHandles,
PassiveHandleList listNHandles 
) [static]

Parameters:
[out] listHandles List of matched node handles
[in] listFilter List of subfilters
[out] listRHandles List of residual (unmatched)
[in] listNHandles List of node handles
Returns:
true if match found

bool CPassiveFilterBase::matchNode ( CPassiveHandle pNHandle  ) 

Parameters:
[in] pNHandle Pointer to a handle to the input node
Returns:
true if match found

virtual bool fsf::CPassiveFilterBase::test ( CNode pNode  )  [inline, virtual]

Tests whether the argument's type and names match this filter's node type and name Calls testExact or testWildcard as appropriate.

virtual bool fsf::CPassiveFilterBase::testExact ( CNode pNode  )  [inline, virtual]

Tests whether the argument's type and names match this filter's node type and name (regular name case).

virtual bool fsf::CPassiveFilterBase::testType ( CNode pNode  )  [inline, virtual]

Tests whether the agument's node type is compatible with this filter's node type This is aplace holder that must be overridden in derived classes.

Reimplemented in fsf::CPassiveFilter< N >.

virtual bool fsf::CPassiveFilterBase::testWildcard ( CNode pNode  )  [inline, virtual]

Tests whether the argument's type and names match this filter's node type and name (pattern case).


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

Generated on Thu Oct 21 11:47:37 2010 for MFSM by  doxygen 1.5.9