public interface of input parameter writer for model run
More...
#include <dbParameter.h>
|
virtual size_t | sizeOf (void) const noexcept=0 |
| return input parameter size for single sub value More...
|
|
virtual void | writeParameter (IDbExec *i_dbExec, const type_info &i_type, int i_subCount, size_t i_size, void *i_valueArr)=0 |
| write parameter: write all sub values of the parameter into db run table More...
|
|
virtual void | loadCsvParameter (IDbExec *i_dbExec, const vector< int > &i_subIdArr, const char *i_filePath, bool i_isIdCsv=false)=0 |
| load parameter values from csv file into run table, it can be any of: .csv .tsv .id.csv .id.tsv file. More...
|
|
virtual void | digestParameter (IDbExec *i_dbExec, int i_subCount, const type_info &i_type)=0 |
| calculate run parameter values digest and store only single copy of parameter values. More...
|
|
|
static IParameterRunWriter * | create (int i_runId, const char *i_name, IDbExec *i_dbExec, const MetaHolder *i_metaStore, const char *i_doubleFormat="") |
| input parameter writer factory
|
|
public interface of input parameter writer for model run
◆ digestParameter()
virtual void openm::IParameterRunWriter::digestParameter |
( |
IDbExec * |
i_dbExec, |
|
|
int |
i_subCount, |
|
|
const type_info & |
i_type |
|
) |
| |
|
pure virtual |
calculate run parameter values digest and store only single copy of parameter values.
- Parameters
-
[in] | i_dbExec | database connection |
[in] | i_subCount | number of parameter sub-values |
[in] | i_type | parameter type, use char * for string parameters |
Implemented in openm::ParameterRunWriter.
◆ loadCsvParameter()
virtual void openm::IParameterRunWriter::loadCsvParameter |
( |
IDbExec * |
i_dbExec, |
|
|
const vector< int > & |
i_subIdArr, |
|
|
const char * |
i_filePath, |
|
|
bool |
i_isIdCsv = false |
|
) |
| |
|
pure virtual |
load parameter values from csv file into run table, it can be any of: .csv .tsv .id.csv .id.tsv file.
- Parameters
-
[in] | i_dbExec | database connection |
[in] | i_subIdArr | sub-value id's to select from csv |
[in] | i_filePath | path to parameter.csv file, it can be any of: .csv .tsv .id.csv .id.tsv file. |
[in] | i_isIdCsv | if true then create csv file contains enum id's, default: enum code |
if file extension .tsv then it is a tab separated file, by default comma separated file expected. if i_isIdCsv is true or file extension is .id.csv or .id.tsv then file contains enum id's, by default enum codes expected
Implemented in openm::ParameterRunWriter.
◆ sizeOf()
virtual size_t openm::IParameterRunWriter::sizeOf |
( |
void |
| ) |
const |
|
pure virtualnoexcept |
◆ writeParameter()
virtual void openm::IParameterRunWriter::writeParameter |
( |
IDbExec * |
i_dbExec, |
|
|
const type_info & |
i_type, |
|
|
int |
i_subCount, |
|
|
size_t |
i_size, |
|
|
void * |
i_valueArr |
|
) |
| |
|
pure virtual |
write parameter: write all sub values of the parameter into db run table
- Parameters
-
[in] | i_dbExec | database connection |
[in] | i_type | parameter value type, use std::string for string parameters |
[in] | i_subCount | number of parameter sub-values |
[in] | i_size | parameter size for single sub value |
[in,out] | i_valueArr | array of parameter values, size must be == i_size * i_subCount |
Implemented in openm::ParameterRunWriter.
The documentation for this struct was generated from the following files: