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::Value Class Reference

#include <Value.h>

List of all members.

Public Member Functions

 Value ()
 ~Value ()
 Value (const std::string &value)
 Value (const char *value)
 Value (int value)
 Value (unsigned int value)
 Value (Real value)
 Value (bool value)
 Value (const Vector3D &value)
 Value (const std::vector< Real > &value)
 Value (const ValueType::Integrator &value)
 Value (const ValueType::Force &value)
 Value (const Value &other)
 Value (const std::string &value, const Undefined *)
 Value (const char *value, const Undefined *)
 Value (int value, const Undefined *)
 Value (unsigned int value, const Undefined *)
 Value (Real value, const Undefined *)
 Value (bool value, const Undefined *)
 Value (const Vector3D &value, const Undefined *)
 Value (const std::vector< Real > &value, const Undefined *)
 Value (const ValueType::Integrator &value, const Undefined *)
 Value (const ValueType::Force &value, const Undefined *)
 Value (const Value &value, const Undefined *)
template<typename T, typename C>  Value (const T &value, const C &)
template<typename T, typename C>  Value (const T &value, const C &, const Undefined *)
template<typename T, typename C>  Value (const T &, const C &, const Value &value)
template<typename T> Valueoperator= (const T &value)
Valueoperator= (const Value &rhs)
 operator std::string () const
 operator int () const
 operator unsigned int () const
 operator Real () const
 operator bool () const
 operator Vector3D () const
 operator std::vector () const
bool valid () const
bool defined () const
bool clear ()
bool init ()
unsigned int size () const
const std::type_info & type () const
std::string getString () const
std::string getDefinitionTypeString () const
std::string debug () const
ValueType::Enum getType () const
ConstraintValueType::Enum getConstraintType () const
const std::string & getTypeString () const
const std::string & getConstraintTypeString () const
bool equalType (const Value &v) const
bool equalConstraint (const Value &v) const
bool equalTypeAndConstraint (const Value &v) const
bool set (Value v)
template<typename T> bool set (const T &value)
template<typename T> bool get (T &value) const
template<typename T> T get () const

Static Public Attributes

const Undefinedundefined

Private Member Functions

Valueswap (Value &rhs)
void read (std::istream &is)

Static Private Member Functions

template<typename T> bool equal (const Value &v1, const Value &v2)
template<typename T> bool less (const Value &v1, const Value &v2)
template<typename T> bool lessEqual (const Value &v1, const Value &v2)
template<typename T> bool greater (const Value &v1, const Value &v2)
template<typename T> bool greaterEqual (const Value &v1, const Value &v2)
template<typename T> bool equalType (const Value &v1, const Value &v2)

Private Attributes

PlaceHoldermyValue

Friends

Report::MyStreameroperator<< (Report::MyStreamer &os, const Value &v)
std::istream & operator>> (std::istream &is, Value &v)
bool operator== (const Value &v1, const Value &v2)
template<typename T> bool operator== (const Value &v1, const T &v2)
template<typename T> bool operator== (const T &v1, const Value &v2)
bool operator!= (const Value &v1, const Value &v2)
template<typename T> bool operator!= (const Value &v1, const T &v2)
template<typename T> bool operator!= (const T &v1, const Value &v2)
bool operator< (const Value &v1, const Value &v2)
template<typename T> bool operator< (const Value &v1, const T &v2)
template<typename T> bool operator< (const T &v1, const Value &v2)
bool operator<= (const Value &v1, const Value &v2)
template<typename T> bool operator<= (const Value &v1, const T &v2)
template<typename T> bool operator<= (const T &v1, const Value &v2)
bool operator> (const Value &v1, const Value &v2)
template<typename T> bool operator> (const Value &v1, const T &v2)
template<typename T> bool operator> (const T &v1, const Value &v2)
bool operator>= (const Value &v1, const Value &v2)
template<typename T> bool operator>= (const Value &v1, const T &v2)
template<typename T> bool operator>= (const T &v1, const Value &v2)


Detailed Description

Represents a value with a type and associated with a constraint. A Value object can behave as 8 different types, or be undefined:


Constructor & Destructor Documentation

ProtoMol::Value::Value  ) 
 

ProtoMol::Value::~Value  ) 
 

ProtoMol::Value::Value const std::string &  value  )  [explicit]
 

ProtoMol::Value::Value const char *  value  )  [explicit]
 

ProtoMol::Value::Value int  value  )  [explicit]
 

ProtoMol::Value::Value unsigned int  value  )  [explicit]
 

ProtoMol::Value::Value Real  value  )  [explicit]
 

ProtoMol::Value::Value bool  value  )  [explicit]
 

ProtoMol::Value::Value const Vector3D value  )  [explicit]
 

ProtoMol::Value::Value const std::vector< Real > &  value  )  [explicit]
 

ProtoMol::Value::Value const ValueType::Integrator &  value  )  [explicit]
 

ProtoMol::Value::Value const ValueType::Force &  value  )  [explicit]
 

ProtoMol::Value::Value const Value other  ) 
 

ProtoMol::Value::Value const std::string &  value,
const Undefined
 

ProtoMol::Value::Value const char *  value,
const Undefined
 

ProtoMol::Value::Value int  value,
const Undefined
 

ProtoMol::Value::Value unsigned int  value,
const Undefined
 

ProtoMol::Value::Value Real  value,
const Undefined
 

ProtoMol::Value::Value bool  value,
const Undefined
 

ProtoMol::Value::Value const Vector3D value,
const Undefined
 

ProtoMol::Value::Value const std::vector< Real > &  value,
const Undefined
 

ProtoMol::Value::Value const ValueType::Integrator &  value,
const Undefined
 

ProtoMol::Value::Value const ValueType::Force &  value,
const Undefined
 

ProtoMol::Value::Value const Value value,
const Undefined
 

template<typename T, typename C>
ProtoMol::Value::Value const T &  value,
const C & 
[inline]
 

template<typename T, typename C>
ProtoMol::Value::Value const T &  value,
const C &  ,
const Undefined
[inline]
 

template<typename T, typename C>
ProtoMol::Value::Value const T &  ,
const C &  ,
const Value value
[inline]
 


Member Function Documentation

bool ProtoMol::Value::clear  )  [inline]
 

string ProtoMol::Value::debug  )  const
 

Returns a complete debug string of the value, validity, type and constraint.

bool ProtoMol::Value::defined  )  const [inline]
 

template<typename T>
bool ProtoMol::Value::equal const Value v1,
const Value v2
[inline, static, private]
 

bool ProtoMol::Value::equalConstraint const Value v  )  const [inline]
 

Test on constraint type.

template<typename T>
bool ProtoMol::Value::equalType const Value v1,
const Value v2
[inline, static, private]
 

bool ProtoMol::Value::equalType const Value v  )  const [inline]
 

Test on type.

bool ProtoMol::Value::equalTypeAndConstraint const Value v  )  const [inline]
 

Test on type and constraint type.

template<typename T>
T ProtoMol::Value::get  )  const [inline]
 

Retrieve of the value by conversions.

template<typename T>
bool ProtoMol::Value::get T &  value  )  const [inline]
 

Safe retrieve of the value, (trying) converting to the passed type.

ConstraintValueType::Enum ProtoMol::Value::getConstraintType  )  const [inline]
 

const std::string & ProtoMol::Value::getConstraintTypeString  )  const [inline]
 

string ProtoMol::Value::getDefinitionTypeString  )  const
 

Returns a string containing the type, value (only if valid) and constraint (if defined).

string ProtoMol::Value::getString  )  const
 

ValueType::Enum ProtoMol::Value::getType  )  const [inline]
 

const std::string & ProtoMol::Value::getTypeString  )  const [inline]
 

bool ProtoMol::Value::greater< vector< Real > > const Value v1,
const Value v2
[inline, static, private]
 

bool ProtoMol::Value::greaterEqual< vector< Real > > const Value v1,
const Value v2
[inline, static, private]
 

bool ProtoMol::Value::init  )  [inline]
 

bool ProtoMol::Value::less< vector< Real > > const Value v1,
const Value v2
[inline, static, private]
 

bool ProtoMol::Value::lessEqual< vector< Real > > const Value v1,
const Value v2
[inline, static, private]
 

ProtoMol::Value::operator bool  )  const
 

ProtoMol::Value::operator int  )  const
 

ProtoMol::Value::operator Real  )  const
 

ProtoMol::Value::operator std::string  )  const
 

ProtoMol::Value::operator std::vector  )  const
 

ProtoMol::Value::operator unsigned int  )  const
 

ProtoMol::Value::operator Vector3D  )  const
 

Value & ProtoMol::Value::operator= const Value rhs  ) 
 

template<typename T>
Value& ProtoMol::Value::operator= const T &  value  )  [inline]
 

void ProtoMol::Value::read std::istream &  is  )  [private]
 

template<typename T>
bool ProtoMol::Value::set const T &  value  )  [inline]
 

Sets the value, type and constraints are unchanged.

bool ProtoMol::Value::set Value  v  ) 
 

Sets the value, type and constraints are unchanged.

unsigned int ProtoMol::Value::size  )  const [inline]
 

Value & ProtoMol::Value::swap Value rhs  )  [private]
 

const std::type_info & ProtoMol::Value::type  )  const [inline]
 

bool ProtoMol::Value::valid  )  const [inline]
 


Friends And Related Function Documentation

template<typename T>
bool operator!= const T &  v1,
const Value v2
[friend]
 

template<typename T>
bool operator!= const Value v1,
const T &  v2
[friend]
 

bool operator!= const Value v1,
const Value v2
[friend]
 

template<typename T>
bool operator< const T &  v1,
const Value v2
[friend]
 

template<typename T>
bool operator< const Value v1,
const T &  v2
[friend]
 

bool operator< const Value v1,
const Value v2
[friend]
 

Report::MyStreamer& operator<< Report::MyStreamer os,
const Value v
[friend]
 

template<typename T>
bool operator<= const T &  v1,
const Value v2
[friend]
 

template<typename T>
bool operator<= const Value v1,
const T &  v2
[friend]
 

bool operator<= const Value v1,
const Value v2
[friend]
 

template<typename T>
bool operator== const T &  v1,
const Value v2
[friend]
 

template<typename T>
bool operator== const Value v1,
const T &  v2
[friend]
 

bool operator== const Value v1,
const Value v2
[friend]
 

template<typename T>
bool operator> const T &  v1,
const Value v2
[friend]
 

template<typename T>
bool operator> const Value v1,
const T &  v2
[friend]
 

bool operator> const Value v1,
const Value v2
[friend]
 

template<typename T>
bool operator>= const T &  v1,
const Value v2
[friend]
 

template<typename T>
bool operator>= const Value v1,
const T &  v2
[friend]
 

bool operator>= const Value v1,
const Value v2
[friend]
 

std::istream& operator>> std::istream &  is,
Value v
[friend]
 


Member Data Documentation

PlaceHolder* ProtoMol::Value::myValue [private]
 

const Value::Undefined * ProtoMol::Value::undefined [static]
 

Undefined value.


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