TibrvMsgField

Class

Declaration

class TibrvMsgField : public tibrvMsgField

Purpose

Represent a message field.

Remarks

Because the field object is identical to the C field struct, programs can use the struct’s accessors to get and set the field’s name, data, and other members.

Although a formal destructor is not needed, C++ declares a default destructor, which has no effect.

Method

Description

TibrvMsgField()

Create a message field object.

TibrvMsgField::getCount()

Get the number of elements in a field.

TibrvMsgField::getData()

Get the data value of a field.

TibrvMsgField::getId()

Get the identifier of a field.

TibrvMsgField::getName()

Get the name of a field.

TibrvMsgField::getSize()

Get the size of a field.

TibrvMsgField::getType()

Get the datatype of a field.

Member

Type

Description

name

char*

The field’s name. NULL signifies the empty string as the field name.

Field name strings use the ISO 8859-1 character encoding.

size

tibrv_u32

The size of the field’s data (in bytes).

For array types, size reflects the size (in bytes) of one array element. For TIBRVMSG_STRING, size reflects the number of bytes in the string (including the NULL terminator, if present). For TIBRVMSG_OPAQUE and TIBRVMSG_XML, size reflects the number of bytes of opaque data.

count

tibrv_u32

The number of values in an array field. For array types, count is the number of array elements.

For example, when a field contains a array of ten 32-bit integers, its size is 4, and its count is 10.

(For scalar types, strings, XML data, and opaque byte sequences, count is 1. That is, the field contains one string—not an array of characters; one opaque value—not an array of bytes.)

data

tibrvLocalData

The field’s data value.

id

tibrv_u16

The field’s identifier. Identifiers are optional, but must be unique within each message.

type

tibrv_u8

A Rendezvous datatype token denoting the type of the field’s data.

See Also

TibrvMsg::addField()

TibrvMsg::getField()

TibrvMsg::updateField()

tibrvMsgField in TIBCO Rendezvous C Reference