libroadrunner C API
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 
47 #ifdef _MSC_VER
48 #pragma warning(disable: 26812)
49 #pragma warning(disable: 26451)
50 #endif
51 #include "rr-libstruct/lsMatrix.h"
52 #ifdef _MSC_VER
53 #pragma warning(disable: 26812)
54 #pragma warning(disable: 26451)
55 #endif
56 
57 #include "rrRoadRunnerData.h"
58 #include "rrcStringList.h"
59 #include "rrArrayList.h"
60 #include "rrc_types.h"
61 #include "rrc_exporter.h"
62 
63 namespace rr
64 {
65 class RoadRunner;
66 }
67 
68 //When using the rrc_core_api from C++, the following routines are useful
69 namespace rrc
70 {
71 using std::string;
72 using std::vector;
73 
80 C_DECL_SPEC void setError(const string& err);
81 
88 C_DECL_SPEC rr::RoadRunner* castToRoadRunner(RRHandle rrHandle);
89 
90 
98 C_DECL_SPEC bool copyVector(const RRVector* source, vector<double>& dest);
99 
106 C_DECL_SPEC RRVectorPtr createVector(const vector<double>& vec);
107 
114 C_DECL_SPEC RRComplexVectorPtr createVector(const vector<ls::Complex>& vec);
115 
122 C_DECL_SPEC vector<double> createVector(const RRVector* vec);
123 
130 C_DECL_SPEC RRDoubleMatrixPtr createMatrix(const ls::DoubleMatrix* mat);
131 
138 C_DECL_SPEC ls::DoubleMatrix* createMatrix(const RRDoubleMatrixPtr mat);
139 
140 
147 C_DECL_SPEC RRComplexMatrixPtr createMatrix(const ls::ComplexMatrix* mat);
148 
149 //Lists and arrays
156 C_DECL_SPEC RRStringArrayPtr createList(const rrc::StringList& list);
157 
164 C_DECL_SPEC RRListPtr createArrayList(const ArrayList& list);
165 
166 
174 C_DECL_SPEC RRCDataPtr createRRCData(const rr::RoadRunner&);
175 
176 }
177 #endif
178 
179 
Definition: rrArrayList.h:24
Definition: rrcStringList.h:21
C_DECL_SPEC RRVectorPtr rrcCallConv createVector(int size)
Create a new vector with a given size.
roadRunner C wrappers 2012
roadRunner C wrappers 2012
void * RRHandle
Void pointer to a RoadRunner instance.
Definition: rrc_types.h:50
Structure for the result type from the simulate calls. The client is responsible for freeing the RRCD...
Definition: rrc_types.h:111
Structure for a simple complex Matrix type.
Definition: rrc_types.h:101
Structure for a simple complex Vector type.
Definition: rrc_types.h:92
Structure for a simple double Matrix type.
Definition: rrc_types.h:74
A list type, stores int, double, strings and lists.
Definition: rrc_types.h:148
Structure for a simple vector of strings.
Definition: rrc_types.h:66
Structure for a simple vector of doubles.
Definition: rrc_types.h:58