Class PluggedObject#

Defined in Program listing for file kernel/src/modelingTools/PluggedObject.hpp

class PluggedObject#

Class to deal with plugged functions.

A plugin is a C-function defined in some external file.

This object handles a function pointer to this C-function.

Subclassed by SubPluggedObject

Public Functions

PluggedObject()#

Default Constructor.

PluggedObject(const std::string &name)#

Constructor with the plugin name.

Parameters:

name – a std::string of the form “fileName:functionName”, without an extension for pluginFile

PluggedObject(const PluggedObject &PO)#

Copy constructor.

Parameters:

PO – a PluggedObject we are going to copy

inline bool isPlugged() const#

bool to checked if a function is properly connected to the current object

Returns:

a boolean, true if fPtr is set

virtual ~PluggedObject()#

destructor

void setComputeFunction(const std::string &pluginPath, const std::string &functionName)#

Connect a function to fPtr.

Parameters:
  • pluginPath – name of the file where the function is defined (WITH extension)

  • functionName – name of the function to be connected

void setComputeFunction(void)#

Connect _pluginName to fPtr.

Warning

_pluginName must have been set before !

inline void setComputeFunction(void *functionPtr)#

Connect input function to fPtr.

Parameters:

functionPtr – a pointer to a C function

inline std::string pluginName(void) const#

Return the name of the plugin used to compute fPtr.

Returns:

_pluginName (a std::string)

Public Members

void *fPtr#

plug-in