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 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 4005 of file utils.h.


Member Typedef Documentation

Type for storing parameters.

Definition at line 4012 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 4017 of file utils.h.

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

Default constructor.

Definition at line 4020 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 4042 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 388 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 483 of file utils/actions.cpp.

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

Returns the command line that will be run.

Definition at line 4028 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 4046 of file utils.h.

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

Print all modules that have been loaded.

Definition at line 523 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 4025 of file utils.h.


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

Generated on 16 Apr 2010 for frePPLe by  doxygen 1.6.1