Aria  2.8.0
ArGlobalRetFunctor1< Ret, P1 > Class Template Reference

Functor for a global function with 1 parameter and return value. More...

#include <ArFunctor.h>

Inherits ArRetFunctor1< Ret, P1 >.

Public Member Functions

 ArGlobalRetFunctor1 ()
 Constructor.
 
 ArGlobalRetFunctor1 (Ret(*func)(P1))
 Constructor - supply function pointer. More...
 
 ArGlobalRetFunctor1 (Ret(*func)(P1), P1 p1)
 Constructor - supply function pointer, default parameters. More...
 
virtual Ret invokeR (void)
 Invokes the functor with return value.
 
virtual Ret invokeR (P1 p1)
 Invokes the functor with return value. More...
 
virtual void setP1 (P1 p1)
 Set the default parameter. More...
 
virtual ~ArGlobalRetFunctor1 ()
 Destructor.
 
- Public Member Functions inherited from ArRetFunctor1< Ret, P1 >
virtual ~ArRetFunctor1 ()
 Destructor.
 
- Public Member Functions inherited from ArRetFunctor< Ret >
virtual void invoke (void)
 Invokes the functor.
 
virtual ~ArRetFunctor ()
 Destructor.
 
- Public Member Functions inherited from ArFunctor
virtual const char * getName (void)
 Gets the name of the functor.
 
virtual void setName (const char *name)
 Sets the name of the functor.
 
virtual void setNameVar (const char *name,...)
 Sets the name of the functor with formatting. More...
 
virtual ~ArFunctor ()
 Destructor.
 

Protected Attributes

Ret(* myFunc )(P1)
 
P1 myP1
 
- Protected Attributes inherited from ArFunctor
std::string myName
 

Detailed Description

template<class Ret, class P1>
class ArGlobalRetFunctor1< Ret, P1 >

Functor for a global function with 1 parameter and return value.

This is a class for global functions which take 1 parameter and return a value. This ties a C style function pointer into the functor class hierarchy as a convience. Code that has a reference to this class and treat it as an ArFunctor can use it like any other functor.

For an overall description of functors, see ArFunctor.

Examples:
auxSerialExample.cpp, and imuExample.cpp.

Constructor & Destructor Documentation

◆ ArGlobalRetFunctor1() [1/2]

template<class Ret, class P1>
ArGlobalRetFunctor1< Ret, P1 >::ArGlobalRetFunctor1 ( Ret(*)(P1)  func)
inline

Constructor - supply function pointer.

Parameters
funcglobal function pointer

◆ ArGlobalRetFunctor1() [2/2]

template<class Ret, class P1>
ArGlobalRetFunctor1< Ret, P1 >::ArGlobalRetFunctor1 ( Ret(*)(P1)  func,
P1  p1 
)
inline

Constructor - supply function pointer, default parameters.

Parameters
funcglobal function pointer
p1default first parameter

Member Function Documentation

◆ invokeR()

template<class Ret, class P1>
virtual Ret ArGlobalRetFunctor1< Ret, P1 >::invokeR ( P1  p1)
inlinevirtual

Invokes the functor with return value.

Parameters
p1first parameter

Implements ArRetFunctor1< Ret, P1 >.

◆ setP1()

template<class Ret, class P1>
virtual void ArGlobalRetFunctor1< Ret, P1 >::setP1 ( P1  p1)
inlinevirtual

Set the default parameter.

Parameters
p1default first parameter

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