ProtoMol - an object-oriented component based framework for Molecular Dynamics simulations.

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

ProtoMol::InputValue< TBase, type, constraint > Class Template Reference

#include <InputValue.h>

List of all members.

Public Types

typedef Enum2ValueTraits<
type >::Type 
Type
typedef ConstraintValueEnum::Enum2Type<
constraint > 
Constraint

Public Member Functions

 InputValue ()
template<typename T>  InputValue (const T &v)
 InputValue (const char *v)
virtual ~InputValue ()
template<typename T> InputValueoperator= (const T &value)
InputValueoperator= (const char *value)
InputValueoperator= (const InputValue &rhs)
 operator Value () const
template<typename T>  operator T () const
template<typename T> bool get (T &val) const
bool valid () const
InputValueswap (InputValue &rhs)

Static Public Member Functions

void registerConfiguration (Configuration *config, Value v)
template<typename T> void registerConfiguration (Configuration *config, T v)
void registerConfiguration (Configuration *config)
void registerConfiguration (Configuration *config, Value v, const Text &txt)
template<typename T> void registerConfiguration (Configuration *config, T v, const Text &txt)
void registerConfiguration (Configuration *config, const Text &txt)

Private Attributes

Value myValue

Friends

Report::MyStreameroperator<< (Report::MyStreamer &OS, const InputValue &v)


Detailed Description

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
class ProtoMol::InputValue< TBase, type, constraint >

Template class with macros for simple creation of input parameters for the configuration file.

Example for the temperatur, real number, non-negative

Declaration
declareInputValue(InputTemperature,REAL,NOTNEGATIVE);

Definition, with and without aliases
defineInputValue(InputTemperature,"temperature");
defineInputValueWithAliases(InputTemperature,"temperature",("temp")("t"));

Defintion with help text
defineInputValueAndText(InputTemperature,"temperature","initial temperature, [K]");
defineInputValueWithAliasesAndText(InputTemperature,"temperature",("temp")("t"),"initial temperature, [K]");

Usage
InputTemperature t(9.9);
t = -3; \ now t invalid
t = "3.3"; \ ok again


Member Typedef Documentation

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
typedef ConstraintValueEnum::Enum2Type<constraint> ProtoMol::InputValue< TBase, type, constraint >::Constraint
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
typedef Enum2ValueTraits<type>::Type ProtoMol::InputValue< TBase, type, constraint >::Type
 


Constructor & Destructor Documentation

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
ProtoMol::InputValue< TBase, type, constraint >::InputValue  )  [inline]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
template<typename T>
ProtoMol::InputValue< TBase, type, constraint >::InputValue const T &  v  )  [inline, explicit]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
ProtoMol::InputValue< TBase, type, constraint >::InputValue const char *  v  )  [inline, explicit]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
virtual ProtoMol::InputValue< TBase, type, constraint >::~InputValue  )  [inline, virtual]
 


Member Function Documentation

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
template<typename T>
bool ProtoMol::InputValue< TBase, type, constraint >::get T &  val  )  const [inline]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
template<typename T>
ProtoMol::InputValue< TBase, type, constraint >::operator T  )  const [inline]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
ProtoMol::InputValue< TBase, type, constraint >::operator Value  )  const [inline]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
InputValue& ProtoMol::InputValue< TBase, type, constraint >::operator= const InputValue< TBase, type, constraint > &  rhs  )  [inline]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
InputValue& ProtoMol::InputValue< TBase, type, constraint >::operator= const char *  value  )  [inline]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
template<typename T>
InputValue& ProtoMol::InputValue< TBase, type, constraint >::operator= const T &  value  )  [inline]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
void ProtoMol::InputValue< TBase, type, constraint >::registerConfiguration Configuration config,
const Text txt
[inline, static]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
template<typename T>
void ProtoMol::InputValue< TBase, type, constraint >::registerConfiguration Configuration config,
v,
const Text txt
[inline, static]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
void ProtoMol::InputValue< TBase, type, constraint >::registerConfiguration Configuration config,
Value  v,
const Text txt
[inline, static]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
void ProtoMol::InputValue< TBase, type, constraint >::registerConfiguration Configuration config  )  [inline, static]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
template<typename T>
void ProtoMol::InputValue< TBase, type, constraint >::registerConfiguration Configuration config,
v
[inline, static]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
void ProtoMol::InputValue< TBase, type, constraint >::registerConfiguration Configuration config,
Value  v
[inline, static]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
InputValue& ProtoMol::InputValue< TBase, type, constraint >::swap InputValue< TBase, type, constraint > &  rhs  )  [inline]
 

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
bool ProtoMol::InputValue< TBase, type, constraint >::valid  )  const [inline]
 


Friends And Related Function Documentation

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
Report::MyStreamer& operator<< Report::MyStreamer OS,
const InputValue< TBase, type, constraint > &  v
[friend]
 


Member Data Documentation

template<typename TBase, ValueType::Enum type, ConstraintValueType::Enum constraint = ConstraintValueType::NOCONSTRAINTS>
Value ProtoMol::InputValue< TBase, type, constraint >::myValue [private]
 


The documentation for this class was generated from the following file: Last update: . GNU GENERAL PUBLIC LICENSE, copyrighted by the University of Notre Dame and the University of Bergen, Norway.