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

Parameters Class Reference
[General Purpose File Formats]

General Parameter class. More...

#include <parameters.h>

Inheritance diagram for Parameters:

ForceFieldParameters List of all members.

Public Member Functions

Constructors and destructor
 Parameters ()
 Default constructor.
 Parameters (const String &filename)
 Constructor.
 Parameters (const Parameters &force_field_parameter)
 Copy constructor.
virtual ~Parameters ()
 Destructor.
virtual void clear () throw ()
 Clear method.
Assignment
const Parametersoperator= (const Parameters &parameters)
 Assignment operator.
Accessors
void setFilename (const String &filename)
 Sets the filename for the INI file.
const StringgetFilename () const
 Return the current INI file's name.
INIFilegetParameterFile ()
 Return a reference to the INI file.
bool init ()
 Read the contents of the INI file and interpret them.
Predicates
virtual bool isValid () const
 Validity predicate.
bool operator== (const Parameters &parameters) const
 Equality operator.

Protected Attributes

bool valid_
INIFile INI_file_

Detailed Description

General Parameter class.

This class is intended to simplify parameter management for force fields or other stronlgy parameterized methods. It is based on INIFile .


Constructor & Destructor Documentation

Parameters::Parameters  ) 
 

Default constructor.

Parameters::Parameters const String filename  ) 
 

Constructor.

virtual Parameters::~Parameters  )  [virtual]
 

Destructor.


Member Function Documentation

virtual void Parameters::clear  )  throw () [virtual]
 

Clear method.

Reimplemented in ForceFieldParameters.

const String& Parameters::getFilename  )  const
 

Return the current INI file's name.

INIFile& Parameters::getParameterFile  ) 
 

Return a reference to the INI file.

bool Parameters::init  ) 
 

Read the contents of the INI file and interpret them.

Reimplemented in ForceFieldParameters.

virtual bool Parameters::isValid  )  const [virtual]
 

Validity predicate.

Return true if the parameters were correctly initialized, the internal INI file is valid.

Returns:
bool - valid_ && parameter_file_.isValid()

Reimplemented in ForceFieldParameters.

void Parameters::setFilename const String filename  ) 
 

Sets the filename for the INI file.