libroadrunner C API
rrc_types.h
Go to the documentation of this file.
1 
42 #ifndef rrc_typesH
43 #define rrc_typesH
44 
45 #if defined(__cplusplus)
46 namespace rrc { extern "C" {
47 #endif
48 
50 typedef void* RRHandle;
53 // ===================================== C TYPES =====================================
54 
57 typedef struct RRVector
58 {
59  int Count;
60  double* Data;
65 typedef struct RRStringArray
66 {
67  int Count;
68  char** String;
73 typedef struct RRDoubleMatrix
74 {
75  int RSize;
76  int CSize;
77  double* Data;
83 typedef struct RRComplex
84 {
85  double re;
86  double imag;
91 typedef struct RRComplexVector
92 {
93  int Count;
100 typedef struct RRComplexMatrix
101 {
102  int RSize;
103  int CSize;
110 typedef struct RRCData
111 {
112  int RSize;
113  int CSize;
114  double* Data;
115  double* Weights;
116  char** ColumnHeaders;
121 enum ListItemType {litString, litInteger, litDouble, litList};
122 
125 enum RRParameterType {ptString, ptBool, ptInteger, ptDouble, ptVector, ptMatrix};
126 
127 // The above enums correspond to the currently supported types in a RRArrayList
128 struct RRList; //Forward declaration for RRListItem, needed for RRListItem
129 
132 typedef struct RRListItem
133 {
134  enum ListItemType ItemType;
135  union
136  {
137  int iValue;
138  double dValue;
139  char* sValue;
140  struct RRList* lValue;
141  } data;
147 typedef struct RRList
148 {
149  int Count;
153 #if defined( __cplusplus)
154 }
155 }// rcc namespace
156 #endif
157 
158 
159 #endif
void * RRHandle
Void pointer to a RoadRunner instance.
Definition: rrc_types.h:50
struct RRList * RRListPtr
A list type, stores int, double, strings and lists.
struct RRVector * RRVectorPtr
Structure for a simple vector of doubles.
RRParameterType
A parameters type can be string, bool, integer, double, vector or a matrix.
Definition: rrc_types.h:125
struct RRListItem * RRListItemPtr
A single list element type.
struct RRStringArray * RRStringArrayPtr
Structure for a simple vector of strings.
struct RRComplexMatrix * RRComplexMatrixPtr
Structure for a simple complex Matrix type.
struct RRCData * RRCDataPtr
Structure for the result type from the simulate calls. The client is responsible for freeing the RRCD...
ListItemType
The list type supports strings, integers, double and lists.
Definition: rrc_types.h:121
struct RRComplex * RRComplexPtr
Structure for a complex number.
struct RRComplexVector * RRComplexVectorPtr
Structure for a simple complex Vector type.
struct RRDoubleMatrix * RRDoubleMatrixPtr
Structure for a simple double Matrix type.
Structure for the result type from the simulate calls. The client is responsible for freeing the RRCD...
Definition: rrc_types.h:111
double * Weights
Definition: rrc_types.h:115
double * Data
Definition: rrc_types.h:114
char ** ColumnHeaders
Definition: rrc_types.h:116
int CSize
Definition: rrc_types.h:113
int RSize
Definition: rrc_types.h:112
Structure for a complex number.
Definition: rrc_types.h:84
double re
Definition: rrc_types.h:85
double imag
Definition: rrc_types.h:86
Structure for a simple complex Matrix type.
Definition: rrc_types.h:101
int CSize
Definition: rrc_types.h:103
int RSize
Definition: rrc_types.h:102
RRComplexPtr Data
Definition: rrc_types.h:104
Structure for a simple complex Vector type.
Definition: rrc_types.h:92
int Count
Definition: rrc_types.h:93
RRComplexPtr Data
Definition: rrc_types.h:94
Structure for a simple double Matrix type.
Definition: rrc_types.h:74
int CSize
Definition: rrc_types.h:76
int RSize
Definition: rrc_types.h:75
double * Data
Definition: rrc_types.h:77
A list type, stores int, double, strings and lists.
Definition: rrc_types.h:148
RRListItemPtr * Items
Definition: rrc_types.h:150
int Count
Definition: rrc_types.h:149
A single list element type.
Definition: rrc_types.h:133
double dValue
Definition: rrc_types.h:138
struct RRList * lValue
Definition: rrc_types.h:140
char * sValue
Definition: rrc_types.h:139
int iValue
Definition: rrc_types.h:137
Structure for a simple vector of strings.
Definition: rrc_types.h:66
char ** String
Definition: rrc_types.h:68
int Count
Definition: rrc_types.h:67
Structure for a simple vector of doubles.
Definition: rrc_types.h:58
double * Data
Definition: rrc_types.h:60
int Count
Definition: rrc_types.h:59