CellMLToSharedLibraryConverter Class Reference

#include <CellMLToSharedLibraryConverter.hpp>

List of all members.

Public Member Functions

DynamicCellModelLoaderConvert (const FileFinder &rFilePath, bool isCollective=true)

Private Member Functions

void ConvertCellmlToSo (const std::string &rCellmlFullPath, const std::string &rCellmlFolder, const std::string &rModelLeafName)

Detailed Description

This class encapsulates all the complexity needed to generate a loadable module from a CellML file.

Definition at line 41 of file CellMLToSharedLibraryConverter.hpp.


Member Function Documentation

DynamicCellModelLoader * CellMLToSharedLibraryConverter::Convert ( const FileFinder rFilePath,
bool  isCollective = true 
)

Get a loadable module from the given file, and return a loader for it. The file can be a .so, in which case there isn't much to do, just create the loader. The interesting case comes when it is a .cellml file. If the file has any other extension, an exception is thrown.

Parameters:
rFilePath the model to load
isCollective whether this method is being called collectively. If it is not, then we require the .so to already exist, rather than trying to avoid race conditions.
Note:
If you do not pass isCollective=false, must be called collectively.

Definition at line 41 of file CellMLToSharedLibraryConverter.cpp.

References ConvertCellmlToSo(), FileFinder::Exists(), FileFinder::GetAbsolutePath(), DynamicModelLoaderRegistry::GetLoader(), DynamicModelLoaderRegistry::Instance(), and FileFinder::IsNewerThan().

void CellMLToSharedLibraryConverter::ConvertCellmlToSo ( const std::string &  rCellmlFullPath,
const std::string &  rCellmlFolder,
const std::string &  rModelLeafName 
) [private]

Helper method performing the actual conversion of a .cellml file to a .so.

Note:
Must be called collectively.
Parameters:
rCellmlFullPath full path to the .cellml file
rCellmlFolder folder containing the CellML file, with trailing slash
rModelLeafName leaf name of the CellML file, minus extension (but including the .)

Definition at line 92 of file CellMLToSharedLibraryConverter.cpp.

References PetscTools::AmMaster(), Exception::GetMessage(), and PetscTools::ReplicateException().

Referenced by Convert().


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

Generated by  doxygen 1.6.2