TemplateUtil::unary_deref< Predicate > Struct Template Reference

#include <TemplateUtil.h>

Inherits unary_function< Predicate::argument_type *, bool >.

Collaboration diagram for TemplateUtil::unary_deref< Predicate >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef unary_function< typename
Predicate::argument_type *,
bool >::argument_type 
argument_type
typedef unary_function< typename
Predicate::argument_type *,
bool >::result_type 
result_type

Public Member Functions

 unary_deref (const Predicate &p)
bool operator() (const argument_type &arg) const

Public Attributes

Predicate myPred

Detailed Description

template<class Predicate>
struct TemplateUtil::unary_deref< Predicate >

This operator can be used to add dereferencing to a functor. If you have a functor that takes a non-pointer predicate and you want to use it on a collection that contains pointers, you can use the derefl function to convert your unary functor to one that operates on pointer values by dereferencing them before passing them on to your predicate. Note that this does not do any null checking so you need to be sure that your list doesn't contain null values or this will case a core

Definition at line 146 of file TemplateUtil.h.


Member Typedef Documentation

template<class Predicate>
typedef unary_function<typename Predicate::argument_type *, bool>::argument_type TemplateUtil::unary_deref< Predicate >::argument_type
 

Definition at line 150 of file TemplateUtil.h.

template<class Predicate>
typedef unary_function<typename Predicate::argument_type *, bool>::result_type TemplateUtil::unary_deref< Predicate >::result_type
 

Definition at line 152 of file TemplateUtil.h.


Constructor & Destructor Documentation

template<class Predicate>
TemplateUtil::unary_deref< Predicate >::unary_deref const Predicate &  p  )  [inline, explicit]
 

Definition at line 154 of file TemplateUtil.h.

References TemplateUtil::unary_deref< Predicate >::myPred.


Member Function Documentation

template<class Predicate>
bool TemplateUtil::unary_deref< Predicate >::operator() const argument_type arg  )  const [inline]
 

Definition at line 158 of file TemplateUtil.h.

References TemplateUtil::unary_deref< Predicate >::myPred.


Member Data Documentation

template<class Predicate>
Predicate TemplateUtil::unary_deref< Predicate >::myPred
 

Definition at line 162 of file TemplateUtil.h.

Referenced by TemplateUtil::unary_deref< Predicate >::operator()(), and TemplateUtil::unary_deref< Predicate >::unary_deref().


The documentation for this struct was generated from the following file:
Generated on Sat Dec 3 10:48:36 2005 for Robotics by  doxygen 1.4.5