1.2.3
CCC
 
Getting and Setting functions by Locator

Functions

int Db::getLocNumber (const ELoc &loctype) const
 
bool Db::hasLocVariable (const ELoc &loctype) const
 
double Db::getLocVariable (const ELoc &loctype, int iech, int item) const
 
void Db::setLocVariable (const ELoc &loctype, int iech, int item, double value)
 
void Db::updLocVariable (const ELoc &loctype, int iech, int item, const EOperator &oper, double value)
 

Detailed Description

Various functions for accessing fields of the Db using the locator designation. They use the argument 'loctype' which refers to the Locator type (see ELoc enumeration). In most cases, they also refer to 'item' i.e. the rank (0 based) for the target locator.

Parameters
loctypeTarget locator
iechTarget sample (0 based)
itemRank of the 'loctype' locator (0 based)
operType of operation
  • 0 : New = New + Old
  • 1 : New = New * Old
  • 2 : New = New - Old
  • 3 : New = Old / New
  • 4 : New = New (only if old is defined)
  • 5 : New = MAX(New, Old)
  • 6 : New = MIN(New, Old)
valueAssigned value

Function Documentation

int Db::getLocNumber ( const ELoc &  loctype) const

Returns the number of fields corresponding to the target locator present in the Db

Returns
Number of fields
double Db::getLocVariable ( const ELoc &  loctype,
int  iech,
int  item 
) const

Get the value of the field corresponding to the target locator (and its target item) at the target sample

Returns
Returned value
bool Db::hasLocVariable ( const ELoc &  loctype) const

Check if there is at least one field corresponding to the target locator

Returns
TRUE if at least one field corresponds to 'loctype' locator; FALSE otherwise
void Db::setLocVariable ( const ELoc &  loctype,
int  iech,
int  item,
double  value 
)

Set the value of the field corresponding to the target locator (and its target item) at the target sample

void Db::updLocVariable ( const ELoc &  loctype,
int  iech,
int  item,
const EOperator &  oper,
double  value 
)

Update the value of the field corresponding to the target locator (and its target item) at the target sample