OpenM++ runtime library (libopenm)
openm::IRunOptionTable Struct Referenceabstract

run_option table public interface. More...

Inheritance diagram for openm::IRunOptionTable:
Collaboration diagram for openm::IRunOptionTable:

Public Member Functions

virtual const RunOptionRowbyKey (int i_runId, const string &i_key) const =0
 binary search row by primary key: run id and option key, return NULL if not found. More...
 
virtual vector< RunOptionRowbyRunId (int i_runId) const =0
 get list of rows by run id. More...
 
virtual bool isExist (int i_runId, const char *i_key) const noexcept=0
 return true if primary key (run id, option key) found. More...
 
virtual bool isExist (const char *i_key) const noexcept=0
 return true if option key found. More...
 
virtual string strValue (int i_runId, const char *i_key, const string &i_default="") const noexcept=0
 return string value by primary key (run id, option key) or default value if not found. More...
 
virtual string strValue (const char *i_key, const string &i_default="") const noexcept=0
 return string value by option key (first found) or default value if not found. More...
 
virtual bool boolValue (int i_runId, const char *i_key) const noexcept=0
 return boolean value by primary key (run id, option key) or false if not found or value not "yes", "1", "true". More...
 
virtual bool boolValue (const char *i_key) const noexcept=0
 return booleanvalue by option key (first found) or false if not found or value not "yes", "1", "true". More...
 
virtual long long longValue (int i_runId, const char *i_key, long long i_default) const noexcept=0
 return long value by primary key (run id, option key) or default if not found or can not be converted to long. More...
 
virtual long long longValue (const char *i_key, long long i_default) const noexcept=0
 return long value by option key (first found) or default if not found or can not be converted to long. More...
 
virtual double doubleValue (int i_runId, const char *i_key, double i_default) const noexcept=0
 return double value by primary key (run id, option key) or default if not found or can not be converted to double. More...
 
virtual double doubleValue (const char *i_key, double i_default) const noexcept=0
 return double value by option key (first found) or default if not found or can not be converted to double. More...
 
virtual IRowBaseVecrowsRef (void)=0
 get reference to list of all table rows. More...
 
- Public Member Functions inherited from openm::IMetaLoadedTable< RunOptionRow >
virtual const IRowBaseVecrowsCRef (void) const=0
 get const reference to list of all table rows. More...
 
IRowBaseVec::difference_type rowCount (void) const
 return number of rows. More...
 
vector< RunOptionRowrows (void) const
 get list of loaded table rows. More...
 
const RunOptionRowfirstRow (void) const
 return first table row or NULL if table is empty. More...
 
vector< RunOptionRowfindAll (RowEqual i_cmp) const
 get list of rows by predicate: all rows where comparator to i_row return true. More...
 
const RunOptionRowfindFirst (RowEqual i_cmp) const
 get first row by predicate or NULL if not found: first row where comparator to i_row return true. More...
 
const RunOptionRowbyIndex (IRowBaseVec::difference_type i_index) const
 return row value by index or NULL if out of range. More...
 
IRowBaseVec::difference_type indexOf (RowEqual i_cmp, IRowBaseVec::difference_type i_startPos=0) const
 get first row by predicate or -1 if not found: first row where comparator to i_row return true. More...
 
IRowBaseVec::size_type countOf (RowEqual i_cmp) const
 count rows by predicate: where comparator to i_row return true. More...
 

Static Public Member Functions

static IRunOptionTablecreate (IDbExec *i_dbExec, int i_runId=0)
 create new table object and load table rows sorted by primary key: run id and option key. More...
 
static IRunOptionTablecreate (IRowBaseVec &io_rowVec)
 create new table rows by swap with supplied vector of rows. More...
 

Additional Inherited Members

- Public Types inherited from openm::IMetaLoadedTable< RunOptionRow >
typedef function< bool(const RunOptionRow &i_dbRow)> RowEqual
 db table row comparator. More...
 
- Protected Member Functions inherited from openm::IMetaLoadedTable< RunOptionRow >
const RunOptionRowfindKey (const IRowBaseUptr &i_row) const
 binary search row by primary key, return NULL if not found. More...
 
- Static Protected Member Functions inherited from openm::IMetaLoadedTable< RunOptionRow >
static IRowBaseVec load (const string &i_sqlSelect, IDbExec *i_dbExec, const IRowAdapter &i_adapter)
 load table: return vector of selected rows sorted by primary key. More...
 
- Static Protected Member Functions inherited from openm::IMetaTable< RunOptionRow >
static vector< RunOptionRowrows (const IRowBaseVec &i_rowVec)
 get list of table rows. More...
 

Detailed Description

run_option table public interface.

Member Function Documentation

◆ boolValue() [1/2]

virtual bool openm::IRunOptionTable::boolValue ( int  i_runId,
const char *  i_key 
) const
pure virtualnoexcept

return boolean value by primary key (run id, option key) or false if not found or value not "yes", "1", "true".

Implemented in openm::RunOptionTable.

◆ boolValue() [2/2]

virtual bool openm::IRunOptionTable::boolValue ( const char *  i_key) const
pure virtualnoexcept

return booleanvalue by option key (first found) or false if not found or value not "yes", "1", "true".

Implemented in openm::RunOptionTable.

◆ byKey()

virtual const RunOptionRow* openm::IRunOptionTable::byKey ( int  i_runId,
const string &  i_key 
) const
pure virtual

binary search row by primary key: run id and option key, return NULL if not found.

Implemented in openm::RunOptionTable.

◆ byRunId()

virtual vector<RunOptionRow> openm::IRunOptionTable::byRunId ( int  i_runId) const
pure virtual

get list of rows by run id.

Implemented in openm::RunOptionTable.

◆ create() [1/2]

IRunOptionTable * IRunOptionTable::create ( IDbExec i_dbExec,
int  i_runId = 0 
)
static

create new table object and load table rows sorted by primary key: run id and option key.

if i_runId > 0 then select only rows where run_id = i_runId

◆ create() [2/2]

IRunOptionTable * IRunOptionTable::create ( IRowBaseVec io_rowVec)
static

create new table rows by swap with supplied vector of rows.

◆ doubleValue() [1/2]

virtual double openm::IRunOptionTable::doubleValue ( int  i_runId,
const char *  i_key,
double  i_default 
) const
pure virtualnoexcept

return double value by primary key (run id, option key) or default if not found or can not be converted to double.

Implemented in openm::RunOptionTable.

◆ doubleValue() [2/2]

virtual double openm::IRunOptionTable::doubleValue ( const char *  i_key,
double  i_default 
) const
pure virtualnoexcept

return double value by option key (first found) or default if not found or can not be converted to double.

Implemented in openm::RunOptionTable.

◆ isExist() [1/2]

virtual bool openm::IRunOptionTable::isExist ( int  i_runId,
const char *  i_key 
) const
pure virtualnoexcept

return true if primary key (run id, option key) found.

Implemented in openm::RunOptionTable.

◆ isExist() [2/2]

virtual bool openm::IRunOptionTable::isExist ( const char *  i_key) const
pure virtualnoexcept

return true if option key found.

Implemented in openm::RunOptionTable.

◆ longValue() [1/2]

virtual long long openm::IRunOptionTable::longValue ( int  i_runId,
const char *  i_key,
long long  i_default 
) const
pure virtualnoexcept

return long value by primary key (run id, option key) or default if not found or can not be converted to long.

Implemented in openm::RunOptionTable.

◆ longValue() [2/2]

virtual long long openm::IRunOptionTable::longValue ( const char *  i_key,
long long  i_default 
) const
pure virtualnoexcept

return long value by option key (first found) or default if not found or can not be converted to long.

Implemented in openm::RunOptionTable.

◆ rowsRef()

virtual IRowBaseVec& openm::IRunOptionTable::rowsRef ( void  )
pure virtual

get reference to list of all table rows.

Implements openm::IMetaLoadedTable< RunOptionRow >.

Implemented in openm::RunOptionTable.

◆ strValue() [1/2]

virtual string openm::IRunOptionTable::strValue ( int  i_runId,
const char *  i_key,
const string &  i_default = "" 
) const
pure virtualnoexcept

return string value by primary key (run id, option key) or default value if not found.

Implemented in openm::RunOptionTable.

◆ strValue() [2/2]

virtual string openm::IRunOptionTable::strValue ( const char *  i_key,
const string &  i_default = "" 
) const
pure virtualnoexcept

return string value by option key (first found) or default value if not found.

Implemented in openm::RunOptionTable.


The documentation for this struct was generated from the following files: