Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 #ifndef INCLUDED_OSCTYPES_H
00060
00061 #define INCLUDED_OSCTYPES_H
00062
00063
00064
00065
00066
00067 namespace osc{
00068
00069
00070
00071
00072
00073
00074
00075 #if defined(__BORLANDC__) || defined(_MSC_VER)
00076
00077
00078
00079 typedef __int64 int64;
00080
00081 typedef unsigned __int64 uint64;
00082
00083
00084
00085 #else
00086
00087
00088
00089 typedef long long int64;
00090
00091 typedef unsigned long long uint64;
00092
00093
00094
00095 #endif
00096
00097
00098
00099
00100
00101
00102
00103 #ifdef __x86_64__
00104
00105
00106
00107 typedef signed int int32;
00108
00109 typedef unsigned int uint32;
00110
00111
00112
00113 #else
00114
00115
00116
00117 typedef signed long int32;
00118
00119 typedef unsigned long uint32;
00120
00121
00122
00123 #endif
00124
00125
00126
00127
00128
00129
00130
00131 enum TypeTagValues {
00132
00133 TRUE_TYPE_TAG = 'T',
00134
00135 FALSE_TYPE_TAG = 'F',
00136
00137 NIL_TYPE_TAG = 'N',
00138
00139 INFINITUM_TYPE_TAG = 'I',
00140
00141 INT32_TYPE_TAG = 'i',
00142
00143 FLOAT_TYPE_TAG = 'f',
00144
00145 CHAR_TYPE_TAG = 'c',
00146
00147 RGBA_COLOR_TYPE_TAG = 'r',
00148
00149 MIDI_MESSAGE_TYPE_TAG = 'm',
00150
00151 INT64_TYPE_TAG = 'h',
00152
00153 TIME_TAG_TYPE_TAG = 't',
00154
00155 DOUBLE_TYPE_TAG = 'd',
00156
00157 STRING_TYPE_TAG = 's',
00158
00159 SYMBOL_TYPE_TAG = 'S',
00160
00161 BLOB_TYPE_TAG = 'b'
00162
00163 };
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175 struct BundleInitiator{
00176
00177 explicit BundleInitiator( uint64 timeTag_ ) : timeTag( timeTag_ ) {}
00178
00179 uint64 timeTag;
00180
00181 };
00182
00183
00184
00185 extern BundleInitiator BeginBundleImmediate;
00186
00187
00188
00189 inline BundleInitiator BeginBundle( uint64 timeTag=1 )
00190
00191 {
00192
00193 return BundleInitiator(timeTag);
00194
00195 }
00196
00197
00198
00199
00200
00201 struct BundleTerminator{
00202
00203 };
00204
00205
00206
00207 extern BundleTerminator EndBundle;
00208
00209
00210
00211 struct BeginMessage{
00212
00213 explicit BeginMessage( const char *addressPattern_ ) : addressPattern( addressPattern_ ) {}
00214
00215 const char *addressPattern;
00216
00217 };
00218
00219
00220
00221 struct MessageTerminator{
00222
00223 };
00224
00225
00226
00227 extern MessageTerminator EndMessage;
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239 struct NilType{
00240
00241 };
00242
00243
00244
00245 extern NilType Nil;
00246
00247
00248
00249
00250
00251 struct InfinitumType{
00252
00253 };
00254
00255
00256
00257 extern InfinitumType Infinitum;
00258
00259
00260
00261 struct RgbaColor{
00262
00263 RgbaColor() {}
00264
00265 explicit RgbaColor( uint32 value_ ) : value( value_ ) {}
00266
00267 uint32 value;
00268
00269
00270
00271 operator uint32() const { return value; }
00272
00273 };
00274
00275
00276
00277
00278
00279 struct MidiMessage{
00280
00281 MidiMessage() {}
00282
00283 explicit MidiMessage( uint32 value_ ) : value( value_ ) {}
00284
00285 uint32 value;
00286
00287
00288
00289 operator uint32() const { return value; }
00290
00291 };
00292
00293
00294
00295
00296
00297 struct TimeTag{
00298
00299 TimeTag() {}
00300
00301 explicit TimeTag( uint64 value_ ) : value( value_ ) {}
00302
00303 uint64 value;
00304
00305
00306
00307 operator uint64() const { return value; }
00308
00309 };
00310
00311
00312
00313
00314
00315 struct Symbol{
00316
00317 Symbol() {}
00318
00319 explicit Symbol( const char* value_ ) : value( value_ ) {}
00320
00321 const char* value;
00322
00323
00324
00325 operator const char *() const { return value; }
00326
00327 };
00328
00329
00330
00331
00332
00333 struct Blob{
00334
00335 Blob() {}
00336
00337 explicit Blob( const void* data_, unsigned long size_ )
00338
00339 : data( data_ ), size( size_ ) {}
00340
00341 const void* data;
00342
00343 unsigned long size;
00344
00345 };
00346
00347
00348
00349 }
00350
00351
00352
00353
00354
00355 #endif
00356