OpenMAMA
fielddesc.h File Reference
#include <mama/status.h>
#include <mama/types.h>
#include <stdlib.h>
#include "wombat/port.h"

Go to the source code of this file.

Typedefs

typedef enum mamaFieldType_ mamaFieldType
 The mamaFieldDescriptor class represents a field in a mamaMsg. More...
 

Enumerations

enum  mamaFieldType_ {
  MAMA_FIELD_TYPE_MSG = 1, MAMA_FIELD_TYPE_OPAQUE = 7, MAMA_FIELD_TYPE_STRING = 8, MAMA_FIELD_TYPE_BOOL = 9,
  MAMA_FIELD_TYPE_CHAR = 10, MAMA_FIELD_TYPE_I8 = 14, MAMA_FIELD_TYPE_U8 = 15, MAMA_FIELD_TYPE_I16 = 16,
  MAMA_FIELD_TYPE_U16 = 17, MAMA_FIELD_TYPE_I32 = 18, MAMA_FIELD_TYPE_U32 = 19, MAMA_FIELD_TYPE_I64 = 20,
  MAMA_FIELD_TYPE_U64 = 21, MAMA_FIELD_TYPE_F32 = 24, MAMA_FIELD_TYPE_F64 = 25, MAMA_FIELD_TYPE_TIME = 26,
  MAMA_FIELD_TYPE_PRICE = 27, MAMA_FIELD_TYPE_VECTOR_I8 = 34, MAMA_FIELD_TYPE_VECTOR_U8 = 35, MAMA_FIELD_TYPE_VECTOR_I16 = 36,
  MAMA_FIELD_TYPE_VECTOR_U16 = 37, MAMA_FIELD_TYPE_VECTOR_I32 = 38, MAMA_FIELD_TYPE_VECTOR_U32 = 39, MAMA_FIELD_TYPE_VECTOR_I64 = 40,
  MAMA_FIELD_TYPE_VECTOR_U64 = 41, MAMA_FIELD_TYPE_VECTOR_F32 = 44, MAMA_FIELD_TYPE_VECTOR_F64 = 45, MAMA_FIELD_TYPE_VECTOR_STRING = 46,
  MAMA_FIELD_TYPE_VECTOR_MSG = 47, MAMA_FIELD_TYPE_VECTOR_TIME = 48, MAMA_FIELD_TYPE_VECTOR_PRICE = 49, MAMA_FIELD_TYPE_QUANTITY = 50,
  MAMA_FIELD_TYPE_COLLECTION = 99, MAMA_FIELD_TYPE_UNKNOWN = 100
}
 The mamaFieldDescriptor class represents a field in a mamaMsg. More...
 

Functions

const MAMAExpDLL char * mamaFieldTypeToString (mamaFieldType type)
 Return the field type as a string. More...
 
MAMAExpDLL mamaFieldType stringToMamaFieldType (const char *str)
 Return the string as a field type. More...
 
MAMAExpDLL mama_status mamaFieldDescriptor_create (mamaFieldDescriptor *descriptor, mama_fid_t fid, mamaFieldType type, const char *name)
 Create a mamaFieldDescriptor. More...
 
MAMAExpDLL mama_status mamaFieldDescriptor_destroy (mamaFieldDescriptor descriptor)
 Destroy a mamaFieldDescriptor. More...
 
MAMAExpDLL mama_fid_t mamaFieldDescriptor_getFid (const mamaFieldDescriptor descriptor)
 Return the field identifier. More...
 
MAMAExpDLL mamaFieldType mamaFieldDescriptor_getType (const mamaFieldDescriptor descriptor)
 Return the data type. More...
 
const MAMAExpDLL char * mamaFieldDescriptor_getName (const mamaFieldDescriptor descriptor)
 Return the human readable name of the field. More...
 
const MAMAExpDLL char * mamaFieldDescriptor_getTypeName (const mamaFieldDescriptor descriptor)
 return a human readable representation of the type name. More...
 
MAMAExpDLL mama_status mamaFieldDescriptor_setClosure (mamaFieldDescriptor descriptor, void *closure)
 Associate some user supplied data with this field descriptor. More...
 
MAMAExpDLL mama_status mamaFieldDescriptor_getClosure (mamaFieldDescriptor descriptor, void **closure)
 Return the user supplied data with this field descriptor. More...
 

Typedef Documentation

◆ mamaFieldType

The mamaFieldDescriptor class represents a field in a mamaMsg.

Enumeration Type Documentation

◆ mamaFieldType_

The mamaFieldDescriptor class represents a field in a mamaMsg.

Enumerator
MAMA_FIELD_TYPE_MSG 

Sub message.

MAMA_FIELD_TYPE_OPAQUE 

Opaque binary.

MAMA_FIELD_TYPE_STRING 

String.

MAMA_FIELD_TYPE_BOOL 

Boolean.

MAMA_FIELD_TYPE_CHAR 

Character.

MAMA_FIELD_TYPE_I8 

Signed 8 bit integer.

MAMA_FIELD_TYPE_U8 

Unsigned byte.

MAMA_FIELD_TYPE_I16 

Signed 16 bit integer.

MAMA_FIELD_TYPE_U16 

Unsigned 16 bit integer.

MAMA_FIELD_TYPE_I32 

Signed 32 bit integer.

MAMA_FIELD_TYPE_U32 

Unsigned 32 bit integer.

MAMA_FIELD_TYPE_I64 

Signed 64 bit integer.

MAMA_FIELD_TYPE_U64 

Unsigned 64 bit integer.

MAMA_FIELD_TYPE_F32 

32 bit float

MAMA_FIELD_TYPE_F64 

64 bit float

MAMA_FIELD_TYPE_TIME 

64 bit MAMA time

MAMA_FIELD_TYPE_PRICE 

MAMA price.

MAMA_FIELD_TYPE_VECTOR_I8 

Array type support.

MAMA_FIELD_TYPE_VECTOR_U8 
MAMA_FIELD_TYPE_VECTOR_I16 
MAMA_FIELD_TYPE_VECTOR_U16 
MAMA_FIELD_TYPE_VECTOR_I32 
MAMA_FIELD_TYPE_VECTOR_U32 
MAMA_FIELD_TYPE_VECTOR_I64 
MAMA_FIELD_TYPE_VECTOR_U64 
MAMA_FIELD_TYPE_VECTOR_F32 
MAMA_FIELD_TYPE_VECTOR_F64 
MAMA_FIELD_TYPE_VECTOR_STRING 
MAMA_FIELD_TYPE_VECTOR_MSG 
MAMA_FIELD_TYPE_VECTOR_TIME 
MAMA_FIELD_TYPE_VECTOR_PRICE 
MAMA_FIELD_TYPE_QUANTITY 
MAMA_FIELD_TYPE_COLLECTION 

Collection.

MAMA_FIELD_TYPE_UNKNOWN 

Unknown.

40 {
43 
46 
49 
52 
55 
57  MAMA_FIELD_TYPE_I8 = 14,
58 
60  MAMA_FIELD_TYPE_U8 = 15,
61 
64 
67 
70 
73 
76 
79 
81  MAMA_FIELD_TYPE_F32 = 24,
82 
85 
88 
91 
108 
111 
114 
115 } mamaFieldType;

Function Documentation

◆ mamaFieldTypeToString()

const MAMAExpDLL char* mamaFieldTypeToString ( mamaFieldType  type)

Return the field type as a string.

Parameters
typeThe type.
Returns
The type as a string.

◆ stringToMamaFieldType()

MAMAExpDLL mamaFieldType stringToMamaFieldType ( const char *  str)

Return the string as a field type.

Parameters
strThe string to transform.
Returns
The field type.

◆ mamaFieldDescriptor_create()

MAMAExpDLL mama_status mamaFieldDescriptor_create ( mamaFieldDescriptor descriptor,
mama_fid_t  fid,
mamaFieldType  type,
const char *  name 
)

Create a mamaFieldDescriptor.

Parameters
descriptorThe descriptor.
fidThe field identifier.
typeThe type.
nameThe field name.
Returns
mama_status code

◆ mamaFieldDescriptor_destroy()

MAMAExpDLL mama_status mamaFieldDescriptor_destroy ( mamaFieldDescriptor  descriptor)

Destroy a mamaFieldDescriptor.

Parameters
descriptorThe descriptor.
Returns
mama_status code

◆ mamaFieldDescriptor_getFid()

MAMAExpDLL mama_fid_t mamaFieldDescriptor_getFid ( const mamaFieldDescriptor  descriptor)

Return the field identifier.

0 indicates no fid.

Parameters
descriptorThe descriptor.
Returns
The fid.

◆ mamaFieldDescriptor_getType()

MAMAExpDLL mamaFieldType mamaFieldDescriptor_getType ( const mamaFieldDescriptor  descriptor)

Return the data type.

Returns
The type.

◆ mamaFieldDescriptor_getName()

const MAMAExpDLL char* mamaFieldDescriptor_getName ( const mamaFieldDescriptor  descriptor)

Return the human readable name of the field.

Parameters
descriptorThe descriptor.
Returns
The name.

◆ mamaFieldDescriptor_getTypeName()

const MAMAExpDLL char* mamaFieldDescriptor_getTypeName ( const mamaFieldDescriptor  descriptor)

return a human readable representation of the type name.

Parameters
descriptorThe descriptor.

◆ mamaFieldDescriptor_setClosure()

MAMAExpDLL mama_status mamaFieldDescriptor_setClosure ( mamaFieldDescriptor  descriptor,
void *  closure 
)

Associate some user supplied data with this field descriptor.

Parameters
descriptorThe field descriptor on which the closure is being set.
closureThe arbitrary user supplied data.
Returns
mama_status MAMA_STATUS_OK if the call was successful.

◆ mamaFieldDescriptor_getClosure()

MAMAExpDLL mama_status mamaFieldDescriptor_getClosure ( mamaFieldDescriptor  descriptor,
void **  closure 
)

Return the user supplied data with this field descriptor.

Returns NULL if no data was associated with this field descriptor.

Parameters
descriptorThe field descriptor from which the closure is being obtained.
closureThe location to where the user supplied data will be written.
Returns
mama_status MAMA_STATUS_OK if the call was successful.
MAMA_FIELD_TYPE_VECTOR_U64
@ MAMA_FIELD_TYPE_VECTOR_U64
Definition: fielddesc.h:100
mamaFieldType
enum mamaFieldType_ mamaFieldType
The mamaFieldDescriptor class represents a field in a mamaMsg.
MAMA_FIELD_TYPE_VECTOR_F32
@ MAMA_FIELD_TYPE_VECTOR_F32
Definition: fielddesc.h:101
MAMA_FIELD_TYPE_COLLECTION
@ MAMA_FIELD_TYPE_COLLECTION
Collection.
Definition: fielddesc.h:110
MAMA_FIELD_TYPE_F64
@ MAMA_FIELD_TYPE_F64
64 bit float
Definition: fielddesc.h:84
MAMA_FIELD_TYPE_VECTOR_U16
@ MAMA_FIELD_TYPE_VECTOR_U16
Definition: fielddesc.h:96
MAMA_FIELD_TYPE_PRICE
@ MAMA_FIELD_TYPE_PRICE
MAMA price.
Definition: fielddesc.h:90
MAMA_FIELD_TYPE_I32
@ MAMA_FIELD_TYPE_I32
Signed 32 bit integer.
Definition: fielddesc.h:69
MAMA_FIELD_TYPE_VECTOR_F64
@ MAMA_FIELD_TYPE_VECTOR_F64
Definition: fielddesc.h:102
MAMA_FIELD_TYPE_U8
@ MAMA_FIELD_TYPE_U8
Unsigned byte.
Definition: fielddesc.h:60
MAMA_FIELD_TYPE_CHAR
@ MAMA_FIELD_TYPE_CHAR
Character.
Definition: fielddesc.h:54
MAMA_FIELD_TYPE_TIME
@ MAMA_FIELD_TYPE_TIME
64 bit MAMA time
Definition: fielddesc.h:87
MAMA_FIELD_TYPE_VECTOR_PRICE
@ MAMA_FIELD_TYPE_VECTOR_PRICE
Definition: fielddesc.h:106
MAMA_FIELD_TYPE_I8
@ MAMA_FIELD_TYPE_I8
Signed 8 bit integer.
Definition: fielddesc.h:57
MAMA_FIELD_TYPE_BOOL
@ MAMA_FIELD_TYPE_BOOL
Boolean.
Definition: fielddesc.h:51
MAMA_FIELD_TYPE_U16
@ MAMA_FIELD_TYPE_U16
Unsigned 16 bit integer.
Definition: fielddesc.h:66
MAMA_FIELD_TYPE_QUANTITY
@ MAMA_FIELD_TYPE_QUANTITY
Definition: fielddesc.h:107
MAMA_FIELD_TYPE_VECTOR_STRING
@ MAMA_FIELD_TYPE_VECTOR_STRING
Definition: fielddesc.h:103
MAMA_FIELD_TYPE_I16
@ MAMA_FIELD_TYPE_I16
Signed 16 bit integer.
Definition: fielddesc.h:63
MAMA_FIELD_TYPE_VECTOR_I16
@ MAMA_FIELD_TYPE_VECTOR_I16
Definition: fielddesc.h:95
MAMA_FIELD_TYPE_U32
@ MAMA_FIELD_TYPE_U32
Unsigned 32 bit integer.
Definition: fielddesc.h:72
MAMA_FIELD_TYPE_VECTOR_I32
@ MAMA_FIELD_TYPE_VECTOR_I32
Definition: fielddesc.h:97
MAMA_FIELD_TYPE_F32
@ MAMA_FIELD_TYPE_F32
32 bit float
Definition: fielddesc.h:81
MAMA_FIELD_TYPE_VECTOR_U8
@ MAMA_FIELD_TYPE_VECTOR_U8
Definition: fielddesc.h:94
MAMA_FIELD_TYPE_UNKNOWN
@ MAMA_FIELD_TYPE_UNKNOWN
Unknown.
Definition: fielddesc.h:113
MAMA_FIELD_TYPE_VECTOR_I64
@ MAMA_FIELD_TYPE_VECTOR_I64
Definition: fielddesc.h:99
MAMA_FIELD_TYPE_VECTOR_I8
@ MAMA_FIELD_TYPE_VECTOR_I8
Array type support.
Definition: fielddesc.h:93
MAMA_FIELD_TYPE_VECTOR_MSG
@ MAMA_FIELD_TYPE_VECTOR_MSG
Definition: fielddesc.h:104
MAMA_FIELD_TYPE_VECTOR_U32
@ MAMA_FIELD_TYPE_VECTOR_U32
Definition: fielddesc.h:98
MAMA_FIELD_TYPE_I64
@ MAMA_FIELD_TYPE_I64
Signed 64 bit integer.
Definition: fielddesc.h:75
MAMA_FIELD_TYPE_STRING
@ MAMA_FIELD_TYPE_STRING
String.
Definition: fielddesc.h:48
MAMA_FIELD_TYPE_U64
@ MAMA_FIELD_TYPE_U64
Unsigned 64 bit integer.
Definition: fielddesc.h:78
MAMA_FIELD_TYPE_MSG
@ MAMA_FIELD_TYPE_MSG
Sub message.
Definition: fielddesc.h:42
MAMA_FIELD_TYPE_OPAQUE
@ MAMA_FIELD_TYPE_OPAQUE
Opaque binary.
Definition: fielddesc.h:45
MAMA_FIELD_TYPE_VECTOR_TIME
@ MAMA_FIELD_TYPE_VECTOR_TIME
Definition: fielddesc.h:105


© 2012 Linux Foundation