#include <BALL/NMR/shiftModel.h>
Public Types | |
Type definitions | |
typedef std::list< ShiftModule * > | ModuleList |
typedef void *(* | CreateMethod )() |
typedef StringHashMap < CreateMethod > | CreateMethodMap |
Public Member Functions | |
Constructors and Destructors | |
ShiftModel () | |
ShiftModel (const String &filename) | |
ShiftModel (const ShiftModel &model) | |
virtual | ~ShiftModel () |
void | clear () |
Accessors | |
Parameters & | getParameters () |
ModuleList & | getModuleList () |
void | setFilename (const String &filename) throw (Exception::FileNotFound) |
const String & | getFilename () const |
void | registerModule (const String &name, CreateMethod method) throw (Exception::NullPointer) |
void | unregisterModule (const String &name) |
Predicates | |
bool | isValid () const |
bool | isRegistered (const String &name) const |
Assignment | |
const ShiftModel & | operator= (const ShiftModel &model) |
const ShiftModel & | operator= (const String &filename) |
Processor related methods | |
bool | start () |
bool | finish () |
Processor::Result | operator() (Composite &composite) |
Public Attributes | |
Public Attributes | |
Options | options |
Static Public Attributes | |
Constants | |
static const char * | MODULE_LIST_SECTION |
Protected Member Functions | |
bool | init_ () throw (Exception::FileNotFound) |
ShiftModule * | createModule_ (const String &type, const String &name) const |
void | registerStandardModules_ () |
Protected Attributes | |
Parameters | parameters_ |
ModuleList | modules_ |
CreateMethodMap | registered_modules_ |
bool | valid_ |
A class representing a complete parameterized NMR shift model. The model consists of a set of single contributions (e.g. ring curent, magnetic anisotropy, etc.). Each of these contributions is calculated by a separate ShiftModule object. ShiftModel contains a list of these processors and is also derived from ShiftModul. Hence, it can be applied to arbitrary kernel objects in the same fashion as ShiftModule s.
Definition at line 32 of file shiftModel.h.
typedef void*(* BALL::ShiftModel::CreateMethod)() |
The creation method type. This type describes a method that can construct an object of type ShiftModule.
Definition at line 51 of file shiftModel.h.
The creation method hash map type. This type is used internally to store the creation method corresponding to a certain symbolic name (usually the class name).
Definition at line 57 of file shiftModel.h.
typedef std::list<ShiftModule*> BALL::ShiftModel::ModuleList |
The module list type
Definition at line 45 of file shiftModel.h.
BALL::ShiftModel::ShiftModel | ( | ) |
Default Constructor
BALL::ShiftModel::ShiftModel | ( | const String & | filename | ) |
Detailed Constructor
BALL::ShiftModel::ShiftModel | ( | const ShiftModel & | model | ) |
Copy constructor
virtual BALL::ShiftModel::~ShiftModel | ( | ) | [virtual] |
Destructor
void BALL::ShiftModel::clear | ( | ) | [virtual] |
Clear method. This method destructs all shift modules in the module list. Then, it clears the module list, the parameters, and the options.
Reimplemented from BALL::ShiftModule.
ShiftModule* BALL::ShiftModel::createModule_ | ( | const String & | type, | |
const String & | name | |||
) | const [protected] |
bool BALL::ShiftModel::finish | ( | ) | [virtual] |
Finish method
Reimplemented from BALL::ShiftModule.
const String& BALL::ShiftModel::getFilename | ( | ) | const |
Return the parameter filename.
ModuleList& BALL::ShiftModel::getModuleList | ( | ) |
Return the list of modules
Parameters& BALL::ShiftModel::getParameters | ( | ) |
bool BALL::ShiftModel::init_ | ( | ) | throw (Exception::FileNotFound) [protected] |
Check whether a module of this name is registered
bool BALL::ShiftModel::isValid | ( | ) | const |
Validity flag
Reimplemented from BALL::ShiftModule.
Processor::Result BALL::ShiftModel::operator() | ( | Composite & | composite | ) | [virtual] |
Application method
Reimplemented from BALL::UnaryProcessor< Composite >.
const ShiftModel& BALL::ShiftModel::operator= | ( | const String & | filename | ) |
Assignment operator (via filename).
const ShiftModel& BALL::ShiftModel::operator= | ( | const ShiftModel & | model | ) |
Assignment operator
void BALL::ShiftModel::registerModule | ( | const String & | name, | |
CreateMethod | method | |||
) | throw (Exception::NullPointer) |
Register a new module type.
void BALL::ShiftModel::registerStandardModules_ | ( | ) | [protected] |
void BALL::ShiftModel::setFilename | ( | const String & | filename | ) | throw (Exception::FileNotFound) |
Set the parameter filename.
bool BALL::ShiftModel::start | ( | ) | [virtual] |
Start method
Reimplemented from BALL::ShiftModule.
void BALL::ShiftModel::unregisterModule | ( | const String & | name | ) |
Unregister a module type.
const char* BALL::ShiftModel::MODULE_LIST_SECTION [static] |
The name of the section containing the module types and names of the model
Definition at line 66 of file shiftModel.h.
ModuleList BALL::ShiftModel::modules_ [protected] |
Definition at line 205 of file shiftModel.h.
Definition at line 159 of file shiftModel.h.
Parameters BALL::ShiftModel::parameters_ [protected] |
Reimplemented from BALL::ShiftModule.
Definition at line 201 of file shiftModel.h.
CreateMethodMap BALL::ShiftModel::registered_modules_ [protected] |
Definition at line 209 of file shiftModel.h.
bool BALL::ShiftModel::valid_ [protected] |
Reimplemented from BALL::ShiftModule.
Definition at line 214 of file shiftModel.h.