frepple::utils::CommandLoadLibrary Class Reference

Command to dynamically load a shared library in frePPLe. More...

#include <utils.h>

Inheritance diagram for frepple::utils::CommandLoadLibrary:
frepple::utils::Command

List of all members.

Public Types

typedef map< string, XMLElementParameterList

Public Member Functions

void addParameter (const string &name, const string &value)
 CommandLoadLibrary ()
 CommandLoadLibrary (const string &libname)
void endElement (XMLInput &pIn, const Attribute &pAttr, const DataElement &pElement)
void execute ()
string getDescription () const
string getLibraryName ()
void setLibraryName (const string &libname)

Static Public Member Functions

static PyObject * executePython (PyObject *, PyObject *, PyObject *)
static bool isLoaded (const string &s)
static void printModules ()

Detailed Description

Command to dynamically load a shared library in frePPLe.

After loading the library, the function "initialize" of the module is executed.

The current implementation of the command works on the following platforms:

Definition at line 3266 of file utils.h.


Member Typedef Documentation

Type for storing parameters.

Definition at line 3273 of file utils.h.


Constructor & Destructor Documentation

frepple::utils::CommandLoadLibrary::CommandLoadLibrary ( const string &  libname  )  [inline, explicit]

Constructor.

Parameters:
libname File name of the library

Definition at line 3278 of file utils.h.

frepple::utils::CommandLoadLibrary::CommandLoadLibrary (  )  [inline, explicit]

Default constructor.

Definition at line 3281 of file utils.h.


Member Function Documentation

void frepple::utils::CommandLoadLibrary::addParameter ( const string &  name,
const string &  value 
) [inline]

Add a parameter for the module.

Definition at line 3304 of file utils.h.

void frepple::utils::CommandLoadLibrary::endElement ( XMLInput pIn,
const Attribute pAttr,
const DataElement pElement 
)
void frepple::utils::CommandLoadLibrary::execute (  )  [virtual]

Load the library, and execute the initialize() method.

Exceptions:
RuntimeException When the library can't be loaded or when the initialize() method doesn't exist in the library.

Implements frepple::utils::Command.

Definition at line 389 of file utils/actions.cpp.

PyObject * frepple::utils::CommandLoadLibrary::executePython ( PyObject *  self,
PyObject *  args,
PyObject *  kwds 
) [static]

Python equivalent of this command.

Definition at line 484 of file utils/actions.cpp.

string frepple::utils::CommandLoadLibrary::getDescription (  )  const [inline, virtual]

Reimplemented from frepple::utils::Command.

Definition at line 3301 of file utils.h.

string frepple::utils::CommandLoadLibrary::getLibraryName (  )  [inline]

Returns the command line that will be run.

Definition at line 3289 of file utils.h.

static bool frepple::utils::CommandLoadLibrary::isLoaded ( const string &  s  )  [inline, static]

Returns true if a module with this name has been loaded.

Definition at line 3308 of file utils.h.

void frepple::utils::CommandLoadLibrary::printModules (  )  [static]

Print all modules that have been loaded.

Definition at line 524 of file utils/actions.cpp.

void frepple::utils::CommandLoadLibrary::setLibraryName ( const string &  libname  )  [inline]

Updates the command line to be executed.

Parameters:
libname Path of the library to be loaded

Definition at line 3286 of file utils.h.


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

Generated on 25 Feb 2010 for frePPLe by  doxygen 1.6.1