OpenMAMA
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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__ */


© 2012 Linux Foundation