libRoadRunner C API  1.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
rrc_cpp_support.h
Go to the documentation of this file.
1 
42 #ifndef rrc_cpp_supportH
43 #define rrc_cpp_supportH
44 
45 #include <vector>
46 #include "rr-libstruct/lsMatrix.h"
47 #include "rrRoadRunnerData.h"
48 #include "rrcStringList.h"
49 #include "rrArrayList.h"
50 #include "rrc_types.h"
51 #include "rrc_exporter.h"
52 
53 namespace rr
54 {
55 class RoadRunner;
56 }
57 
58 //When using the rrc_core_api from C++, the following routines are useful
59 namespace rrc
60 {
61 using std::string;
62 using std::vector;
63 
70 C_DECL_SPEC void setError(const string& err);
71 
78 C_DECL_SPEC rr::RoadRunner* castToRoadRunner(RRHandle rrHandle);
79 
80 
88 C_DECL_SPEC bool copyVector(const RRVector* source, vector<double>& dest);
89 
96 C_DECL_SPEC RRVectorPtr createVector(const vector<double>& vec);
97 
104 C_DECL_SPEC RRComplexVectorPtr createVector(const vector<ls::Complex>& vec);
105 
112 C_DECL_SPEC vector<double> createVector(const RRVector* vec);
113 
120 C_DECL_SPEC RRDoubleMatrixPtr createMatrix(const ls::DoubleMatrix* mat);
121 
128 C_DECL_SPEC ls::DoubleMatrix* createMatrix(const RRDoubleMatrixPtr mat);
129 
130 
137 C_DECL_SPEC RRComplexMatrixPtr createMatrix(const ls::ComplexMatrix* mat);
138 
139 //Lists and arrays
146 C_DECL_SPEC RRStringArrayPtr createList(const rrc::StringList& list);
147 
154 C_DECL_SPEC RRListPtr createArrayList(const ArrayList& list);
155 
156 
164 C_DECL_SPEC RRCDataPtr createRRCData(const rr::RoadRunner&);
165 
166 }
167 #endif
168 
169 
Structure for a simple vector of strings.
Definition: rrc_types.h:65
Definition: _rrc_api.cpp:84
roadRunner C API 2012
Definition: rrc_cpp_support.h:53
Structure for a simple vector of doubles.
Definition: rrc_types.h:57
Structure for a simple double Matrix type.
Definition: rrc_types.h:73
Definition: rrcStringList.h:20
void * RRHandle
Void pointer to a RoadRunner instance.
Definition: rrc_types.h:50
RRVectorPtr createVector(int size)
Create a new vector with a given size.
Definition: rrc_utilities.cpp:354
Structure for a simple complex Matrix type.
Definition: rrc_types.h:100
Structure for the result type from the simulate calls. The client is responsible for freeing the RRCD...
Definition: rrc_types.h:110
A list type, stores int, double, strings and lists.
Definition: rrc_types.h:147
Structure for a simple complex Vector type.
Definition: rrc_types.h:91
roadRunner C API 2012