roadrunner  2.6.0
Fast simulator for SBML models
GetValuesCodeGen.h
1 /*
2  * GetValuesCodeGen.h
3  *
4  * Created on: Jul 27, 2013
5  * Author: andy
6  */
7 
8 #ifndef RRLLVM_GETVALUESCODEGEN_H_
9 #define RRLLVM_GETVALUESCODEGEN_H_
10 
11 #include "CodeGenBase.h"
12 #include "ModelGeneratorContext.h"
13 #include "SymbolForest.h"
14 #include "ASTNodeFactory.h"
15 #include "ModelDataIRBuilder.h"
16 #include "GetValueCodeGenBase.h"
17 #include <sbml/Model.h>
18 
19 namespace rrllvm
20 {
21 
26  GetValueCodeGenBase<GetBoundarySpeciesAmountCodeGen, true>
27  {
28  public:
31 
32  std::vector<std::string> getIds()
33  {
34  return dataSymbols.getBoundarySpeciesIds();
35  }
36 
37  static const char* FunctionName;
38  static const char* IndexArgName;
39  };
40 
45  GetValueCodeGenBase<GetFloatingSpeciesAmountCodeGen, true>
46  {
47  public:
50 
51  std::vector<std::string> getIds()
52  {
53  return dataSymbols.getFloatingSpeciesIds();
54  }
55 
56  static const char* FunctionName;
57  static const char* IndexArgName;
58  };
59 
64  GetValueCodeGenBase<GetBoundarySpeciesConcentrationCodeGen, false>
65  {
66  public:
69 
70  std::vector<std::string> getIds()
71  {
72  return dataSymbols.getBoundarySpeciesIds();
73  }
74 
75  static const char* FunctionName;
76  static const char* IndexArgName;
77  };
78 
83  GetValueCodeGenBase<GetFloatingSpeciesConcentrationCodeGen, false>
84  {
85  public:
88 
89  std::vector<std::string> getIds()
90  {
91  return dataSymbols.getFloatingSpeciesIds();
92  }
93 
94  static const char* FunctionName;
95  static const char* IndexArgName;
96  };
97 
102  GetValueCodeGenBase<GetCompartmentVolumeCodeGen, false>
103  {
104  public:
107 
108  std::vector<std::string> getIds()
109  {
110  return dataSymbols.getCompartmentIds();
111  }
112 
113  static const char* FunctionName;
114  static const char* IndexArgName;
115  };
116 
121  GetValueCodeGenBase<GetGlobalParameterCodeGen, false>
122  {
123  public:
126 
127  std::vector<std::string> getIds()
128  {
129  return dataSymbols.getGlobalParameterIds();
130  }
131 
132  static const char* FunctionName;
133  static const char* IndexArgName;
134  };
135 
136 
137 
138 } /* namespace rr */
139 #endif /* RRLLVM_GETVALUESCODEGEN_H_ */
Get the current amount of a boundary species.
Definition: GetValuesCodeGen.h:27
Get the current concentration of a boundary species.
Definition: GetValuesCodeGen.h:65
Get the current volume of a compartment.
Definition: GetValuesCodeGen.h:103
Get the current amount of a floating species.
Definition: GetValuesCodeGen.h:46
Get the current concentration of a floating species.
Definition: GetValuesCodeGen.h:84
Get the current value of a parameter.
Definition: GetValuesCodeGen.h:122
Base class for getting the current value of an element.
Definition: GetValueCodeGenBase.h:34
std::vector< std::string > getFloatingSpeciesIds() const
the list that is returned by ExecutableModel, so order must remain constant.
Definition: LLVMModelDataSymbols.cpp:478
All LLVM code generating objects basically need at a minimum three things to operate:
Definition: ModelGeneratorContext.h:95