- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
qi::AnyFunction Class Reference

`#include <anyfunction.hpp>`

## Public Member Functions
| AnyFunction ()
| ~AnyFunction ()
| AnyFunction (const AnyFunction &b)
| AnyFunction (FunctionTypeInterface *type, void *value)
AnyFunction & | operator= (const AnyFunction &b)
AnyReference | call (const AnyReferenceVector &args)
AnyReference | call (AnyReference arg1, const AnyReferenceVector &args)
| Call the function, reference must be destroy()ed. More...
AnyReference | operator() (const AnyReferenceVector &args)
| Call the function, reference must be destroy()ed. More...
template<typename R >
R | call (qi::AutoAnyReference p1=qi::AutoAnyReference(), qi::AutoAnyReference p2=qi::AutoAnyReference(), qi::AutoAnyReference p3=qi::AutoAnyReference(), qi::AutoAnyReference p4=qi::AutoAnyReference(), qi::AutoAnyReference p5=qi::AutoAnyReference(), qi::AutoAnyReference p6=qi::AutoAnyReference(), qi::AutoAnyReference p7=qi::AutoAnyReference(), qi::AutoAnyReference p8=qi::AutoAnyReference())
| Call the function. More...
template<typename R >
AnyReference | operator() (qi::AutoAnyReference p1=qi::AutoAnyReference(), qi::AutoAnyReference p2=qi::AutoAnyReference(), qi::AutoAnyReference p3=qi::AutoAnyReference(), qi::AutoAnyReference p4=qi::AutoAnyReference(), qi::AutoAnyReference p5=qi::AutoAnyReference(), qi::AutoAnyReference p6=qi::AutoAnyReference(), qi::AutoAnyReference p7=qi::AutoAnyReference(), qi::AutoAnyReference p8=qi::AutoAnyReference())
| Call the function, reference must be destroy()ed. More...
const AnyFunction & | dropFirstArgument () const
| Change signature, drop the first argument passed to call. More...
const AnyFunction & | replaceFirstArgument (void *value) const
| Replace first argument by `value` which must be storage for correct type. More...
const AnyFunction & | prependArgument (void *value) const
| Prepend extra argument `value` to argument list. More...
std::vector< TypeInterface * > | argumentsType () const
| Return expected argument types, taking transform into account. More...
TypeInterface * | resultType () const
Signature | parametersSignature (bool dropFirst=false) const
Signature | returnSignature () const
void | swap (AnyFunction &b)
| operator bool () const
FunctionTypeInterface * | functionType () const
template<typename T >
AnyFunction | from (T &&f)

## Static Public Member Functions
template<typename F >
static AnyFunction | from (F &&func)
template<typename F , typename C >
static AnyFunction | from (F func, C instance)
static AnyFunction | fromDynamicFunction (DynamicFunction f)

## Detailed Description

Represents a generic callable function. This class has value semantic.

Definition at line 149 of file anyfunction.hpp.

## Constructor & Destructor Documentation

qi::AnyFunction::AnyFunction | ( |  | ) |
| inline

Definition at line 35 of file anyfunction.hxx.

qi::AnyFunction::~AnyFunction | ( |  | ) |
| inline

Definition at line 64 of file anyfunction.hxx.

qi::AnyFunction::AnyFunction | ( | const AnyFunction & | b | ) |
| inline

Definition at line 39 of file anyfunction.hxx.

qi::AnyFunction::AnyFunction | ( | FunctionTypeInterface * | type,
|  | void * | value
| ) |  |
| inline

Definition at line 46 of file anyfunction.hxx.

## Member Function Documentation

std::vector<TypeInterface*> qi::AnyFunction::argumentsType | ( |  | ) | const

Return expected argument types, taking transform into account.

AnyReference qi::AnyFunction::call | ( | const AnyReferenceVector & | args | ) |

Calls the function.

Parameters

  args | A list of unnamed arguments, each wrapped in an AnyReference for allowing introspection.

Exceptions

  If | an argument mismatches the signature, or is invalid.

AnyReference qi::AnyFunction::call | ( | AnyReference | arg1,
|  | const AnyReferenceVector & | args
| ) |  |

Call the function, reference must be destroy()ed.

template<typename R >

R qi::AnyFunction::call | ( | qi::AutoAnyReference | p1 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p2 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p3 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p4 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p5 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p6 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p7 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p8 = `qi::AutoAnyReference()`
| ) |  |

Call the function.

const AnyFunction& qi::AnyFunction::dropFirstArgument | ( |  | ) | const

Change signature, drop the first argument passed to call.

template<typename F >

static AnyFunction qi::AnyFunction::from | ( | F && | func | ) |
| static

template<typename F , typename C >

AnyFunction qi::AnyFunction::from | ( | F | func,
|  | C | instance
| ) |  |
| static

Returns
  a AnyFunction binding instance to member function func

Definition at line 696 of file anyfunctionfactory.hxx.

template<typename T >

AnyFunction qi::AnyFunction::from | ( | T && | f | ) |

Definition at line 671 of file anyfunctionfactory.hxx.

static AnyFunction qi::AnyFunction::fromDynamicFunction | ( | DynamicFunction | f | ) |
| static

Returns
  a AnyFunction that takes arguments as a list of unconverted AnyReference.

FunctionTypeInterface * qi::AnyFunction::functionType | ( |  | ) | const
| inline

Definition at line 82 of file anyfunction.hxx.

qi::AnyFunction::operator bool | ( |  | ) | const
| inline

Definition at line 77 of file anyfunction.hxx.

AnyReference qi::AnyFunction::operator() | ( | const AnyReferenceVector & | args | ) |
| inline

Call the function, reference must be destroy()ed.

Definition at line 30 of file anyfunction.hxx.

template<typename R >

AnyReference qi::AnyFunction::operator() | ( | qi::AutoAnyReference | p1 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p2 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p3 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p4 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p5 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p6 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p7 = `qi::AutoAnyReference()`,
|  | qi::AutoAnyReference | p8 = `qi::AutoAnyReference()`
| ) |  |

Call the function, reference must be destroy()ed.

AnyFunction & qi::AnyFunction::operator= | ( | const AnyFunction & | b | ) |
| inline

Definition at line 52 of file anyfunction.hxx.

Signature qi::AnyFunction::parametersSignature | ( | bool | dropFirst = `false` | ) | const

const AnyFunction& qi::AnyFunction::prependArgument | ( | void * | value | ) | const

Prepend extra argument `value` to argument list.

const AnyFunction& qi::AnyFunction::replaceFirstArgument | ( | void * | value | ) | const

Replace first argument by `value` which must be storage for correct type.

TypeInterface* qi::AnyFunction::resultType | ( |  | ) | const

Signature qi::AnyFunction::returnSignature | ( |  | ) | const

void qi::AnyFunction::swap | ( | AnyFunction & | b | ) |
| inline

Definition at line 70 of file anyfunction.hxx.

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

- /home/opennao/work/release-2.8/sdk/libqi/qi/anyfunction.hpp
- /home/opennao/work/release-2.8/sdk/libqi/qi/type/detail/anyfunction.hxx
- /home/opennao/work/release-2.8/sdk/libqi/qi/type/detail/anyfunctionfactory.hxx