NEST  2.6.0,not_revisioned_source_dir@0
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
nest::DynamicLoaderModule Class Reference

SLI interface of the Ddynamic module loader. More...

#include <dynamicloader.h>

Inheritance diagram for nest::DynamicLoaderModule:
SLIModule

Classes

class  LoadModuleFunction
 
class  UnloadModuleFunction
 

Public Member Functions

 DynamicLoaderModule (Network *pNet, SLIInterpreter &interpreter)
 
 ~DynamicLoaderModule ()
 
void init (SLIInterpreter *)
 Initialise the module. More...
 
const std::string commandstring (void) const
 Return sli command sequence to be executed for initialisation. More...
 
const std::string name (void) const
 Return name of the module. More...
 
void initLinkedModules (SLIInterpreter &)
 
- Public Member Functions inherited from SLIModule
virtual ~SLIModule ()
 
void install (std::ostream &, SLIInterpreter *)
 Print installation message via interpreter message command. More...
 

Static Public Member Functions

static int registerLinkedModule (DynModule *pModule)
 This static member is called by the constructor of a loadable module that was linked at compile time into the application to circumvent dynamic loading problems. More...
 

Public Attributes

LoadModuleFunction loadmodule_function
 
UnloadModuleFunction unloadmodule_function
 

Static Private Member Functions

static vecLinkedModulesgetLinkedModules ()
 Provide access to the list of linked modules managed DynamicLoader. More...
 

Private Attributes

vecDynModules dyn_modules
 
NetworkpNet_
 

Static Private Attributes

static Dictionarymoduledict_ = new Dictionary()
 Dictionary for dynamically loaded modules. More...
 

Detailed Description

SLI interface of the Ddynamic module loader.

This class implements the SLI functions which allow for loading dynamic modules into the kernel to extend its functionality.

Constructor & Destructor Documentation

nest::DynamicLoaderModule::DynamicLoaderModule ( Network pNet,
SLIInterpreter interpreter 
)

At the time when DynamicLoaderModule is constructed, the SLI Interpreter and NestModule must be already constructed and initialized. DynamicLoaderModule relies on the presence of the following SLI datastructures: Name, Dictionary and on the nest::NestModule::net.

References assert(), SLIInterpreter::def(), moduledict_, pNet, and pNet_.

nest::DynamicLoaderModule::~DynamicLoaderModule ( )

References dyn_modules.

Member Function Documentation

const std::string nest::DynamicLoaderModule::commandstring ( void  ) const
virtual

Return sli command sequence to be executed for initialisation.

Reimplemented from SLIModule.

vecLinkedModules & nest::DynamicLoaderModule::getLinkedModules ( )
staticprivate

Provide access to the list of linked modules managed DynamicLoader.

This function controls access to the list of linked modules managed by DynamicLoaderModule via a Meyers' Singleton (Alexandrescu, ch 6.4). The list is filled by calls to registerLinkedModule().

Referenced by nest::DynamicLoaderModule::LoadModuleFunction::execute(), initLinkedModules(), and registerLinkedModule().

void nest::DynamicLoaderModule::init ( SLIInterpreter )
virtual

Initialise the module.

When this function is called, most of the interpreter's fascilities are up and running. However, depending on where in the interpreter's bootstrap sequence the module is initialised, not all services may be available.

Implements SLIModule.

References SLIInterpreter::createcommand(), loadmodule_function, SLIInterpreter::M_ERROR, SLIInterpreter::M_INFO, SLIInterpreter::message(), and unloadmodule_function.

void nest::DynamicLoaderModule::initLinkedModules ( SLIInterpreter interpreter)
const std::string nest::DynamicLoaderModule::name ( void  ) const
virtual

Return name of the module.

Implements SLIModule.

int nest::DynamicLoaderModule::registerLinkedModule ( DynModule pModule)
static

This static member is called by the constructor of a loadable module that was linked at compile time into the application to circumvent dynamic loading problems.

Typically, the constructor of the global instance of the module calls this method to register itself. Later, DynamicLoader will go through all registered modules and initialize them.

References assert(), and getLinkedModules().

Member Data Documentation

vecDynModules nest::DynamicLoaderModule::dyn_modules
private

Referenced by ~DynamicLoaderModule().

LoadModuleFunction nest::DynamicLoaderModule::loadmodule_function

Referenced by init().

Dictionary * nest::DynamicLoaderModule::moduledict_ = new Dictionary()
staticprivate

Dictionary for dynamically loaded modules.

Referenced by DynamicLoaderModule().

Network* nest::DynamicLoaderModule::pNet_
private
UnloadModuleFunction nest::DynamicLoaderModule::unloadmodule_function

Referenced by init().


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