torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::physical::NameComparator Class Reference

Comparator class to serve as a predicate when searching for names. More...

#include <Named.hpp>

Public Member Functions

 NameComparator (const string &inName)
 Constructor. More...
 
bool operator() (const Named &inNamed) const
 Function operator taking a Named object. More...
 
bool operator() (const NamedSharedPtr &inNamedPtr) const
 Function operator taking a Named shared pointer. More...
 

Protected Types

typedef std::string string
 Imported type name. More...
 

Protected Attributes

const stringmName
 The name to compare against. More...
 

Detailed Description

Comparator class to serve as a predicate when searching for names.

Definition at line 61 of file Named.hpp.

Member Typedef Documentation

typedef std::string torc::physical::NameComparator::string
protected

Imported type name.

Definition at line 65 of file Named.hpp.

Constructor & Destructor Documentation

torc::physical::NameComparator::NameComparator ( const string inName)
inline

Constructor.

Parameters
inNameThe name to compare against.

Definition at line 73 of file Named.hpp.

73 : mName(inName) {}
const string & mName
The name to compare against.
Definition: Named.hpp:68

Member Function Documentation

bool torc::physical::NameComparator::operator() ( const Named inNamed) const
inline

Function operator taking a Named object.

Returns
true if the given object's name matches the desired name, or false otherwise.

Definition at line 78 of file Named.hpp.

78 { return inNamed.getName() == mName; }
const string & mName
The name to compare against.
Definition: Named.hpp:68

+ Here is the call graph for this function:

bool torc::physical::NameComparator::operator() ( const NamedSharedPtr inNamedPtr) const
inline

Function operator taking a Named shared pointer.

Returns
true if the given object's name matches the desired name, or false otherwise.

Definition at line 82 of file Named.hpp.

83  { return inNamedPtr->getName() == mName; }
const string & mName
The name to compare against.
Definition: Named.hpp:68

Field Documentation

const string& torc::physical::NameComparator::mName
protected

The name to compare against.

Definition at line 68 of file Named.hpp.


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