OpenMAMA
types.h
Go to the documentation of this file.
1 /* $Id$
2  *
3  * OpenMAMA: The open middleware agnostic messaging API
4  * Copyright (C) 2011 NYSE Technologies, Inc.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301 USA
20  */
21 
22 #ifndef MamaTypesH__
23 #define MamaTypesH__
24 
25 
26 #include "wombat/port.h"
27 #include <stdlib.h>
28 #include <string.h>
29 
30 #if defined(__cplusplus)
31 extern "C" {
32 #endif
33 
34 typedef int8_t mama_i8_t;
35 typedef uint8_t mama_u8_t;
36 typedef int16_t mama_i16_t;
37 typedef uint16_t mama_u16_t;
38 typedef int32_t mama_i32_t;
39 typedef uint32_t mama_u32_t;
40 typedef int64_t mama_i64_t;
41 typedef uint64_t mama_u64_t;
42 typedef int8_t mama_bool_t;
43 typedef float mama_f32_t;
44 typedef double mama_f64_t;
45 typedef double mama_quantity_t;
46 typedef uint16_t mama_fid_t;
47 typedef size_t mama_size_t;
48 typedef uint32_t mama_seqnum_t;
49 
50 #define MAMA_QUANTITY_EPSILON ((mama_f64_t)0.00000000001)
51 
55 #define mama_isQuantityNone(q) \
56  ((q) < MAMA_QUANTITY_EPSILON)
57 
61 #define mama_isQuantityEqual(lhs, rhs) \
62  ((lhs) < (rhs) ? (rhs) - (lhs) < MAMA_QUANTITY_EPSILON : \
63  (lhs) - (rhs) < MAMA_QUANTITY_EPSILON)
64 
65 /*
66  * The bridge implementation required when creating many of the core
67  * MAMA objects.
68  */
69 typedef struct mamaBridgeImpl_* mamaBridge;
70 
71 /*
72  * The payload bridge implementation required for accessing messages
73  */
74 typedef struct mamaPayloadBridgeImpl_* mamaPayloadBridge;
75 
79 typedef mama_u64_t* mamaDateTime;
80 
84 typedef void* mamaTimeZone;
85 
89 typedef void* mamaPrice;
90 
95 typedef struct mamaMsgImpl_* mamaMsg;
96 typedef struct mamaMsgFieldImpl_* mamaMsgField;
97 typedef struct mamaMsgIteratorImpl_* mamaMsgIterator;
98 typedef struct mamaTransportImpl_* mamaTransport;
99 typedef struct mamaSubscriptionImpl_* mamaSubscription;
100 typedef struct mamaManagedSubscriptionImpl_* mamaManagedSubscription;
101 typedef struct mamaSubscriptionManagerImpl_* mamaSubscriptionManager;
102 typedef struct mamaDictionaryImpl_* mamaDictionary;
103 typedef struct mamaPublisherImpl_* mamaPublisher;
104 typedef struct mamaDQPublisherImpl_* mamaDQPublisher;
105 typedef struct mamaDQPublisherManagerImpl_* mamaDQPublisherManager;
106 typedef struct mamaInboxImpl_* mamaInbox;
107 typedef struct mamaQueueImpl_* mamaQueue;
108 typedef struct mamaDispatcherImpl_* mamaDispatcher;
109 typedef struct mamaTimerImpl* mamaTimer;
110 typedef struct mamaFieldDescriptorImpl_* mamaFieldDescriptor;
111 typedef struct mamaIoImpl* mamaIo;
112 typedef struct mamaSymbolSourceFileImpl_* mamaSymbolSourceFile;
113 typedef struct mamaSymbolStoreImpl_* mamaSymbolStore;
114 typedef struct mamaMsgQualImpl_* mamaMsgQual;
115 typedef struct mamaSourceManagerImpl_* mamaSourceManager;
116 typedef struct mamaSourceImpl_* mamaSource;
117 typedef struct mamaSymbologyImpl_* mamaSymbology;
118 typedef struct mamaSymbologyManagerImpl_* mamaSymbologyManager;
119 typedef struct mamaSourceGroupCbHandleImpl_* mamaSourceGroupCbHandle;
120 typedef struct mamaConnectionImpl_* mamaConnection;
121 typedef struct mamaServerConnectionImpl_* mamaServerConnection;
122 typedef struct mamaConflationManager_* mamaConflationManager;
123 typedef struct mamaStatsLoggerImpl_* mamaStatsLogger;
124 typedef struct mamaStatImpl_* mamaStat;
125 typedef struct mamaStatsCollectorImpl_* mamaStatsCollector;
126 typedef struct mamaStatsGeneratorImpl_* mamaStatsGenerator;
127 typedef struct mamaMsgReplyImpl_* mamaMsgReply;
128 
129 #if defined(__cplusplus)
130 }
131 #endif
132 
133 #endif /* MamaTypesH__ */
int8_t mama_bool_t
Definition: types.h:42
struct mamaSubscriptionImpl_ * mamaSubscription
Definition: types.h:99
struct mamaDQPublisherImpl_ * mamaDQPublisher
Definition: types.h:104
struct mamaSourceManagerImpl_ * mamaSourceManager
Definition: types.h:115
int16_t mama_i16_t
Definition: types.h:36
double mama_quantity_t
Definition: types.h:45
struct mamaConnectionImpl_ * mamaConnection
Definition: types.h:120
struct mamaMsgIteratorImpl_ * mamaMsgIterator
Definition: types.h:97
struct mamaDQPublisherManagerImpl_ * mamaDQPublisherManager
Definition: types.h:105
struct mamaSourceImpl_ * mamaSource
Definition: types.h:116
struct mamaServerConnectionImpl_ * mamaServerConnection
Definition: types.h:121
uint8_t mama_u8_t
Definition: types.h:35
struct mamaManagedSubscriptionImpl_ * mamaManagedSubscription
Definition: types.h:100
struct mamaStatsGeneratorImpl_ * mamaStatsGenerator
Definition: types.h:126
mama_u64_t * mamaDateTime
Flexible date/time format.
Definition: types.h:79
struct mamaStatImpl_ * mamaStat
Definition: types.h:124
struct mamaMsgQualImpl_ * mamaMsgQual
Definition: types.h:114
struct mamaPayloadBridgeImpl_ * mamaPayloadBridge
Definition: types.h:74
uint64_t mama_u64_t
Definition: types.h:41
struct mamaSubscriptionManagerImpl_ * mamaSubscriptionManager
Definition: types.h:101
struct mamaSymbologyImpl_ * mamaSymbology
Definition: types.h:117
struct mamaMsgReplyImpl_ * mamaMsgReply
Definition: types.h:127
struct mamaBridgeImpl_ * mamaBridge
Definition: types.h:69
struct mamaFieldDescriptorImpl_ * mamaFieldDescriptor
Definition: types.h:110
void * mamaTimeZone
Time zone utility type.
Definition: types.h:84
void * mamaPrice
Flexible price format (contains display hints as well as value)
Definition: types.h:89
struct mamaInboxImpl_ * mamaInbox
Definition: types.h:106
struct mamaQueueImpl_ * mamaQueue
Definition: types.h:107
uint16_t mama_u16_t
Definition: types.h:37
struct mamaStatsCollectorImpl_ * mamaStatsCollector
Definition: types.h:125
uint16_t mama_fid_t
Definition: types.h:46
struct mamaDictionaryImpl_ * mamaDictionary
Definition: types.h:102
struct mamaSymbolStoreImpl_ * mamaSymbolStore
Definition: types.h:113
struct mamaSymbologyManagerImpl_ * mamaSymbologyManager
Definition: types.h:118
uint32_t mama_seqnum_t
Definition: types.h:48
struct mamaSourceGroupCbHandleImpl_ * mamaSourceGroupCbHandle
Definition: types.h:119
struct mamaDispatcherImpl_ * mamaDispatcher
Definition: types.h:108
struct mamaConflationManager_ * mamaConflationManager
Definition: types.h:122
double mama_f64_t
Definition: types.h:44
struct mamaSymbolSourceFileImpl_ * mamaSymbolSourceFile
Definition: types.h:112
int64_t mama_i64_t
Definition: types.h:40
struct mamaMsgImpl_ * mamaMsg
Opaque definitions for all major MAMA data types.
Definition: types.h:95
struct mamaMsgFieldImpl_ * mamaMsgField
Definition: types.h:96
struct mamaIoImpl * mamaIo
Definition: types.h:111
uint32_t mama_u32_t
Definition: types.h:39
struct mamaPublisherImpl_ * mamaPublisher
Definition: types.h:103
size_t mama_size_t
Definition: types.h:47
struct mamaTimerImpl * mamaTimer
Definition: types.h:109
int8_t mama_i8_t
Definition: types.h:34
struct mamaTransportImpl_ * mamaTransport
Definition: types.h:98
int32_t mama_i32_t
Definition: types.h:38
float mama_f32_t
Definition: types.h:43
struct mamaStatsLoggerImpl_ * mamaStatsLogger
Definition: types.h:123


© 2012 Linux Foundation