Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

SPARK::TGlobalSettings Class Reference

Class acts as repository of global control settings defined at the problem level. More...

#include <prefs.h>

List of all members.

Public Member Functions

Structors
 TGlobalSettings ()
 Initialize all settings to compile-time default values.

 TGlobalSettings (const TGlobalSettings &)
 Copy constructor.

 ~TGlobalSettings () throw ()
 Trivial destructor.

Main operations
void Reset ()
 Resets settings to default values See namespace SPARK::DefaultSettings.

void Load (SPARK::TPrefList *prefList)
 Performs shallow copy of prefList into member datum PrefList and loads hard-coded settings.

Access methods for hard-coded global settings
double GetTolerance () const
 Returns the value of the relative tolerance specified with the key Tolerance in the GlobalSettings section of the *.prf file.

void SetTolerance (double scalar)
 Sets relative tolerance to scalar.

double GetMaxTolerance () const
 Returns the value of the max relative tolerance specified with the key MaxTolerance in the GlobalSettings section of the *.prf file.

void SetMaxTolerance (double scalar)
 Sets the max relative tolerance to scalar.

double GetPredictionSafetyFactor () const
 Returns the prediction safety factor (used in convergence test) as double.

void SetPredictionSafetyFactor (double factor)
 Sets the prediction safety factor to factor.

double GetIterationSafetyFactor () const
 Returns the iteration safety factor (used in convergence test) as double.

void SetIterationSafetyFactor (double factor)
 Sets the iteration safety factor to factor.

double GetBreakUnknownSafetyFactor () const
 Returns the safety factor for a break unknown (used in convergence test) as double.

void SetBreakUnknownSafetyFactor (double factor)
 Sets the safety factor for a break unknown to factor.

double GetNormalUnknownSafetyFactor () const
 Returns the safety factor for a normal unknown (used in convergence test) as double.

void SetNormalUnknownSafetyFactor (double factor)
 Sets the safety factor for a normal unknown to factor.

Access methods for customized global settings
Note:
The key can be specified either as a simple key with "Key" or a complex key with "Key1:Key2"


const char * GetString (const std::string &key, const std::string &defaultString) const
 Returns as const char* the entry for the key in the GlobalSettings section of the *.prf file.

double GetScalar (const std::string &key, double defaultScalar) const
 Returns as double the entry for the key in the GlobalSettings section of the *.prf file.

unsigned GetCount (const std::string &key, unsigned defaultCount) const
 Returns as unsigned the entry for the key in the GlobalSettings section of the *.prf file.

I/O Operations
void Write (std::ostream &os, const std::string &before) const


Detailed Description

Class acts as repository of global control settings defined at the problem level.

Behavior:

See namespace SPARK::DefaultGlobalSettings for a list of the default hard-coded values.


Constructor & Destructor Documentation

SPARK::TGlobalSettings::TGlobalSettings  ) 
 

Initialize all settings to compile-time default values.

SPARK::TGlobalSettings::TGlobalSettings const TGlobalSettings  ) 
 

Copy constructor.

SPARK::TGlobalSettings::~TGlobalSettings  )  throw ()
 

Trivial destructor.


Member Function Documentation

void SPARK::TGlobalSettings::Reset  ) 
 

Resets settings to default values See namespace SPARK::DefaultSettings.

void SPARK::TGlobalSettings::Load SPARK::TPrefList *  prefList  ) 
 

Performs shallow copy of prefList into member datum PrefList and loads hard-coded settings.

double SPARK::TGlobalSettings::GetTolerance  )  const [inline]
 

Returns the value of the relative tolerance specified with the key Tolerance in the GlobalSettings section of the *.prf file.

void SPARK::TGlobalSettings::SetTolerance double  scalar  )  [inline]
 

Sets relative tolerance to scalar.

double SPARK::TGlobalSettings::GetMaxTolerance  )  const [inline]
 

Returns the value of the max relative tolerance specified with the key MaxTolerance in the GlobalSettings section of the *.prf file.

void SPARK::TGlobalSettings::SetMaxTolerance double  scalar  )  [inline]
 

Sets the max relative tolerance to scalar.

double SPARK::TGlobalSettings::GetPredictionSafetyFactor  )  const [inline]
 

Returns the prediction safety factor (used in convergence test) as double.

void SPARK::TGlobalSettings::SetPredictionSafetyFactor double  factor  )  [inline]
 

Sets the prediction safety factor to factor.

double SPARK::TGlobalSettings::GetIterationSafetyFactor  )  const [inline]
 

Returns the iteration safety factor (used in convergence test) as double.

void SPARK::TGlobalSettings::SetIterationSafetyFactor double  factor  )  [inline]
 

Sets the iteration safety factor to factor.

double SPARK::TGlobalSettings::GetBreakUnknownSafetyFactor  )  const [inline]
 

Returns the safety factor for a break unknown (used in convergence test) as double.

void SPARK::TGlobalSettings::SetBreakUnknownSafetyFactor double  factor  )  [inline]
 

Sets the safety factor for a break unknown to factor.

double SPARK::TGlobalSettings::GetNormalUnknownSafetyFactor  )  const [inline]
 

Returns the safety factor for a normal unknown (used in convergence test) as double.

void SPARK::TGlobalSettings::SetNormalUnknownSafetyFactor double  factor  )  [inline]
 

Sets the safety factor for a normal unknown to factor.

const char* SPARK::TGlobalSettings::GetString const std::string &  key,
const std::string &  defaultString
const
 

Returns as const char* the entry for the key in the GlobalSettings section of the *.prf file.

double SPARK::TGlobalSettings::GetScalar const std::string &  key,
double  defaultScalar
const
 

Returns as double the entry for the key in the GlobalSettings section of the *.prf file.

unsigned SPARK::TGlobalSettings::GetCount const std::string &  key,
unsigned  defaultCount
const
 

Returns as unsigned the entry for the key in the GlobalSettings section of the *.prf file.

void SPARK::TGlobalSettings::Write std::ostream &  os,
const std::string &  before
const
 

Writes the list of global settings to os

Note:
Only hard-coded global settings are printed since the other settings are not known a priori.


The documentation for this class was generated from the following file:

Generated on 5 Nov 2003 for VisualSPARK 2.01