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

Class to hold parameters in a Casa table. More...

#include <ParmDBCasa.h>

Inheritance diagram for dp3::parmdb::ParmDBCasa:
dp3::parmdb::ParmDBRep

Public Member Functions

 ParmDBCasa (const std::string &tableName, bool forceNew=false)
 
 ~ParmDBCasa () override
 
void clearTables () override
 Clear database or table. More...
 
void deleteDefValues (const std::string &parmNamePattern) override
 Delete the default value records for the given parameters. More...
 
void deleteValues (const std::string &parmNamePattern, const Box &domain) override
 Delete the value records for the given parameters and domain. More...
 
void flush (bool fsync) override
 Flush possible changes to disk. More...
 
void getDefValues (ParmMap &result, const std::string &parmNamePattern) override
 
int getNameId (const std::string &parmName) override
 
std::vector< std::string > getNames (const std::string &pattern) override
 Get the names of all parms matching the given (filename like) pattern. More...
 
void getValues (std::vector< ParmValueSet > &values, const std::vector< unsigned int > &nameIds, const std::vector< ParmId > &parmIds, const Box &domain) override
 
void putDefValue (const std::string &name, const ParmValueSet &value, bool check=true) override
 Put the default value. More...
 
void putValues (const std::string &parmName, int &nameId, ParmValueSet &values) override
 
void setDefaultSteps (const std::vector< double > &) override
 Set the default step values. More...
 
void lock (bool lockForWrite) override
 
void unlock () override
 
Box getRange (const std::string &parmNamePattern) const override
 
Box getRange (const std::vector< std::string > &parmNames) const override
 
- Public Member Functions inherited from dp3::parmdb::ParmDBRep
 ParmDBRep ()
 
virtual ~ParmDBRep ()
 
void clearDefFilled ()
 
const std::vector< double > & getDefaultSteps () const
 Get the default step values for the axes. More...
 
ParmValueSet getDefValue (const std::string &parmName, const ParmValue &defaultValue)
 
virtual void getValuesPattern (ParmMap &result, const std::string &parmNamePattern, const Box &domain)
 
void link ()
 Link to the DBRep by incrementing the count. More...
 
int unlink ()
 Unlink by decrementing the count. More...
 
void setParmDBMeta (const ParmDBMeta &ptm)
 
const ParmDBMetagetParmDBMeta () const
 
void setParmDBSeqNr (int seqnr)
 
int getParmDBSeqNr () const
 

Additional Inherited Members

- Protected Member Functions inherited from dp3::parmdb::ParmDBRep
void setDefStep (unsigned int i, double value)
 Set the i-th default step value (i<2) in order x,y. More...
 

Detailed Description

Class to hold parameters in a Casa table.

Constructor & Destructor Documentation

◆ ParmDBCasa()

dp3::parmdb::ParmDBCasa::ParmDBCasa ( const std::string &  tableName,
bool  forceNew = false 
)
explicit

◆ ~ParmDBCasa()

dp3::parmdb::ParmDBCasa::~ParmDBCasa ( )
override

Member Function Documentation

◆ clearTables()

void dp3::parmdb::ParmDBCasa::clearTables ( )
overridevirtual

Clear database or table.

Implements dp3::parmdb::ParmDBRep.

◆ deleteDefValues()

void dp3::parmdb::ParmDBCasa::deleteDefValues ( const std::string &  parmNamePattern)
overridevirtual

Delete the default value records for the given parameters.

Implements dp3::parmdb::ParmDBRep.

◆ deleteValues()

void dp3::parmdb::ParmDBCasa::deleteValues ( const std::string &  parmNamePattern,
const Box domain 
)
overridevirtual

Delete the value records for the given parameters and domain.

Implements dp3::parmdb::ParmDBRep.

◆ flush()

void dp3::parmdb::ParmDBCasa::flush ( bool  fsync)
overridevirtual

Flush possible changes to disk.

Reimplemented from dp3::parmdb::ParmDBRep.

◆ getDefValues()

void dp3::parmdb::ParmDBCasa::getDefValues ( ParmMap result,
const std::string &  parmNamePattern 
)
overridevirtual

Get the default value for the given parameters. Only * and ? should be used in the pattern (no [] and {}).

Implements dp3::parmdb::ParmDBRep.

◆ getNameId()

int dp3::parmdb::ParmDBCasa::getNameId ( const std::string &  parmName)
overridevirtual

Get the id of a parameter. If not found in the Names table, it returns -1.

Implements dp3::parmdb::ParmDBRep.

◆ getNames()

std::vector<std::string> dp3::parmdb::ParmDBCasa::getNames ( const std::string &  pattern)
overridevirtual

Get the names of all parms matching the given (filename like) pattern.

Implements dp3::parmdb::ParmDBRep.

◆ getRange() [1/2]

Box dp3::parmdb::ParmDBCasa::getRange ( const std::string &  parmNamePattern) const
overridevirtual

Get the domain range (time,freq) of the given parameters in the table. This is the minimum and maximum value of these axes for all parameters. An empty name pattern is the same as * (all parms).

Implements dp3::parmdb::ParmDBRep.

◆ getRange() [2/2]

Box dp3::parmdb::ParmDBCasa::getRange ( const std::vector< std::string > &  parmNames) const
overridevirtual

◆ getValues()

void dp3::parmdb::ParmDBCasa::getValues ( std::vector< ParmValueSet > &  values,
const std::vector< unsigned int > &  nameIds,
const std::vector< ParmId > &  parmIds,
const Box domain 
)
overridevirtual

Get the parameter values for the given parameters and domain. The parmids form the indices in the result vector.

Implements dp3::parmdb::ParmDBRep.

◆ lock()

void dp3::parmdb::ParmDBCasa::lock ( bool  lockForWrite)
overridevirtual

Writelock and unlock the table. It is not necessary to do this, but it can be useful if many small accesses have to be done.

Reimplemented from dp3::parmdb::ParmDBRep.

◆ putDefValue()

void dp3::parmdb::ParmDBCasa::putDefValue ( const std::string &  name,
const ParmValueSet value,
bool  check = true 
)
overridevirtual

Put the default value.

Implements dp3::parmdb::ParmDBRep.

◆ putValues()

void dp3::parmdb::ParmDBCasa::putValues ( const std::string &  parmName,
int &  nameId,
ParmValueSet values 
)
overridevirtual

Put the values for the given parameter name and id. If it is a new value, the new rowid will be stored in the ParmValueSet. If it is a new name, the nameId will be filled in.

Implements dp3::parmdb::ParmDBRep.

◆ setDefaultSteps()

void dp3::parmdb::ParmDBCasa::setDefaultSteps ( const std::vector< double > &  )
overridevirtual

Set the default step values.

Implements dp3::parmdb::ParmDBRep.

◆ unlock()

void dp3::parmdb::ParmDBCasa::unlock ( )
overridevirtual

Reimplemented from dp3::parmdb::ParmDBRep.


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