OpenWalnut  1.4.0
Public Member Functions | Private Attributes
WPredicateHelper::Name< boost::shared_ptr< T > > Class Template Reference

This class tests against the getName() method of the instances of type T. More...

#include <WPredicateHelper.h>

List of all members.

Public Member Functions

 Name (std::string check)
 Creates instance.
bool operator() (const boost::shared_ptr< T > &inst)
 Checks the instance of T against the string specified during construction.

Private Attributes

std::string m_check
 The string to check against.

Detailed Description

template<typename T>
class WPredicateHelper::Name< boost::shared_ptr< T > >

This class tests against the getName() method of the instances of type T.

Many, many, many many many classes in OpenWalnut provide a getName() method. This predicate can check against a defined name. Useful for searching. This partial specialization is for shared_ptr, which are a very common tool in OpenWalnut.

Definition at line 108 of file WPredicateHelper.h.


Constructor & Destructor Documentation

template<typename T >
WPredicateHelper::Name< boost::shared_ptr< T > >::Name ( std::string  check) [inline, explicit]

Creates instance.

The specified string is used for checking.

Parameters:
checkthe string to check against.

Definition at line 116 of file WPredicateHelper.h.


Member Function Documentation

template<typename T >
bool WPredicateHelper::Name< boost::shared_ptr< T > >::operator() ( const boost::shared_ptr< T > &  inst) [inline]

Checks the instance of T against the string specified during construction.

Parameters:
instuse getName of this instance of T
Returns:
true if m_checked == inst.getName()

Definition at line 128 of file WPredicateHelper.h.

References WPredicateHelper::Name< T >::m_check.


Member Data Documentation

template<typename T >
std::string WPredicateHelper::Name< boost::shared_ptr< T > >::m_check [private]

The string to check against.

Definition at line 131 of file WPredicateHelper.h.


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