OpenM++ runtime library (libopenm)
metaHolder.h
Go to the documentation of this file.
1
5// Copyright (c) 2013-2015 OpenM++
6// This code is licensed under the MIT license (see LICENSE.txt for details)
7
8#ifndef META_HOLDER_H
9#define META_HOLDER_H
10
12#include "dbMetaTable.h"
13
14using namespace std;
15
16namespace openm
17{
20 {
21 public:
24
26 unique_ptr<IModelDicTable> modelTable;
27
29 unique_ptr<ITypeDicTable> typeDic;
30
32 unique_ptr<ITypeEnumLstTable> typeEnumLst;
33
35 unique_ptr<IParamDicTable> paramDic;
36
38 unique_ptr<IParamDimsTable> paramDims;
39
41 unique_ptr<IParamImportTable> paramImport;
42
44 unique_ptr<ITableDicTable> tableDic;
45
47 unique_ptr<ITableDimsTable> tableDims;
48
50 unique_ptr<ITableAccTable> tableAcc;
51
53 unique_ptr<ITableExprTable> tableExpr;
54
56 unique_ptr<ILangLstTable> langLst;
57
59 unique_ptr<IEntityDicTable> entityDic;
60
62 unique_ptr<IEntityAttrTable> entityAttr;
63
65 unique_ptr<IGroupLstTable> groupLst;
66
68 unique_ptr<IGroupPcTable> groupPc;
69
71 unique_ptr<IRunOptionTable> runOptionTable;
72
74 MetaHolder(void) : modelRow(nullptr) { }
75
77 size_t typeEnumsSize(int i_modelId, int i_typeId) const;
78
80 size_t parameterSize(const ParamDicRow & paramRow) const;
81
83 size_t accumulatorSize(const TableDicRow & i_tableRow) const;
84 };
85}
86
87#endif // META_HOLDER_H
OpenM++ data library: db rows of model metadata tables.
OpenM++ data library: db tables for model metadata.
openM++ namespace
Definition: log.h:32
Holder for model metadata core part (not include model text).
Definition: metaHolder.h:20
unique_ptr< IGroupLstTable > groupLst
group_lst table rows
Definition: metaHolder.h:65
unique_ptr< IEntityDicTable > entityDic
entity_dic table rows
Definition: metaHolder.h:59
unique_ptr< IGroupPcTable > groupPc
group_pc table rows
Definition: metaHolder.h:68
unique_ptr< ITypeEnumLstTable > typeEnumLst
type_enum_lst table rows
Definition: metaHolder.h:32
unique_ptr< IParamDimsTable > paramDims
param_dims table rows
Definition: metaHolder.h:38
unique_ptr< IModelDicTable > modelTable
model_dic table rows
Definition: metaHolder.h:26
unique_ptr< ILangLstTable > langLst
lang_lst table rows
Definition: metaHolder.h:56
size_t parameterSize(const ParamDicRow &paramRow) const
return input parameter size of single sub value: total number of values in the parameter as product o...
Definition: metaHolder.cpp:12
unique_ptr< IParamDicTable > paramDic
param_dic table rows
Definition: metaHolder.h:35
unique_ptr< ITableAccTable > tableAcc
table_acc table rows
Definition: metaHolder.h:50
unique_ptr< IEntityAttrTable > entityAttr
entity_attr table rows
Definition: metaHolder.h:62
const ModelDicRow * modelRow
model_dic row for the model
Definition: metaHolder.h:23
unique_ptr< IRunOptionTable > runOptionTable
run_option table rows
Definition: metaHolder.h:71
MetaHolder(void)
create empty model metadata holder
Definition: metaHolder.h:74
unique_ptr< IParamImportTable > paramImport
model_parameter_import table rows
Definition: metaHolder.h:41
unique_ptr< ITableExprTable > tableExpr
table_expr table rows
Definition: metaHolder.h:53
size_t accumulatorSize(const TableDicRow &i_tableRow) const
return accumulator size: total number of accumulator values as product of dimensions size,...
Definition: metaHolder.cpp:35
unique_ptr< ITypeDicTable > typeDic
type_dic table rows
Definition: metaHolder.h:29
size_t typeEnumsSize(int i_modelId, int i_typeId) const
return type enums size: number of enums for that type or zero if no enums found (most of built-in typ...
Definition: metaHolder.cpp:52
unique_ptr< ITableDimsTable > tableDims
table_dims table rows
Definition: metaHolder.h:47
unique_ptr< ITableDicTable > tableDic
table_dic table rows
Definition: metaHolder.h:44
model_dic table row.
Definition: dbMetaRow.h:112
parameter_dic join to model_parameter_dic table row.
Definition: dbMetaRow.h:473
table_dic table row.
Definition: dbMetaRow.h:741