FmsVariant Struct Reference

A tagged variant that holds values of various types. More...

#include <FmsAdaptor.h>

List of all members.

Public Types

enum  Type {
  kU8, kU16, kU32, kI8,
  kI16, kI32, kI64, kFloat,
  kDouble, kString, kBuffer
}

Public Member Functions

void setU8 (U8 val)
void setU16 (U16 val)
void setU32 (U32 val)
void setI8 (I8 val)
void setI16 (I16 val)
void setI32 (I32 val)
void setI64 (I64 val)
void setFloat (float val)
void setDouble (double val)
void setString (I8 *val)
void setBuffer (U8 *b, U32 sz)

Public Attributes

Type type
union {
   U8   u8
 Unsigned 8-bit int value.
   U16   u16
 Unsigned 16-bit int value.
   U32   u32
 Unsigned 32-bit int value.
   I8   i8
 Signed 8-bit int value.
   I16   i16
 Signed 16-bit int value.
   I32   i32
 Signed 32-bit int value.
   I64   i64
 Signed 64-bit int value.
   float   f
 Float value.
   double   d
 Double value.
   I8 *   str
 Null-terminated char string.
   struct {
      U8 *   buf
 Unsigned char buffer.
      U32   size
 Size of unsigned char buffer.
   } 
 A buffer of a specified size.
}; 


Detailed Description

A tagged variant that can hold signed and unsigned integers of various widths, floats, doubles, char* strings, and sized buffers. The type member indicates which of the above is being held. This structure is never more than 12 bytes on 32-bit platforms.

Member Enumeration Documentation

enum FmsVariant::Type

Type tag indicating what is being held in the union.

Enumerator:
kU8  Type tag for an unsigned 8-bit integer.
kU16  Type tag for an unsigned 16-bit integer.
kU32  Type tag for an unsigned 32-bit integer.
kI8  Type tag for a signed 8-bit integer.
kI16  Type tag for a signed 16-bit integer.
kI32  Type tag for a signed 32-bit integer.
kI64  Type tag for a signed 64-bit integer.
kFloat  Type tag for a floating point number.
kDouble  Type tag for a double precision floating-point number.
kString  Type tag for a null-terminated char* string.
kBuffer  Type tag for a sized unsigned char* buffer.


Member Function Documentation

void FmsVariant::setU8 ( U8  val  ) 

Set an unsigned 8-bit int value and adjust the type.

void FmsVariant::setU16 ( U16  val  ) 

Set an unsigned 16-bit int value and adjust the type.

void FmsVariant::setU32 ( U32  val  ) 

Set an unsigned 32-bit int value and adjust the type.

void FmsVariant::setI8 ( I8  val  ) 

Set an signed 8-bit int value and adjust the type.

void FmsVariant::setI16 ( I16  val  ) 

Set an signed 16-bit int value and adjust the type.

void FmsVariant::setI32 ( I32  val  ) 

Set an signed 32-bit int value and adjust the type.

void FmsVariant::setI64 ( I64  val  ) 

Set an signed 64-bit int value and adjust the type.

void FmsVariant::setFloat ( float  val  ) 

Set a float value and adjust the type.

void FmsVariant::setDouble ( double  val  ) 

Set a double value and adjust the type.

void FmsVariant::setString ( I8 val  ) 

Set a null terminated string value and adjust the type.

void FmsVariant::setBuffer ( U8 b,
U32  sz 
)

Set a sized unsigned char buffer and adjust the type.


Member Data Documentation

Type FmsVariant::type

The value type being held.

U8 FmsVariant::u8

Unsigned 8-bit int value

U16 FmsVariant::u16

Unsigned 16-bit int value

U32 FmsVariant::u32

Unsigned 32-bit int value

I8 FmsVariant::i8

Signed 8-bit int value

I16 FmsVariant::i16

Signed 16-bit int value

I32 FmsVariant::i32

Signed 32-bit int value

I64 FmsVariant::i64

Signed 64-bit int value

float FmsVariant::f

Float value

double FmsVariant::d

Double value

I8* FmsVariant::str

Null-terminated char string

U8* FmsVariant::buf

Unsigned char buffer

U32 FmsVariant::size

Size of unsigned char buffer

union { ... }

An anonymous union of all supported value types.


The documentation for this struct was generated from the following file: FMS Adaptors Footer

 

©2007 Adobe Systems Incorporated.  All Rights Reserved.