Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

cluster::Callable Struct Reference

This struct implements a callable object (a functor, basically). More...

Collaboration diagram for cluster::Callable:

Collaboration graph
[legend]
List of all members.

Public Methods

 Callable (cluster::ClusterManager *clusterMgr)
bool operator() (void *func)
 This will be invoked as a callback by methods of vpr::LibraryLoader. More...


Public Attributes

cluster::ClusterManagermgr

Detailed Description

This struct implements a callable object (a functor, basically).

An instance can be passed in where a boost::function1<bool, void*> is expected. In cluster::ClusterManager::configAdd(), instances are used to handle dynamic loading of cluster plugins via vpr::LibraryLoader.

Definition at line 80 of file ClusterManager.cpp.


Constructor & Destructor Documentation

cluster::Callable::Callable cluster::ClusterManager   clusterMgr [inline]
 

Definition at line 82 of file ClusterManager.cpp.

References mgr.

00082                                                   : mgr(clusterMgr)
00083       {
00084       }


Member Function Documentation

bool cluster::Callable::operator() void *    func [inline]
 

This will be invoked as a callback by methods of vpr::LibraryLoader.

Parameters:
func  A function pointer for the entry point in a dynamically loaded device driver. This must be cast to the correct signature before being invoked.

Definition at line 93 of file ClusterManager.cpp.

00094       {
00095          void (*init_func)(ClusterManager*);
00096 
00097          // Cast the entry point function to the correct signature so that we can
00098          // call it.  All dynamically loaded drivers must have an entry point
00099          // function that takes a pointer to a cluster::ClusterManager instance and
00100          // returns nothing.
00101          init_func = (void (*)(ClusterManager*)) func;
00102 
00103          // Call the entry point function.
00104          (*init_func)(mgr);
00105 
00106          return true;
00107       }


Member Data Documentation

cluster::ClusterManager* cluster::Callable::mgr
 

Definition at line 109 of file ClusterManager.cpp.

Referenced by Callable.


The documentation for this struct was generated from the following file:
Generated on Sun May 2 14:26:43 2004 for Gadgeteer by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002