OpenMAMA
fielddesc.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 MamaFieldDescriptorH__
23 #define MamaFieldDescriptorH__
24 
29 #include <mama/status.h>
30 #include <mama/types.h>
31 #include <stdlib.h>
32 
33 #include "wombat/port.h"
34 
35 #if defined(__cplusplus)
36 extern "C" {
37 #endif
38 
39 typedef enum mamaFieldType_
40 {
43 
46 
49 
52 
55 
58 
61 
64 
67 
70 
73 
76 
79 
82 
85 
88 
91 
108 
111 
114 
115 } mamaFieldType;
116 
124 MAMAExpDLL
125 extern const char*
127 
135 MAMAExpDLL
136 extern mamaFieldType
137 stringToMamaFieldType (const char* str);
138 
149 MAMAExpDLL
150 extern mama_status
152  mamaFieldDescriptor* descriptor,
153  mama_fid_t fid,
154  mamaFieldType type,
155  const char* name);
156 
163 MAMAExpDLL
164 extern mama_status
166  mamaFieldDescriptor descriptor);
167 
174 MAMAExpDLL
177  const mamaFieldDescriptor descriptor);
178 
184 MAMAExpDLL
187  const mamaFieldDescriptor descriptor);
188 
195 MAMAExpDLL
196 const char*
198  const mamaFieldDescriptor descriptor);
199 
205 MAMAExpDLL
206 const char*
208  const mamaFieldDescriptor descriptor);
209 
219 MAMAExpDLL
222  mamaFieldDescriptor descriptor,
223  void* closure);
224 
235 MAMAExpDLL
238  mamaFieldDescriptor descriptor,
239  void** closure);
240 
241 #if defined(__cplusplus)
242 }
243 #endif
244 
245 #endif /* MamaFieldDescriptorH__ */
32 bit float
Definition: fielddesc.h:81
Boolean.
Definition: fielddesc.h:51
Definition: fielddesc.h:95
MAMAExpDLL const char * mamaFieldDescriptor_getTypeName(const mamaFieldDescriptor descriptor)
return a human readable representation of the type name.
Definition: fielddesc.h:107
Signed 16 bit integer.
Definition: fielddesc.h:63
MAMAExpDLL mamaFieldType mamaFieldDescriptor_getType(const mamaFieldDescriptor descriptor)
Return the data type.
Definition: fielddesc.h:97
Definition: fielddesc.h:94
Array type support.
Definition: fielddesc.h:93
Signed 64 bit integer.
Definition: fielddesc.h:75
MAMAExpDLL mama_status mamaFieldDescriptor_destroy(mamaFieldDescriptor descriptor)
Destroy a mamaFieldDescriptor.
Definition: fielddesc.h:104
String.
Definition: fielddesc.h:48
struct mamaFieldDescriptorImpl_ * mamaFieldDescriptor
Definition: types.h:110
Definition: fielddesc.h:98
Unsigned 64 bit integer.
Definition: fielddesc.h:78
MAMAExpDLL mama_status mamaFieldDescriptor_getClosure(mamaFieldDescriptor descriptor, void **closure)
Return the user supplied data with this field descriptor.
Definition: fielddesc.h:105
Definition: fielddesc.h:101
MAMAExpDLL mama_status mamaFieldDescriptor_setClosure(mamaFieldDescriptor descriptor, void *closure)
Associate some user supplied data with this field descriptor.
Sub message.
Definition: fielddesc.h:42
Collection.
Definition: fielddesc.h:110
uint16_t mama_fid_t
Definition: types.h:46
64 bit float
Definition: fielddesc.h:84
Definition: fielddesc.h:100
Definition: fielddesc.h:96
Opaque binary.
Definition: fielddesc.h:45
MAMA price.
Definition: fielddesc.h:90
MAMAExpDLL const char * mamaFieldTypeToString(mamaFieldType type)
Return the field type as a string.
MAMAExpDLL const char * mamaFieldDescriptor_getName(const mamaFieldDescriptor descriptor)
Return the human readable name of the field.
Signed 8 bit integer.
Definition: fielddesc.h:57
enum mamaFieldType_ mamaFieldType
The mamaFieldDescriptor class represents a field in a mamaMsg.
mama_status
Definition: status.h:37
Unsigned 16 bit integer.
Definition: fielddesc.h:66
Definition: fielddesc.h:102
MAMAExpDLL mama_status mamaFieldDescriptor_create(mamaFieldDescriptor *descriptor, mama_fid_t fid, mamaFieldType type, const char *name)
Create a mamaFieldDescriptor.
Signed 32 bit integer.
Definition: fielddesc.h:69
Definition: fielddesc.h:103
64 bit MAMA time
Definition: fielddesc.h:87
Unsigned 32 bit integer.
Definition: fielddesc.h:72
Character.
Definition: fielddesc.h:54
Unsigned byte.
Definition: fielddesc.h:60
MAMAExpDLL mamaFieldType stringToMamaFieldType(const char *str)
Return the string as a field type.
Unknown.
Definition: fielddesc.h:113
mamaFieldType_
The mamaFieldDescriptor class represents a field in a mamaMsg.
Definition: fielddesc.h:39
Definition: fielddesc.h:106
MAMAExpDLL mama_fid_t mamaFieldDescriptor_getFid(const mamaFieldDescriptor descriptor)
Return the field identifier.
Definition: fielddesc.h:99


© 2012 Linux Foundation