Odyssey::Callable Class Reference

A Callable is a generic, invokable object. More...

#include <callable.h>

List of all members.

Public Types

typedef boost::shared_ptr<
CallableHolder
CallableHolderPtr

Public Member Functions

 Callable ()
 Creates an empty Callable.
 Callable (const CallableHolderPtr &rhs)
 Creates a new callable.
 Callable (const Callable &rhs)
 Creates a callable that is a copy of the given.
bool isEmpty () const
 Returns true of this is an empty callable.
size_t getArity () const
 Returns the arity of this callable.
void copy (const Callable &rhs)
 This function copies the contents of the given callable.
Variable operator() () const
 The only nullary overload.
template<class T0>
Variable operator() (T0 arg0) const
 Automatic typing 1-arry overload.
template<class T0, class T1>
Variable operator() (T0 arg0, T1 arg1) const
 Automatic typing 2-arry overload.
template<class T0, class T1, class T2>
Variable operator() (T0 arg0, T1 arg1, T2 arg2) const
 Automatic typing 3-arry overload.
template<class T0, class T1, class T2, class T3>
Variable operator() (T0 arg0, T1 arg1, T2 arg2, T3 arg3) const
 Automatic typing 4-arry overload.
template<class T0, class T1, class T2, class T3, class T4>
Variable operator() (T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) const
 Automatic typing 5-arry overload.
template<class T0, class T1, class T2, class T3, class T4, class T5>
Variable operator() (T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) const
 Automatic typing 6-arry overload.
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
Variable operator() (T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6) const
 Automatic typing 7-arry overload.
bool operator!= (const Callable &rhs) const
bool operator== (const Callable &rhs) const
bool operator> (const Callable &rhs) const
bool operator>= (const Callable &rhs) const
bool operator< (const Callable &rhs) const
bool operator<= (const Callable &rhs) const
Callableoperator= (const Callable &rhs)
 Share the data from the given callable with this one.

Classes

class  CallableHolder
 This base holder class represents the concrete callable. More...
class  CallableHolderImpl
 Default implementation represents too many arguments and is unsupported. More...
class  CallableHolderImpl< T0, T1, R, 0 >
 This is the nullary specialization. More...
class  CallableHolderImpl< T0, T1, R, 1 >
 This is the single-arity specialization. More...
class  CallableHolderImpl< T0, T1, R, 2 >
 This is the 2-arity specialization. More...
class  CallableHolderImpl< T0, T1, R, 3 >
 This is the 3-arity specialization. More...
class  CallableHolderImpl< T0, T1, R, 4 >
 This is the 4-arity specialization. More...
class  CallableHolderImpl< T0, T1, R, 5 >
 This is the 5-arity specialization. More...
class  CallableHolderImpl< T0, T1, R, 6 >
 This is the 6-arity specialization. More...
class  CallableHolderImpl< T0, T1, R, 7 >
 This is the 7-arity specialization. More...
class  CallableHolderImpl< T0, T1, void, 0 >
 This is the nullary void-returning specialization. More...
class  CallableHolderImpl< T0, T1, void, 1 >
 This is the single-arity void-returning specialization. More...
class  CallableHolderImpl< T0, T1, void, 2 >
 This is the 2-arity void-returning specialization. More...
class  CallableHolderImpl< T0, T1, void, 3 >
 This is the 3-arity void-returning specialization. More...
class  CallableHolderImpl< T0, T1, void, 4 >
 This is the 4-arity void-returning specialization. More...
class  CallableHolderImpl< T0, T1, void, 5 >
 This is the 5-arity void-returning specialization. More...
class  CallableHolderImpl< T0, T1, void, 6 >
 This is the 6-arity void-returning specialization. More...
class  CallableHolderImpl< T0, T1, void, 7 >
 This is the 7-arity void-returning specialization. More...


Detailed Description

A Callable is a generic, invokable object.

This class represents a generic callable object. A callable object can invoked remotely using Variable objects as arguments. Callable also supports default arguments. Callables override the assignment operator and can be partially ordered, and so they can be stored in containers.


Member Typedef Documentation

typedef boost::shared_ptr<CallableHolder> Odyssey::Callable::CallableHolderPtr
 


Constructor & Destructor Documentation

Odyssey::Callable::Callable  ) 
 

Creates an empty Callable.

Odyssey::Callable::Callable const CallableHolderPtr rhs  ) 
 

Creates a new callable.

Odyssey::Callable::Callable const Callable rhs  ) 
 

Creates a callable that is a copy of the given.


Member Function Documentation

void Odyssey::Callable::copy const Callable rhs  ) 
 

This function copies the contents of the given callable.

size_t Odyssey::Callable::getArity  )  const
 

Returns the arity of this callable.

The arity is inferred from the given function signature (e.g. void (int,int) ) when the callable is first constructed. The arity refers to the number of arguments the function accepts.

bool Odyssey::Callable::isEmpty  )  const
 

Returns true of this is an empty callable.

bool Odyssey::Callable::operator!= const Callable rhs  )  const
 

template<class T0, class T1, class T2, class T3, class T4, class T5, class T6>
Variable Odyssey::Callable::operator() T0  arg0,
T1  arg1,
T2  arg2,
T3  arg3,
T4  arg4,
T5  arg5,
T6  arg6
const [inline]
 

Automatic typing 7-arry overload.

template<class T0, class T1, class T2, class T3, class T4, class T5>
Variable Odyssey::Callable::operator() T0  arg0,
T1  arg1,
T2  arg2,
T3  arg3,
T4  arg4,
T5  arg5
const [inline]
 

Automatic typing 6-arry overload.

template<class T0, class T1, class T2, class T3, class T4>
Variable Odyssey::Callable::operator() T0  arg0,
T1  arg1,
T2  arg2,
T3  arg3,
T4  arg4
const [inline]
 

Automatic typing 5-arry overload.

template<class T0, class T1, class T2, class T3>
Variable Odyssey::Callable::operator() T0  arg0,
T1  arg1,
T2  arg2,
T3  arg3
const [inline]
 

Automatic typing 4-arry overload.

template<class T0, class T1, class T2>
Variable Odyssey::Callable::operator() T0  arg0,
T1  arg1,
T2  arg2
const [inline]
 

Automatic typing 3-arry overload.

template<class T0, class T1>
Variable Odyssey::Callable::operator() T0  arg0,
T1  arg1
const [inline]
 

Automatic typing 2-arry overload.

template<class T0>
Variable Odyssey::Callable::operator() T0  arg0  )  const [inline]
 

Automatic typing 1-arry overload.

Variable Odyssey::Callable::operator()  )  const [inline]
 

The only nullary overload.

bool Odyssey::Callable::operator< const Callable rhs  )  const
 

bool Odyssey::Callable::operator<= const Callable rhs  )  const
 

Callable& Odyssey::Callable::operator= const Callable rhs  ) 
 

Share the data from the given callable with this one.

bool Odyssey::Callable::operator== const Callable rhs  )  const
 

bool Odyssey::Callable::operator> const Callable rhs  )  const
 

bool Odyssey::Callable::operator>= const Callable rhs  )  const
 


The documentation for this class was generated from the following file:
Generated on Sun Jan 7 01:18:52 2007 for Odyssey Meta-Engine by  doxygen 1.4.6-NO