OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | Friends | List of all members
FcstUtilities::DatabaseOC Class Reference

This class is for storing a list of up to 10 parameters and is used as a way of informing the FCSTdatabase class about the model you wish to store/access. More...

#include <fcst_db.h>

Public Member Functions

 DatabaseOC ()
 Constructor. More...
 
bool add_param (const std::string &name, const double &value)
 Function for adding a parameter (name and value pair) to the list of up to 5 parameters. More...
 
bool add_param (const std::string &, const std::string &)
 
void clear ()
 Function for clearing parameter data so one can reuse the same object more than once. More...
 
bool compare (const DatabaseOC &other, const double &tolerance)
 Function for performing a tolerance based comparison of OC object with another OC object. More...
 

Private Attributes

int num_param
 
int max_param
 
std::vector< std::vector
< std::string > > 
param_data
 

Friends

class FCSTdatabase
 

Detailed Description

This class is for storing a list of up to 10 parameters and is used as a way of informing the FCSTdatabase class about the model you wish to store/access.

Constructor & Destructor Documentation

FcstUtilities::DatabaseOC::DatabaseOC ( )

Constructor.

Member Function Documentation

bool FcstUtilities::DatabaseOC::add_param ( const std::string &  name,
const double &  value 
)

Function for adding a parameter (name and value pair) to the list of up to 5 parameters.

Returns false if unsuccessful.

See Unit test "testHasData" for usage demo.

bool FcstUtilities::DatabaseOC::add_param ( const std::string &  ,
const std::string &   
)
void FcstUtilities::DatabaseOC::clear ( )
inline

Function for clearing parameter data so one can reuse the same object more than once.

References num_param, and param_data.

bool FcstUtilities::DatabaseOC::compare ( const DatabaseOC other,
const double &  tolerance 
)

Function for performing a tolerance based comparison of OC object with another OC object.

Returns false if the two OC objects do not match within a certain tolerance.

Friends And Related Function Documentation

friend class FCSTdatabase
friend

Member Data Documentation

int FcstUtilities::DatabaseOC::max_param
private
int FcstUtilities::DatabaseOC::num_param
private

Referenced by clear().

std::vector<std::vector<std::string> > FcstUtilities::DatabaseOC::param_data
private

Referenced by clear().


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