BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Protected Member Functions | Protected Attributes | List of all members
BALL::ShiftModel Class Reference

#include <BALL/NMR/shiftModel.h>

Inheritance diagram for BALL::ShiftModel:
BALL::ShiftModule BALL::UnaryProcessor< Composite > BALL::UnaryFunctor< Composite, Processor::Result >

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
ParametersgetParameters ()
 
ModuleListgetModuleList ()
 
void setFilename (const String &filename) throw (Exception::FileNotFound)
 
const StringgetFilename () 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 ShiftModeloperator= (const ShiftModel &model)
 
const ShiftModeloperator= (const String &filename)
 
Processor related methods
bool start ()
 
bool finish ()
 
Processor::Result operator() (Composite &composite)
 
- Public Member Functions inherited from BALL::ShiftModule
 ShiftModule ()
 
 ShiftModule (Parameters &parameters, const String &name="")
 
 ShiftModule (const ShiftModule &module)
 
virtual ~ShiftModule ()
 
const ShiftModuleoperator= (const ShiftModule &module)
 
void setName (const String &name)
 
const StringgetName () const
 
void setParameters (Parameters &parameters)
 
const ParametersgetParameters () const
 
virtual void init ()
 
bool isValid () const
 
- Public Member Functions inherited from BALL::UnaryProcessor< Composite >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 

Public Attributes

Public Attributes
Options options
 

Static Public Attributes

Constants
static const char * MODULE_LIST_SECTION
 
- Static Public Attributes inherited from BALL::ShiftModule
static const char * PROPERTY__SHIFT
 
static const char * PROPERTY__EXPERIMENTAL__SHIFT
 

Protected Member Functions

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

Protected Attributes

Parameters parameters_
 
ModuleList modules_
 
CreateMethodMap registered_modules_
 
bool valid_
 
- Protected Attributes inherited from BALL::ShiftModule
String module_name_
 
Parametersparameters_
 
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.

Definition at line 32 of file shiftModel.h.

Member Typedef Documentation

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.

The module list type

Definition at line 45 of file shiftModel.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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
bool BALL::ShiftModel::isRegistered ( const String name) const

Check whether a module of this name is registered

bool BALL::ShiftModel::isValid ( ) const

Validity flag

Processor::Result BALL::ShiftModel::operator() ( Composite composite)
virtual

Application method

Reimplemented from BALL::UnaryProcessor< Composite >.

const ShiftModel& BALL::ShiftModel::operator= ( const ShiftModel model)

Assignment operator

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

Assignment operator (via filename).

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.

Member Data Documentation

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.

Options BALL::ShiftModel::options

Options

Definition at line 159 of file shiftModel.h.

Parameters BALL::ShiftModel::parameters_
protected

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

Definition at line 214 of file shiftModel.h.