Pothos  0.2.1-g9f04573d
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | List of all members
Pothos::Proxy Class Reference

#include <Proxy.hpp>

Public Member Functions

 Proxy (void)
 
 Proxy (const std::shared_ptr< ProxyHandle > &handle)
 
 Proxy (ProxyHandle *handle)
 
pothos_explicit operator bool (void) const
 
std::shared_ptr< ProxyHandlegetHandle (void) const
 Get the handle held in this proxy object. More...
 
std::shared_ptr< ProxyEnvironmentgetEnvironment (void) const
 
template<typename ValueType >
ValueType convert (void) const
 
template<typename ReturnType >
ReturnType call (const std::string &name) const
 Call a method with a return type and 0 args. More...
 
Proxy callProxy (const std::string &name) const
 Call a method with a Proxy return and 0 args. More...
 
void callVoid (const std::string &name) const
 Call a method with a void return and 0 args. More...
 
template<typename ReturnType , typename A0 >
ReturnType call (const std::string &name, const A0 &a0) const
 Call a method with a return type and 1 args. More...
 
template<typename A0 >
Proxy callProxy (const std::string &name, const A0 &a0) const
 Call a method with a Proxy return and 1 args. More...
 
template<typename A0 >
void callVoid (const std::string &name, const A0 &a0) const
 Call a method with a void return and 1 args. More...
 
template<typename ReturnType , typename A0 , typename A1 >
ReturnType call (const std::string &name, const A0 &a0, const A1 &a1) const
 Call a method with a return type and 2 args. More...
 
template<typename A0 , typename A1 >
Proxy callProxy (const std::string &name, const A0 &a0, const A1 &a1) const
 Call a method with a Proxy return and 2 args. More...
 
template<typename A0 , typename A1 >
void callVoid (const std::string &name, const A0 &a0, const A1 &a1) const
 Call a method with a void return and 2 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 >
ReturnType call (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2) const
 Call a method with a return type and 3 args. More...
 
template<typename A0 , typename A1 , typename A2 >
Proxy callProxy (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2) const
 Call a method with a Proxy return and 3 args. More...
 
template<typename A0 , typename A1 , typename A2 >
void callVoid (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2) const
 Call a method with a void return and 3 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 >
ReturnType call (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3) const
 Call a method with a return type and 4 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 >
Proxy callProxy (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3) const
 Call a method with a Proxy return and 4 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 >
void callVoid (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3) const
 Call a method with a void return and 4 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
ReturnType call (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const
 Call a method with a return type and 5 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
Proxy callProxy (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const
 Call a method with a Proxy return and 5 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void callVoid (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4) const
 Call a method with a void return and 5 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
ReturnType call (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) const
 Call a method with a return type and 6 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
Proxy callProxy (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) const
 Call a method with a Proxy return and 6 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
void callVoid (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5) const
 Call a method with a void return and 6 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
ReturnType call (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6) const
 Call a method with a return type and 7 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
Proxy callProxy (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6) const
 Call a method with a Proxy return and 7 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
void callVoid (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6) const
 Call a method with a void return and 7 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
ReturnType call (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7) const
 Call a method with a return type and 8 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
Proxy callProxy (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7) const
 Call a method with a Proxy return and 8 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
void callVoid (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7) const
 Call a method with a void return and 8 args. More...
 
template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
ReturnType call (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const
 Call a method with a return type and 9 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
Proxy callProxy (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const
 Call a method with a Proxy return and 9 args. More...
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
void callVoid (const std::string &name, const A0 &a0, const A1 &a1, const A2 &a2, const A3 &a3, const A4 &a4, const A5 &a5, const A6 &a6, const A7 &a7, const A8 &a8) const
 Call a method with a void return and 9 args. More...
 
int compareTo (const Proxy &other) const
 
size_t hashCode (void) const
 
std::string toString (void) const
 
std::string getClassName (void) const
 
bool operator< (const Proxy &obj) const
 Comparable operator for stl containers. More...
 
bool operator> (const Proxy &obj) const
 Comparable operator for stl containers. More...
 
 Proxy (void)
 
 Proxy (const std::shared_ptr< ProxyHandle > &handle)
 
 Proxy (ProxyHandle *handle)
 
pothos_explicit operator bool (void) const
 
std::shared_ptr< ProxyHandlegetHandle (void) const
 Get the handle held in this proxy object. More...
 
std::shared_ptr< ProxyEnvironmentgetEnvironment (void) const
 
template<typename ValueType >
ValueType convert (void) const
 
template<typename ReturnType , $>
ReturnType call (const std::string &name, $expand('const A%d &a%d', $NARGS)) const
 Call a method with a return type and $NARGS args. More...
 
template< $>
Proxy callProxy (const std::string &name, $expand('const A%d &a%d', $NARGS)) const
 Call a method with a Proxy return and $NARGS args. More...
 
template< $>
void callVoid (const std::string &name, $expand('const A%d &a%d', $NARGS)) const
 Call a method with a void return and $NARGS args. More...
 
int compareTo (const Proxy &other) const
 
size_t hashCode (void) const
 
std::string toString (void) const
 
std::string getClassName (void) const
 
bool operator< (const Proxy &obj) const
 Comparable operator for stl containers. More...
 
bool operator> (const Proxy &obj) const
 Comparable operator for stl containers. More...
 

Detailed Description

The Proxy is a wrapper class for making calls in a ProxyEnvironment. Proxys are created by the Environment and by using Proxy call(). The Proxy methods are simply just templated convenience methods that take any argument type provided and handle the automatic conversions.

Constructor & Destructor Documentation

Pothos::Proxy::Proxy ( void  )

Create a null Proxy.

Pothos::Proxy::Proxy ( const std::shared_ptr< ProxyHandle > &  handle)

Create a Proxy from a handle. This constructor will typically be called by the implementation.

Parameters
handlea ProxyHandle shared pointer created by an environment
Pothos::Proxy::Proxy ( ProxyHandle handle)

Create a Proxy from a handle. The Proxy is responsible for deletion of the pointer. This constructor will typically be called by the implementation.

Parameters
handlea ProxyHandle pointer created by an environment
Pothos::Proxy::Proxy ( void  )

Create a null Proxy.

Pothos::Proxy::Proxy ( const std::shared_ptr< ProxyHandle > &  handle)

Create a Proxy from a handle. This constructor will typically be called by the implementation.

Parameters
handlea ProxyHandle shared pointer created by an environment
Pothos::Proxy::Proxy ( ProxyHandle handle)

Create a Proxy from a handle. The Proxy is responsible for deletion of the pointer. This constructor will typically be called by the implementation.

Parameters
handlea ProxyHandle pointer created by an environment

Member Function Documentation

template<typename ReturnType >
ReturnType Pothos::Proxy::call ( const std::string &  name) const

Call a method with a return type and 0 args.

template<typename ReturnType , $>
ReturnType Pothos::Proxy::call ( const std::string &  name,
  $'const A%d &a%d', $NARGS 
) const

Call a method with a return type and $NARGS args.

template<typename ReturnType , typename A0 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0 
) const

Call a method with a return type and 1 args.

template<typename ReturnType , typename A0 , typename A1 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0,
const A1 &  a1 
) const

Call a method with a return type and 2 args.

template<typename ReturnType , typename A0 , typename A1 , typename A2 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2 
) const

Call a method with a return type and 3 args.

template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
) const

Call a method with a return type and 4 args.

template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4 
) const

Call a method with a return type and 5 args.

template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5 
) const

Call a method with a return type and 6 args.

template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6 
) const

Call a method with a return type and 7 args.

template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7 
) const

Call a method with a return type and 8 args.

template<typename ReturnType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
ReturnType Pothos::Proxy::call ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8 
) const

Call a method with a return type and 9 args.

Pothos::Proxy Pothos::Proxy::callProxy ( const std::string &  name) const
inline

Call a method with a Proxy return and 0 args.

template< $>
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
  $'const A%d &a%d', $NARGS 
) const

Call a method with a Proxy return and $NARGS args.

template<typename A0 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0 
) const

Call a method with a Proxy return and 1 args.

template<typename A0 , typename A1 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0,
const A1 &  a1 
) const

Call a method with a Proxy return and 2 args.

template<typename A0 , typename A1 , typename A2 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2 
) const

Call a method with a Proxy return and 3 args.

template<typename A0 , typename A1 , typename A2 , typename A3 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
) const

Call a method with a Proxy return and 4 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4 
) const

Call a method with a Proxy return and 5 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5 
) const

Call a method with a Proxy return and 6 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6 
) const

Call a method with a Proxy return and 7 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7 
) const

Call a method with a Proxy return and 8 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
Proxy Pothos::Proxy::callProxy ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8 
) const

Call a method with a Proxy return and 9 args.

void Pothos::Proxy::callVoid ( const std::string &  name) const
inline

Call a method with a void return and 0 args.

template< $>
void Pothos::Proxy::callVoid ( const std::string &  name,
  $'const A%d &a%d', $NARGS 
) const

Call a method with a void return and $NARGS args.

template<typename A0 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0 
) const

Call a method with a void return and 1 args.

template<typename A0 , typename A1 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0,
const A1 &  a1 
) const

Call a method with a void return and 2 args.

template<typename A0 , typename A1 , typename A2 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2 
) const

Call a method with a void return and 3 args.

template<typename A0 , typename A1 , typename A2 , typename A3 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3 
) const

Call a method with a void return and 4 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4 
) const

Call a method with a void return and 5 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5 
) const

Call a method with a void return and 6 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6 
) const

Call a method with a void return and 7 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7 
) const

Call a method with a void return and 8 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
void Pothos::Proxy::callVoid ( const std::string &  name,
const A0 &  a0,
const A1 &  a1,
const A2 &  a2,
const A3 &  a3,
const A4 &  a4,
const A5 &  a5,
const A6 &  a6,
const A7 &  a7,
const A8 &  a8 
) const

Call a method with a void return and 9 args.

int Pothos::Proxy::compareTo ( const Proxy other) const

Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Exceptions
ProxyCompareErrorwhen the compare isnt possible
Parameters
otherthe other proxy object to compare against
Returns
an int representing less than, equal to, or greater than
int Pothos::Proxy::compareTo ( const Proxy other) const

Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Exceptions
ProxyCompareErrorwhen the compare isnt possible
Parameters
otherthe other proxy object to compare against
Returns
an int representing less than, equal to, or greater than
template<typename ValueType >
ValueType Pothos::Proxy::convert ( void  ) const

Convert this proxy to the specified ValueType.

Exceptions
ProxyEnvironmentConvertErrorif conversion failed
Returns
the Proxy's value as ValueType
template<typename ValueType >
ValueType Pothos::Proxy::convert ( void  ) const

Convert this proxy to the specified ValueType.

Exceptions
ProxyEnvironmentConvertErrorif conversion failed
Returns
the Proxy's value as ValueType
std::string Pothos::Proxy::getClassName ( void  ) const

Get the class name of the underlying object. The class name should be a unique identifier for objects of the same type as the one contained. This name is used to help convert proxies to local objects.

std::string Pothos::Proxy::getClassName ( void  ) const

Get the class name of the underlying object. The class name should be a unique identifier for objects of the same type as the one contained. This name is used to help convert proxies to local objects.

std::shared_ptr<ProxyEnvironment> Pothos::Proxy::getEnvironment ( void  ) const

Get the Environment that created this Object's Handle.

std::shared_ptr<ProxyEnvironment> Pothos::Proxy::getEnvironment ( void  ) const

Get the Environment that created this Object's Handle.

std::shared_ptr<ProxyHandle> Pothos::Proxy::getHandle ( void  ) const

Get the handle held in this proxy object.

std::shared_ptr<ProxyHandle> Pothos::Proxy::getHandle ( void  ) const

Get the handle held in this proxy object.

size_t Pothos::Proxy::hashCode ( void  ) const

Get a hash code for the underlying object. The hash code should be identical for equivalent objects.

size_t Pothos::Proxy::hashCode ( void  ) const

Get a hash code for the underlying object. The hash code should be identical for equivalent objects.

pothos_explicit Pothos::Proxy::operator bool ( void  ) const

Is this Proxy have a handle?

Returns
true if the handle is set.
pothos_explicit Pothos::Proxy::operator bool ( void  ) const

Is this Proxy have a handle?

Returns
true if the handle is set.
bool Pothos::Proxy::operator< ( const Proxy obj) const

Comparable operator for stl containers.

bool Pothos::Proxy::operator< ( const Proxy obj) const

Comparable operator for stl containers.

bool Pothos::Proxy::operator> ( const Proxy obj) const

Comparable operator for stl containers.

bool Pothos::Proxy::operator> ( const Proxy obj) const

Comparable operator for stl containers.

std::string Pothos::Proxy::toString ( void  ) const

Get the string representation of the Proxy. The format of the string is highly specific, depending upon the underlying object.

std::string Pothos::Proxy::toString ( void  ) const

Get the string representation of the Proxy. The format of the string is highly specific, depending upon the underlying object.


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