class DCAtomicField

Bases: DCField

A single atomic field of a Distributed Class, as read from a .dc file. This defines an interface to the Distributed Class, and is always implemented as a remote procedure method.

Inheritance diagram

Inheritance diagram of DCAtomicField

DCParameter *get_element(int n) const

Returns the parameter object describing the nth element.

vector_uchar get_element_default(int n) const

These five methods are deprecated and will be removed soon.

Returns the pre-formatted default value associated with the nth element of the field. This is only valid if has_element_default() returns true, in which case this string represents the bytes that should be assigned to the field as a default value.

If the element is an array-type element, the returned value will include the two-byte length preceding the array data.

Deprecated: use get_element() instead.

int get_element_divisor(int n) const

Returns the divisor associated with the nth element of the field. This implements an implicit fixed-point system; floating-point values are to be multiplied by this value before encoding into a packet, and divided by this number after decoding.

This method is deprecated; use get_element()->get_divisor() instead.

std::string get_element_name(int n) const

Returns the name of the nth element of the field. This name is strictly for documentary purposes; it does not generally affect operation. If a name is not specified, this will be the empty string.

Deprecated: use get_element()->get_name() instead.

DCSubatomicType get_element_type(int n) const

Returns the numeric type of the nth element of the field. This method is deprecated; use get_element() instead.

int get_num_elements(void) const

Returns the number of elements (parameters) of the atomic field.

bool has_element_default(int n) const

Returns true if the nth element of the field has a default value specified, false otherwise.

Deprecated: use get_element() instead.