DP3
Classes | Public Member Functions | List of all members
dp3::parmdb::ParmSet Class Reference

Set of parameters to be used. More...

#include <ParmSet.h>

Public Member Functions

 ParmSet ()
 
ParmId addParm (ParmDB &, const std::string &name)
 
void clear ()
 Clear the ParmSet. More...
 
ParmId find (const std::string &name) const
 
const std::vector< ParmDB * > getDBs () const
 Get the ParmDBs used in the ParmSet. More...
 
void getValues (std::vector< ParmValueSet > &, const Box &workDomain) const
 
bool isInParmDB (ParmId parmid) const
 Does the parm already exist in the ParmDB? More...
 
size_t size () const
 Get the nr of parameters. More...
 
void write (unsigned int parmId, ParmValueSet &)
 

Detailed Description

Set of parameters to be used.

Constructor & Destructor Documentation

◆ ParmSet()

dp3::parmdb::ParmSet::ParmSet ( )

Create an empty ParmSet. It can be filled using function addParm.

Member Function Documentation

◆ addParm()

ParmId dp3::parmdb::ParmSet::addParm ( ParmDB ,
const std::string &  name 
)

Add a parm for the given ParmDB. If not existing in the parmDB, it will be added to the ParmDB when its values are written.
It returns a unique parmId.
If the parm has been added before to the ParmSet, it returns the already known parmid.

◆ clear()

void dp3::parmdb::ParmSet::clear ( )

Clear the ParmSet.

◆ find()

ParmId dp3::parmdb::ParmSet::find ( const std::string &  name) const

Find the parmid of a previously added parm. An exception is thrown if not existing in the ParmSet.

◆ getDBs()

const std::vector<ParmDB*> dp3::parmdb::ParmSet::getDBs ( ) const
inline

Get the ParmDBs used in the ParmSet.

◆ getValues()

void dp3::parmdb::ParmSet::getValues ( std::vector< ParmValueSet > &  ,
const Box workDomain 
) const

Get the values for the given work domain for all parameters that are not part of the given vector. It means that the vector gets extended for all parameters at the end of itsParms.

◆ isInParmDB()

bool dp3::parmdb::ParmSet::isInParmDB ( ParmId  parmid) const
inline

Does the parm already exist in the ParmDB?

◆ size()

size_t dp3::parmdb::ParmSet::size ( ) const
inline

Get the nr of parameters.

Add zero or more existing parms. A vector of unique parmIds is returned.

vector<ParmId> addParms (ParmDB&, const vector<std::string>& names); vector<ParmId> addParms (ParmDB&, const std::string& namePattern);

◆ write()

void dp3::parmdb::ParmSet::write ( unsigned int  parmId,
ParmValueSet  
)

Write the parm values for the given parmid. For parms with a new name, ParmKey::itsNameId will get filled in. For new values, the rowId in the ParmValueSet will be filled in.


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