DynamicModelLoaderRegistry Class Reference

#include <DynamicModelLoaderRegistry.hpp>

Collaboration diagram for DynamicModelLoaderRegistry:
Collaboration graph
[legend]

List of all members.

Public Member Functions

DynamicCellModelLoaderGetLoader (const std::string &rPath)
DynamicCellModelLoaderGetLoader (const FileFinder &rFileFinder)
 ~DynamicModelLoaderRegistry ()

Static Public Member Functions

static DynamicModelLoaderRegistryInstance ()

Private Member Functions

 DynamicModelLoaderRegistry ()
 DynamicModelLoaderRegistry (const DynamicModelLoaderRegistry &)
DynamicModelLoaderRegistryoperator= (const DynamicModelLoaderRegistry &)

Private Attributes

std::map< std::string,
DynamicCellModelLoader * > 
mLoaders

Static Private Attributes

static std::auto_ptr
< DynamicModelLoaderRegistry
mpInstance

Detailed Description

When loading cell models dynamically, the loader object needs to be alive for as long as cells created by it are alive. Unfortunately, the HeartConfigRelatedCellFactory is typically destroyed as soon as the cells have been created, prior to the simulation. Hence, this class provides a static registry to keep track of the model loaders used. It also ensures we don't load a given .so more than once.

Definition at line 45 of file DynamicModelLoaderRegistry.hpp.


Constructor & Destructor Documentation

DynamicModelLoaderRegistry::~DynamicModelLoaderRegistry (  ) 

Destructor closes all loaded .so files.

Definition at line 58 of file DynamicModelLoaderRegistry.cpp.

References mLoaders.

DynamicModelLoaderRegistry::DynamicModelLoaderRegistry (  )  [private]

Private constructor; all access should be via Instance().

Definition at line 68 of file DynamicModelLoaderRegistry.cpp.

Referenced by Instance().

DynamicModelLoaderRegistry::DynamicModelLoaderRegistry ( const DynamicModelLoaderRegistry  )  [private]

Copy constructor.


Member Function Documentation

DynamicCellModelLoader * DynamicModelLoaderRegistry::GetLoader ( const FileFinder rFileFinder  ) 

Get the loader for the given .so file.

Parameters:
rFileFinder finder for the .so file

Definition at line 53 of file DynamicModelLoaderRegistry.cpp.

References FileFinder::GetAbsolutePath(), and GetLoader().

DynamicCellModelLoader * DynamicModelLoaderRegistry::GetLoader ( const std::string &  rPath  ) 

Get the loader for the given .so file.

Parameters:
rPath absolute path to the .so

Definition at line 41 of file DynamicModelLoaderRegistry.cpp.

References mLoaders.

Referenced by CellMLToSharedLibraryConverter::Convert(), GetLoader(), and AbstractCardiacPde< SPACE_DIM >::LoadCardiacCells().

DynamicModelLoaderRegistry * DynamicModelLoaderRegistry::Instance (  )  [static]
DynamicModelLoaderRegistry& DynamicModelLoaderRegistry::operator= ( const DynamicModelLoaderRegistry  )  [private]

Overloaded assignment operator.


Member Data Documentation

Loaders for shared-library cell models. Map is from absolute path of the library, to loader object.

Definition at line 75 of file DynamicModelLoaderRegistry.hpp.

Referenced by GetLoader(), and ~DynamicModelLoaderRegistry().

The single instance of this class.

The loader registry instance

Definition at line 78 of file DynamicModelLoaderRegistry.hpp.

Referenced by Instance().


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

Generated by  doxygen 1.6.2