Pothos  0.3.3-g32d3017c
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
Public Member Functions | Static Public Member Functions | List of all members
Pothos::ManagedClass Class Reference

#include <Class.tmpl.hpp>

Public Member Functions

 ManagedClass (void)
 Create a new empty ManagedClass. More...
 
template<typename ClassType >
ManagedClassregisterClass (void)
 
template<typename ClassType , typename BaseClassType >
ManagedClassregisterBaseClass (void)
 
ManagedClassregisterToBaseClass (const Callable &toBase)
 
template<typename ClassType , $>
ManagedClassregisterConstructor (void)
 
template< $, typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)($expand('A%d', $NARGS)))
 
template< $, typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)($expand('A%d', $NARGS)))
 
template< $, typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)($expand('A%d', $NARGS)) const)
 
template<typename ClassType , typename ValueType >
ManagedClassregisterField (const std::string &name, ValueType ClassType::*member)
 
ManagedClassregisterReferenceToWrapper (const Callable &toPointer)
 
ManagedClassregisterPointerToWrapper (const Callable &toPointer)
 
ManagedClassregisterSharedToWrapper (const Callable &toPointer)
 
ManagedClassregisterConstructor (const Callable &constructor)
 
ManagedClassregisterStaticMethod (const std::string &name, const Callable &method)
 
ManagedClassregisterMethod (const std::string &name, const Callable &method)
 
ManagedClassregisterOpaqueConstructor (const Callable &constructor)
 
template<typename ClassType >
ManagedClassregisterOpaqueConstructor (void)
 
ManagedClassregisterOpaqueStaticMethod (const std::string &name, const Callable &method)
 
ManagedClassregisterWildcardStaticMethod (const Callable &method)
 
ManagedClassregisterOpaqueMethod (const std::string &name, const Callable &method)
 
ManagedClassregisterWildcardMethod (const Callable &method)
 
ManagedClasscommit (const std::string &classPath)
 
const std::type_info & type (void) const
 
const std::type_info & pointerType (void) const
 
const std::type_info & sharedType (void) const
 
const CallablegetReferenceToWrapper (void) const
 
const CallablegetPointerToWrapper (void) const
 
const CallablegetSharedToWrapper (void) const
 
const std::vector< Callable > & getBaseClassConverters (void) const
 
const std::vector< Callable > & getConstructors (void) const
 
const std::vector< Callable > & getStaticMethods (const std::string &name) const
 
const std::vector< Callable > & getMethods (const std::string &name) const
 
const CallablegetOpaqueConstructor (void) const
 
const CallablegetOpaqueStaticMethod (const std::string &name) const
 
const CallablegetWildcardStaticMethod (void) const
 
const CallablegetOpaqueMethod (const std::string &name) const
 
const CallablegetWildcardMethod (void) const
 
 ManagedClass (void)
 Create a new empty ManagedClass. More...
 
template<typename ClassType >
ManagedClassregisterClass (void)
 
template<typename ClassType , typename BaseClassType >
ManagedClassregisterBaseClass (void)
 
ManagedClassregisterToBaseClass (const Callable &toBase)
 
template<typename ClassType >
ManagedClassregisterConstructor (void)
 
template<typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)())
 
template<typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)())
 
template<typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)() const)
 
template<typename ClassType , typename A0 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0))
 
template<typename A0 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0))
 
template<typename A0 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0) const)
 
template<typename ClassType , typename A0 , typename A1 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename A1 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0, A1))
 
template<typename A0 , typename A1 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1))
 
template<typename A0 , typename A1 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1) const)
 
template<typename ClassType , typename A0 , typename A1 , typename A2 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename A1 , typename A2 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0, A1, A2))
 
template<typename A0 , typename A1 , typename A2 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2))
 
template<typename A0 , typename A1 , typename A2 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2) const)
 
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0, A1, A2, A3))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3) const)
 
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0, A1, A2, A3, A4))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4) const)
 
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0, A1, A2, A3, A4, A5))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5) const)
 
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0, A1, A2, A3, A4, A5, A6))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6) const)
 
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0, A1, A2, A3, A4, A5, A6, A7))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6, A7))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6, A7) const)
 
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
ManagedClassregisterConstructor (void)
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename ReturnType >
ManagedClassregisterStaticMethod (const std::string &name, ReturnType(*method)(A0, A1, A2, A3, A4, A5, A6, A7, A8))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6, A7, A8))
 
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename ReturnType , typename ClassType >
ManagedClassregisterMethod (const std::string &name, ReturnType(ClassType::*method)(A0, A1, A2, A3, A4, A5, A6, A7, A8) const)
 
template<typename ClassType , typename ValueType >
ManagedClassregisterField (const std::string &name, ValueType ClassType::*member)
 
ManagedClassregisterReferenceToWrapper (const Callable &toPointer)
 
ManagedClassregisterPointerToWrapper (const Callable &toPointer)
 
ManagedClassregisterSharedToWrapper (const Callable &toPointer)
 
ManagedClassregisterConstructor (const Callable &constructor)
 
ManagedClassregisterStaticMethod (const std::string &name, const Callable &method)
 
ManagedClassregisterMethod (const std::string &name, const Callable &method)
 
ManagedClassregisterOpaqueConstructor (const Callable &constructor)
 
template<typename ClassType >
ManagedClassregisterOpaqueConstructor (void)
 
ManagedClassregisterOpaqueStaticMethod (const std::string &name, const Callable &method)
 
ManagedClassregisterWildcardStaticMethod (const Callable &method)
 
ManagedClassregisterOpaqueMethod (const std::string &name, const Callable &method)
 
ManagedClassregisterWildcardMethod (const Callable &method)
 
ManagedClasscommit (const std::string &classPath)
 
const std::type_info & type (void) const
 
const std::type_info & pointerType (void) const
 
const std::type_info & sharedType (void) const
 
const CallablegetReferenceToWrapper (void) const
 
const CallablegetPointerToWrapper (void) const
 
const CallablegetSharedToWrapper (void) const
 
const std::vector< Callable > & getBaseClassConverters (void) const
 
const std::vector< Callable > & getConstructors (void) const
 
const std::vector< Callable > & getStaticMethods (const std::string &name) const
 
const std::vector< Callable > & getMethods (const std::string &name) const
 
const CallablegetOpaqueConstructor (void) const
 
const CallablegetOpaqueStaticMethod (const std::string &name) const
 
const CallablegetWildcardStaticMethod (void) const
 
const CallablegetOpaqueMethod (const std::string &name) const
 
const CallablegetWildcardMethod (void) const
 

Static Public Member Functions

static ManagedClass lookup (const std::type_info &type)
 
static void unload (const std::string &classPath)
 
static ManagedClass lookup (const std::type_info &type)
 
static void unload (const std::string &classPath)
 

Detailed Description

ManagedClass represents registered constructors and methods of a class. A ManagedClass makes calls available to users via the Callable interface.

Constructor & Destructor Documentation

Pothos::ManagedClass::ManagedClass ( void  )

Create a new empty ManagedClass.

Pothos::ManagedClass::ManagedClass ( void  )

Create a new empty ManagedClass.

Member Function Documentation

ManagedClass& Pothos::ManagedClass::commit ( const std::string &  classPath)

Commit this registration into the plugin tree. The actual registration will be stored to /managed/classPath. An example class path might be "MyNamespace/MyClass".

Exceptions
PluginPathErrorif the classPath is invalid
Parameters
classPaththe namespaces and class name
ManagedClass& Pothos::ManagedClass::commit ( const std::string &  classPath)

Commit this registration into the plugin tree. The actual registration will be stored to /managed/classPath. An example class path might be "MyNamespace/MyClass".

Exceptions
PluginPathErrorif the classPath is invalid
Parameters
classPaththe namespaces and class name
const std::vector<Callable>& Pothos::ManagedClass::getBaseClassConverters ( void  ) const

Get a list of available converters to base classes

Returns
a list of converters as callables
const std::vector<Callable>& Pothos::ManagedClass::getBaseClassConverters ( void  ) const

Get a list of available converters to base classes

Returns
a list of converters as callables
const std::vector<Callable>& Pothos::ManagedClass::getConstructors ( void  ) const

Get a list of available constructors.

Returns
a list of constructors as callables
const std::vector<Callable>& Pothos::ManagedClass::getConstructors ( void  ) const

Get a list of available constructors.

Returns
a list of constructors as callables
const std::vector<Callable>& Pothos::ManagedClass::getMethods ( const std::string &  name) const

Get a list of available methods for the given method name.

Exceptions
ManagedClassNameErrorif the name does not exist in the registry
Parameters
namethe name of the method to look for
Returns
a list of methods as callables
const std::vector<Callable>& Pothos::ManagedClass::getMethods ( const std::string &  name) const

Get a list of available methods for the given method name.

Exceptions
ManagedClassNameErrorif the name does not exist in the registry
Parameters
namethe name of the method to look for
Returns
a list of methods as callables
const Callable& Pothos::ManagedClass::getOpaqueConstructor ( void  ) const

Get the opaque constructor. The opaque contructor takes (Object *args, size_t num).

Returns
a callable object for a constructor
const Callable& Pothos::ManagedClass::getOpaqueConstructor ( void  ) const

Get the opaque constructor. The opaque contructor takes (Object *args, size_t num).

Returns
a callable object for a constructor
const Callable& Pothos::ManagedClass::getOpaqueMethod ( const std::string &  name) const

Get the opaque method for the given method name. The opaque method takes (Object *args, size_t num).

Exceptions
ManagedClassNameErrorif the name does not exist in the registry
Parameters
namethe name of the method to look for
Returns
a callable object for a method
const Callable& Pothos::ManagedClass::getOpaqueMethod ( const std::string &  name) const

Get the opaque method for the given method name. The opaque method takes (Object *args, size_t num).

Exceptions
ManagedClassNameErrorif the name does not exist in the registry
Parameters
namethe name of the method to look for
Returns
a callable object for a method
const Callable& Pothos::ManagedClass::getOpaqueStaticMethod ( const std::string &  name) const

Get the opaque static methods for the given method name. The opaque static method takes (Object *args, size_t num).

Exceptions
ManagedClassNameErrorif the name does not exist in the registry
Parameters
namethe name of the static method to look for
Returns
a callable object for a static method
const Callable& Pothos::ManagedClass::getOpaqueStaticMethod ( const std::string &  name) const

Get the opaque static methods for the given method name. The opaque static method takes (Object *args, size_t num).

Exceptions
ManagedClassNameErrorif the name does not exist in the registry
Parameters
namethe name of the static method to look for
Returns
a callable object for a static method
const Callable& Pothos::ManagedClass::getPointerToWrapper ( void  ) const

Get a callable that converts a pointer into a ref wrapper.

const Callable& Pothos::ManagedClass::getPointerToWrapper ( void  ) const

Get a callable that converts a pointer into a ref wrapper.

const Callable& Pothos::ManagedClass::getReferenceToWrapper ( void  ) const

Get a callable that converts a reference into a ref wrapper.

const Callable& Pothos::ManagedClass::getReferenceToWrapper ( void  ) const

Get a callable that converts a reference into a ref wrapper.

const Callable& Pothos::ManagedClass::getSharedToWrapper ( void  ) const

Get a callable that converts a shared pointer into a ref wrapper.

const Callable& Pothos::ManagedClass::getSharedToWrapper ( void  ) const

Get a callable that converts a shared pointer into a ref wrapper.

const std::vector<Callable>& Pothos::ManagedClass::getStaticMethods ( const std::string &  name) const

Get a list of available static methods for the given method name.

Exceptions
ManagedClassNameErrorif the name does not exist in the registry
Parameters
namethe name of the static method to look for
Returns
a list of static methods as callables
const std::vector<Callable>& Pothos::ManagedClass::getStaticMethods ( const std::string &  name) const

Get a list of available static methods for the given method name.

Exceptions
ManagedClassNameErrorif the name does not exist in the registry
Parameters
namethe name of the static method to look for
Returns
a list of static methods as callables
const Callable& Pothos::ManagedClass::getWildcardMethod ( void  ) const

Get the wildcard static method. This is a catch-all for methods when there is not a name match. The opaque wildcard method takes (std::string name, Object *args, size_t num).

Returns
a callable object for a method
const Callable& Pothos::ManagedClass::getWildcardMethod ( void  ) const

Get the wildcard static method. This is a catch-all for methods when there is not a name match. The opaque wildcard method takes (std::string name, Object *args, size_t num).

Returns
a callable object for a method
const Callable& Pothos::ManagedClass::getWildcardStaticMethod ( void  ) const

Get the wildcard opaque static method. This is a catch-all for static methods when there is not a name match. The opaque wildcard static method takes (std::string name, Object *args, size_t num).

Returns
a callable object for a static method
const Callable& Pothos::ManagedClass::getWildcardStaticMethod ( void  ) const

Get the wildcard opaque static method. This is a catch-all for static methods when there is not a name match. The opaque wildcard static method takes (std::string name, Object *args, size_t num).

Returns
a callable object for a static method
static ManagedClass Pothos::ManagedClass::lookup ( const std::type_info &  type)
static

Lookup a managed class based on typeinfo for the class.

static ManagedClass Pothos::ManagedClass::lookup ( const std::type_info &  type)
static

Lookup a managed class based on typeinfo for the class.

const std::type_info& Pothos::ManagedClass::pointerType ( void  ) const

Get the pointer version of the class type represented.

Exceptions
ManagedClassTypeErrorif no constructors registered
const std::type_info& Pothos::ManagedClass::pointerType ( void  ) const

Get the pointer version of the class type represented.

Exceptions
ManagedClassTypeErrorif no constructors registered
template<typename ClassType , typename BaseClassType >
ManagedClass& Pothos::ManagedClass::registerBaseClass ( void  )

Register a public base class of this managed class. This adopts the inherited methods of the base class.

template<typename ClassType , typename BaseClassType >
ManagedClass & Pothos::ManagedClass::registerBaseClass ( void  )

Register a public base class of this managed class. This adopts the inherited methods of the base class.

template<typename ClassType >
ManagedClass & Pothos::ManagedClass::registerClass ( void  )

Register information and conversions about the ClassType. This routine is automatically called during constructor and method registration calls.

template<typename ClassType >
ManagedClass& Pothos::ManagedClass::registerClass ( void  )

Register information and conversions about the ClassType. This routine is automatically called during constructor and method registration calls.

template<typename ClassType >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 0 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , $>
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and $NARGS argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 >
ManagedClass& Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 1 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 , typename A1 >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 2 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerConstructor ( const Callable constructor)

Register a constructor via a callable. This method is called by the templated method of the same name.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 , typename A1 , typename A2 >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 3 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 4 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 5 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 6 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 7 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 8 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 >
ManagedClass & Pothos::ManagedClass::registerConstructor ( void  )

Register a constructor given class type and 9 argument types.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerConstructor ( const Callable constructor)

Register a constructor via a callable. This method is called by the templated method of the same name.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType , typename ValueType >
ManagedClass & Pothos::ManagedClass::registerField ( const std::string &  name,
ValueType ClassType::*  member 
)

Register an accessor and mutator method for the field. The accessor and mutator are registered under the names "get:name" and "set:name". Example usage: myManagedClass.registerField(&MyClass:myField); The accessor method can be called on a class instance and takes no arguments. The mutator method can be called on a class instance and takes the new value as the first argument.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
Parameters
namethe name of the field
membera pointer to a data member of Class
template<typename ClassType , typename ValueType >
ManagedClass& Pothos::ManagedClass::registerField ( const std::string &  name,
ValueType ClassType::*  member 
)

Register an accessor and mutator method for the field. The accessor and mutator are registered under the names "get:name" and "set:name". Example usage: myManagedClass.registerField(&MyClass:myField); The accessor method can be called on a class instance and takes no arguments. The mutator method can be called on a class instance and takes the new value as the first argument.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
Parameters
namethe name of the field
membera pointer to a data member of Class
template<typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)()  method 
)

Register a method given class name and function pointer of 0 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template< $, typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)($expand('A%d', $NARGS))  method 
)

Register a method given class name and function pointer of $NARGS args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)() const  method 
)

Register a method given class name and function pointer of 0 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template< $, typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)($expand('A%d', $NARGS)) const  method 
)

Register a method given class name and function pointer of $NARGS args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0)  method 
)

Register a method given class name and function pointer of 1 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0) const  method 
)

Register a method given class name and function pointer of 1 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1)  method 
)

Register a method given class name and function pointer of 2 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1) const  method 
)

Register a method given class name and function pointer of 2 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
const Callable method 
)

Register a method via a callable. This method is called by the templated method of the same name.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2)  method 
)

Register a method given class name and function pointer of 3 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2) const  method 
)

Register a method given class name and function pointer of 3 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3)  method 
)

Register a method given class name and function pointer of 4 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3) const  method 
)

Register a method given class name and function pointer of 4 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4)  method 
)

Register a method given class name and function pointer of 5 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4) const  method 
)

Register a method given class name and function pointer of 5 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4, A5)  method 
)

Register a method given class name and function pointer of 6 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4, A5) const  method 
)

Register a method given class name and function pointer of 6 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4, A5, A6)  method 
)

Register a method given class name and function pointer of 7 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4, A5, A6) const  method 
)

Register a method given class name and function pointer of 7 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4, A5, A6, A7)  method 
)

Register a method given class name and function pointer of 8 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4, A5, A6, A7) const  method 
)

Register a method given class name and function pointer of 8 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename ReturnType , typename ClassType >
ManagedClass & Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)  method 
)

Register a method given class name and function pointer of 9 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename ReturnType , typename ClassType >
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
ReturnType(ClassType::*)(A0, A1, A2, A3, A4, A5, A6, A7, A8) const  method 
)

Register a method given class name and function pointer of 9 args.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerMethod ( const std::string &  name,
const Callable method 
)

Register a method via a callable. This method is called by the templated method of the same name.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerOpaqueConstructor ( const Callable constructor)

Register a callable that takes generic arguments (Object *args, size_t num).

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType >
ManagedClass & Pothos::ManagedClass::registerOpaqueConstructor ( void  )

Template version of registerOpaqueConstructor for user's convenience.

ManagedClass& Pothos::ManagedClass::registerOpaqueConstructor ( const Callable constructor)

Register a callable that takes generic arguments (Object *args, size_t num).

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ClassType >
ManagedClass& Pothos::ManagedClass::registerOpaqueConstructor ( void  )

Template version of registerOpaqueConstructor for user's convenience.

ManagedClass& Pothos::ManagedClass::registerOpaqueMethod ( const std::string &  name,
const Callable method 
)

Register a static method with the following signature: Object method(instance, Object *args, size_t num).

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerOpaqueMethod ( const std::string &  name,
const Callable method 
)

Register a static method with the following signature: Object method(instance, Object *args, size_t num).

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerOpaqueStaticMethod ( const std::string &  name,
const Callable method 
)

Register a static method with the following signature: Object staticMethod(Object *args, size_t num).

ManagedClass& Pothos::ManagedClass::registerOpaqueStaticMethod ( const std::string &  name,
const Callable method 
)

Register a static method with the following signature: Object staticMethod(Object *args, size_t num).

ManagedClass& Pothos::ManagedClass::registerPointerToWrapper ( const Callable toPointer)

Register a conversion function from pointer to a ref wrapper. Called automatically when a constructor is registered via the templated interface.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerPointerToWrapper ( const Callable toPointer)

Register a conversion function from pointer to a ref wrapper. Called automatically when a constructor is registered via the templated interface.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerReferenceToWrapper ( const Callable toPointer)

Register a conversion function from reference to a ref wrapper. Called automatically when a constructor is registered via the templated interface.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerReferenceToWrapper ( const Callable toPointer)

Register a conversion function from reference to a ref wrapper. Called automatically when a constructor is registered via the templated interface.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerSharedToWrapper ( const Callable toPointer)

Register a conversion function from shared pointer to ref wrapper. Called automatically when a constructor is registered via the templated interface.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerSharedToWrapper ( const Callable toPointer)

Register a conversion function from shared pointer to ref wrapper. Called automatically when a constructor is registered via the templated interface.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
template<typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)()  method 
)

Register a static method given class name and function pointer of 0 args.

template< $, typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)($expand('A%d', $NARGS))  method 
)

Register a static method given class name and function pointer of $NARGS args.

template<typename A0 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0)  method 
)

Register a static method given class name and function pointer of 1 args.

template<typename A0 , typename A1 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0, A1)  method 
)

Register a static method given class name and function pointer of 2 args.

ManagedClass& Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
const Callable method 
)

Register a static method via a callable. This method is called by the templated method of the same name.

template<typename A0 , typename A1 , typename A2 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0, A1, A2)  method 
)

Register a static method given class name and function pointer of 3 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0, A1, A2, A3)  method 
)

Register a static method given class name and function pointer of 4 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0, A1, A2, A3, A4)  method 
)

Register a static method given class name and function pointer of 5 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0, A1, A2, A3, A4, A5)  method 
)

Register a static method given class name and function pointer of 6 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0, A1, A2, A3, A4, A5, A6)  method 
)

Register a static method given class name and function pointer of 7 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0, A1, A2, A3, A4, A5, A6, A7)  method 
)

Register a static method given class name and function pointer of 8 args.

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename ReturnType >
ManagedClass & Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
ReturnType(*)(A0, A1, A2, A3, A4, A5, A6, A7, A8)  method 
)

Register a static method given class name and function pointer of 9 args.

ManagedClass& Pothos::ManagedClass::registerStaticMethod ( const std::string &  name,
const Callable method 
)

Register a static method via a callable. This method is called by the templated method of the same name.

ManagedClass& Pothos::ManagedClass::registerToBaseClass ( const Callable toBase)

Register a conversion function from this class to a base class.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
Parameters
toBasea callable that converts between class types
ManagedClass& Pothos::ManagedClass::registerToBaseClass ( const Callable toBase)

Register a conversion function from this class to a base class.

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
Parameters
toBasea callable that converts between class types
ManagedClass& Pothos::ManagedClass::registerWildcardMethod ( const Callable method)

Register a static method with the following signature: Object method(instance, std::string name, Object *args, size_t num).

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerWildcardMethod ( const Callable method)

Register a static method with the following signature: Object method(instance, std::string name, Object *args, size_t num).

Exceptions
ManagedClassTypeErrorif the class type differs from the registered type
ManagedClass& Pothos::ManagedClass::registerWildcardStaticMethod ( const Callable method)

Register a static method with the following signature: Object staticMethod(std::string name, Object *args, size_t num).

ManagedClass& Pothos::ManagedClass::registerWildcardStaticMethod ( const Callable method)

Register a static method with the following signature: Object staticMethod(std::string name, Object *args, size_t num).

const std::type_info& Pothos::ManagedClass::sharedType ( void  ) const

Get the shared pointer version of the class type represented.

Exceptions
ManagedClassTypeErrorif no constructors registered
const std::type_info& Pothos::ManagedClass::sharedType ( void  ) const

Get the shared pointer version of the class type represented.

Exceptions
ManagedClassTypeErrorif no constructors registered
const std::type_info& Pothos::ManagedClass::type ( void  ) const

Get the type of the class represented. This is the type created by the constructors, and the type taken as the class by the bound methods.

Exceptions
ManagedClassTypeErrorif no constructors registered
const std::type_info& Pothos::ManagedClass::type ( void  ) const

Get the type of the class represented. This is the type created by the constructors, and the type taken as the class by the bound methods.

Exceptions
ManagedClassTypeErrorif no constructors registered
static void Pothos::ManagedClass::unload ( const std::string &  classPath)
static

Unload a managed class from the plugin tree. This reverses the effect of ManagedClass::commit(). This call is mainly used for testing purposes.

Exceptions
PluginPathErrorif the classPath is invalid
Parameters
classPaththe namespaces and class name
static void Pothos::ManagedClass::unload ( const std::string &  classPath)
static

Unload a managed class from the plugin tree. This reverses the effect of ManagedClass::commit(). This call is mainly used for testing purposes.

Exceptions
PluginPathErrorif the classPath is invalid
Parameters
classPaththe namespaces and class name

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