Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

ShiftModel Class Reference
[Shift model classes]

A class representing a complete parameterized NMR shift model. More...

#include <shiftModel.h>

Inheritance diagram for ShiftModel:

ShiftModule UnaryProcessor< Composite > UnaryFunctor< Composite, Processor::Result > List of all members.

Public Types

Type definitions
typedef List< ShiftModule * > ModuleList
 The module list type.
typedef void *(* CreateMethod )()
 The creation method type.
typedef StringHashMap< CreateMethodCreateMethodMap
 The creation method hash map type.

Public Member Functions

Constructors and Destructors
 ShiftModel () throw ()
 Default Constructor.
 ShiftModel (const String &filename) throw ()
 Detailed Constructor.
 ShiftModel (const ShiftModel &model) throw ()
 Copy constructor.
virtual ~ShiftModel () throw ()
 Destructor.
void clear () throw ()
 Clear method.
Accessors
ParametersgetParameters () throw ()
ModuleListgetModuleList () throw ()
 Return the list of modules.
void setFilename (const String &filename) throw (Exception::FileNotFound)
 Set the parameter filename.
const StringgetFilename () const throw ()
 Return the parameter filename.
void registerModule (const String &name, CreateMethod method) throw (Exception::NullPointer)
 Register a new module type.
void unregisterModule (const String &name) throw ()
 Unregister a module type.
Predicates
bool isValid () const throw ()
 Validity flag.
bool isRegistered (const String &name) const throw ()
 Check whether a module of this name is registered.
Assignment
const ShiftModeloperator= (const ShiftModel &model) throw ()
 Assignment operator.
const ShiftModeloperator= (const String &filename) throw ()
 Assignment operator (via filename).
Processor related methods
bool start () throw ()
 Start method.
bool finish () throw ()
 Finish method.
Processor::Result operator() (Composite &composite) throw ()
 Application method.

Public Attributes

Public Attributes
Options options
 Options.

Static Public Attributes

Constants
const char * MODULE_LIST_SECTION
 The name of the section containing the module types and names of the model.

Protected Member Functions

bool init_ () throw (Exception::FileNotFound)
ShiftModulecreateModule_ (const String &type, const String &name) const throw ()
void registerStandardModules_ () throw ()

Protected Attributes

Parameters parameters_
ModuleList modules_
CreateMethodMap registered_modules_
bool valid_

Detailed Description

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.


Member Typedef Documentation

typedef void*(* ShiftModel::CreateMethod)()
 

The creation method type.

This type describes a method that can construct an object of type ShiftModule.

typedef StringHashMap<CreateMethod> ShiftModel::CreateMethodMap
 

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).


Member Function Documentation

void ShiftModel::clear  )  throw () [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 ShiftModule.

const String& ShiftModel::getFilename  )  const throw ()
 

Return the parameter filename.

const ShiftModel& ShiftModel::operator= const String filename  )  throw ()
 

Assignment operator (via filename).

void ShiftModel::registerModule const String name,
CreateMethod  method
throw (Exception::NullPointer)
 

Register a new module type.

void ShiftModel::setFilename const String filename  )  throw (Exception::FileNotFound)
 

Set the parameter filename.

void ShiftModel::unregisterModule const String name  )  throw ()
 

Unregister a module type.