A single field of a Distributed Class, either atomic or molecular. More...
Public Member Functions | |
Datagram | aiFormatUpdate (unsigned int do_id, unsigned long long int to_id, unsigned long long int from_id, PyObject args) |
Generates a datagram containing the message necessary to send an update for the indicated distributed object from the AI. | |
Datagram | aiFormatUpdateMsgType (unsigned int do_id, unsigned long long int to_id, unsigned long long int from_id, int msg_type, PyObject args) |
Generates a datagram containing the message necessary to send an update, with the msg type, for the indicated distributed object from the AI. | |
DCAtomicField | asAtomicField () |
Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL. | |
DCAtomicField const | asAtomicField () |
Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL. | |
DCField | asField () |
DCField const | asField () |
DCMolecularField | asMolecularField () |
Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL. | |
DCMolecularField const | asMolecularField () |
Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL. | |
DCParameter | asParameter () |
DCParameter const | asParameter () |
Datagram | clientFormatUpdate (unsigned int do_id, PyObject args) |
Generates a datagram containing the message necessary to send an update for the indicated distributed object from the client. | |
string | formatData (string packed_data, bool show_field_names) |
Given a blob that represents the packed data for this field, returns a string formatting it for human consumption. | |
string | formatData (string packed_data) |
Given a blob that represents the packed data for this field, returns a string formatting it for human consumption. | |
DCClass | getClass () |
Returns the DCClass pointer for the class that contains this field. | |
string | getDefaultValue () |
Returns the default value for this field. | |
int | getNumber () |
Returns a unique index number associated with this field. | |
bool | hasDefaultValue () |
Returns true if a default value has been explicitly established for this field, false otherwise. | |
bool | isAirecv () |
Returns true if the "airecv" flag is set for this field, false otherwise. | |
bool | isBogusField () |
Returns true if the field has been flagged as a bogus field. | |
bool | isBroadcast () |
Returns true if the "broadcast" flag is set for this field, false otherwise. | |
bool | isClrecv () |
Returns true if the "clrecv" flag is set for this field, false otherwise. | |
bool | isClsend () |
Returns true if the "clsend" flag is set for this field, false otherwise. | |
bool | isDb () |
Returns true if the "db" flag is set for this field, false otherwise. | |
bool | isOwnrecv () |
Returns true if the "ownrecv" flag is set for this field, false otherwise. | |
bool | isOwnsend () |
Returns true if the "ownsend" flag is set for this field, false otherwise. | |
bool | isRam () |
Returns true if the "ram" flag is set for this field, false otherwise. | |
bool | isRequired () |
Returns true if the "required" flag is set for this field, false otherwise. | |
output (ostream out) | |
Write a string representation of this instance to <out>. | |
bool | packArgs (DCPacker packer, PyObject sequence) |
Packs the Python arguments from the indicated tuple into the packer. | |
string | parseString (string formatted_string) |
Given a human-formatted string (for instance, as returned by format_data(), above) that represents the value of this field, parse the string and return the corresponding packed data. | |
receiveUpdate (DCPacker packer, PyObject distobj) | |
Extracts the update message out of the datagram and applies it to the indicated object by calling the appropriate method. | |
PyObject | unpackArgs (DCPacker packer) |
Unpacks the values from the packer, beginning at the current point in the unpack_buffer, into a Python tuple and returns the tuple. | |
bool | validateRanges (string packed_data) |
Verifies that all of the packed values in the field data are within the specified ranges and that there are no extra bytes on the end of the record. | |
write (ostream out, int indent_level) | |
Write a string representation of this instance to <out>. |
A single field of a Distributed Class, either atomic or molecular.
Datagram aiFormatUpdate | ( | unsigned int | do_id, |
unsigned long long int | to_id, | ||
unsigned long long int | from_id, | ||
PyObject | args | ||
) |
Generates a datagram containing the message necessary to send an update for the indicated distributed object from the AI.
Datagram aiFormatUpdateMsgType | ( | unsigned int | do_id, |
unsigned long long int | to_id, | ||
unsigned long long int | from_id, | ||
int | msg_type, | ||
PyObject | args | ||
) |
Generates a datagram containing the message necessary to send an update, with the msg type, for the indicated distributed object from the AI.
Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.
DCAtomicField const asAtomicField | ( | ) |
Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.
Reimplemented from DCPackerInterface.
Reimplemented from DCPackerInterface.
Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.
DCMolecularField const asMolecularField | ( | ) |
Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.
DCParameter const asParameter | ( | ) |
Datagram clientFormatUpdate | ( | unsigned int | do_id, |
PyObject | args | ||
) |
Generates a datagram containing the message necessary to send an update for the indicated distributed object from the client.
string formatData | ( | string | packed_data, |
bool | show_field_names | ||
) |
Given a blob that represents the packed data for this field, returns a string formatting it for human consumption.
Returns empty string if there is an error.
string formatData | ( | string | packed_data | ) |
Given a blob that represents the packed data for this field, returns a string formatting it for human consumption.
Returns empty string if there is an error.
Returns the DCClass pointer for the class that contains this field.
Reimplemented in DCClassParameter.
string getDefaultValue | ( | ) |
Returns the default value for this field.
If a default value has been explicitly set (e.g. has_default_value() returns true), returns that value; otherwise, returns an implicit default for the field.
int getNumber | ( | ) |
Returns a unique index number associated with this field.
This is defined implicitly when the .dc file(s) are read.
bool hasDefaultValue | ( | ) |
Returns true if a default value has been explicitly established for this field, false otherwise.
bool isAirecv | ( | ) |
Returns true if the "airecv" flag is set for this field, false otherwise.
bool isBogusField | ( | ) |
Returns true if the field has been flagged as a bogus field.
This is set for fields that are generated by the parser as placeholder for missing fields, as when reading a partial file; it should not occur in a normal valid dc file.
bool isBroadcast | ( | ) |
Returns true if the "broadcast" flag is set for this field, false otherwise.
bool isClrecv | ( | ) |
Returns true if the "clrecv" flag is set for this field, false otherwise.
bool isClsend | ( | ) |
Returns true if the "clsend" flag is set for this field, false otherwise.
bool isDb | ( | ) |
Returns true if the "db" flag is set for this field, false otherwise.
bool isOwnrecv | ( | ) |
Returns true if the "ownrecv" flag is set for this field, false otherwise.
bool isOwnsend | ( | ) |
Returns true if the "ownsend" flag is set for this field, false otherwise.
bool isRam | ( | ) |
Returns true if the "ram" flag is set for this field, false otherwise.
bool isRequired | ( | ) |
Returns true if the "required" flag is set for this field, false otherwise.
output | ( | ostream | out | ) |
Write a string representation of this instance to <out>.
Packs the Python arguments from the indicated tuple into the packer.
Returns true on success, false on failure.
It is assumed that the packer is currently positioned on this field.
string parseString | ( | string | formatted_string | ) |
Given a human-formatted string (for instance, as returned by format_data(), above) that represents the value of this field, parse the string and return the corresponding packed data.
Returns empty string if there is an error.
receiveUpdate | ( | DCPacker | packer, |
PyObject | distobj | ||
) |
Extracts the update message out of the datagram and applies it to the indicated object by calling the appropriate method.
PyObject unpackArgs | ( | DCPacker | packer | ) |
Unpacks the values from the packer, beginning at the current point in the unpack_buffer, into a Python tuple and returns the tuple.
It is assumed that the packer is currently positioned on this field.
bool validateRanges | ( | string | packed_data | ) |
Verifies that all of the packed values in the field data are within the specified ranges and that there are no extra bytes on the end of the record.
Returns true if all fields are valid, false otherwise.
write | ( | ostream | out, |
int | indent_level | ||
) |
Write a string representation of this instance to <out>.