6.1.1.2.1.2.1.5. pycropml.transpiler.generators.cpp2Generator module¶
- class pycropml.transpiler.generators.cpp2Generator.Cpp2Compo(tree=None, modelt=None, name=None)[source]¶
Bases:
Cpp2TransThis class generate the C++ composite class.
- class pycropml.transpiler.generators.cpp2Generator.Cpp2Generator(tree, model=None, name=None)[source]¶
Bases:
CodeGenerator,CppRulesThis class contains the specific properties of C++ language and use the NodeVisitor to generate a cpp code source from a well formed syntax tree.
- static internal_assignments(node)[source]¶
create a list of all the internal assignment nodes for a given function node
- static internal_declaration(node)[source]¶
create a list of all the internal declaration nodes for a given function node
- class pycropml.transpiler.generators.cpp2Generator.Cpp2Trans(models, tree=None)[source]¶
Bases:
Cpp2GeneratorThis class used to generates states, rates, auxiliary, exogenous classes for C++ languages.
- DATATYPE = {'BOOLEAN': 'bool', 'DATE': 'str', 'DATEARRAY': ['array', 'str'], 'DATELIST': ['list', 'str'], 'DOUBLE': 'float', 'DOUBLEARRAY': ['array', 'float'], 'DOUBLELIST': ['list', 'float'], 'INT': 'int', 'INTARRAY': ['array', 'int'], 'INTLIST': ['list', 'int'], 'STRING': 'str', 'STRINGARRAY': ['array', 'str'], 'STRINGLIST': ['list', 'str']}¶
- create_public_methods_hpp(node, typ, mc=None, h=None, init=False, iscompo=False, is_param_struct=False)[source]¶