Panda3D
|
Public Member Functions | |
Datagram | aiFormatUpdate (unsigned int do_id, unsigned long int to_id, unsigned 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 int to_id, unsigned 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. | |
DCClassParameter | asClassParameter () |
DCClassParameter const | asClassParameter () |
DCField const | asField () |
DCField | 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 () |
DCSwitchParameter const | asSwitchParameter () |
DCSwitchParameter | asSwitchParameter () |
bool | checkMatch (DCPackerInterface const other) |
Returns true if the other interface is bitwise the same as this one--that is, a uint32 only matches a uint32, etc. | |
bool | checkMatch (string description, DCFile dcfile) |
Returns true if this interface is bitwise the same as the interface described with the indicated formatted string, e.g. | |
bool | checkMatch (string description) |
Returns true if this interface is bitwise the same as the interface described with the indicated formatted string, e.g. | |
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. | |
bool | compareKeywords (DCKeywordList const other) |
Returns true if this list has the same keywords as the other list, false if some keywords differ. | |
int | findSeekIndex (string name) |
Returns the index number to be passed to a future call to DCPacker.seek() to seek directly to the named field without having to look up the field name in a table later, or -1 if the named field cannot be found. | |
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. | |
DCParameter | getElement (int n) |
Returns the parameter object describing the nth element. | |
string | getElementDefault (int n) |
Returns the pre-formatted default value associated with the nth element of the field. | |
int | getElementDivisor (int n) |
Returns the divisor associated with the nth element of the field. | |
string | getElementName (int n) |
Returns the name of the nth element of the field. | |
DCSubatomicType | getElementType (int n) |
Returns the numeric type of the nth element of the field. | |
DCKeyword const | getKeyword (int n) |
Returns the nth keyword in the list. | |
DCKeyword const | getKeywordByName (string name) |
Returns the keyword in the list with the indicated name, or NULL if there is no keyword in the list with that name. | |
string | getName () |
Returns the name of this field, or empty string if the field is unnamed. | |
int | getNumber () |
Returns a unique index number associated with this field. | |
int | getNumElements () |
Returns the number of elements (parameters) of the atomic field. | |
int | getNumKeywords () |
Returns the number of keywords in the list. | |
bool | hasDefaultValue () |
Returns true if a default value has been explicitly established for this field, false otherwise. | |
bool | hasElementDefault (int n) |
Returns true if the nth element of the field has a default value specified, false otherwise. | |
bool | hasKeyword (DCKeyword const keyword) |
Returns true if this list includes the indicated keyword, false otherwise. | |
bool | hasKeyword (string name) |
Returns true if this list includes the indicated keyword, 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>. |
Datagram aiFormatUpdate | ( | unsigned int | do_id, |
unsigned long int | to_id, | ||
unsigned long int | from_id, | ||
PyObject | args | ||
) | [inherited] |
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 int | to_id, | ||
unsigned long int | from_id, | ||
int | msg_type, | ||
PyObject | args | ||
) | [inherited] |
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 | ( | ) | [inherited] |
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 | ( | ) | [inherited] |
Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.
DCClassParameter asClassParameter | ( | ) | [inherited] |
DCClassParameter const asClassParameter | ( | ) | [inherited] |
DCField const asField | ( | ) | [inherited] |
Reimplemented from DCPackerInterface.
DCField asField | ( | ) | [inherited] |
Reimplemented from DCPackerInterface.
DCMolecularField asMolecularField | ( | ) | [inherited] |
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 | ( | ) | [inherited] |
Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.
DCParameter asParameter | ( | ) | [inherited] |
DCParameter const asParameter | ( | ) | [inherited] |
DCSwitchParameter const asSwitchParameter | ( | ) | [inherited] |
DCSwitchParameter asSwitchParameter | ( | ) | [inherited] |
bool checkMatch | ( | DCPackerInterface const | other | ) | [inherited] |
Returns true if the other interface is bitwise the same as this one--that is, a uint32 only matches a uint32, etc.
Names of components, and range limits, are not compared.
bool checkMatch | ( | string | description, |
DCFile | dcfile | ||
) | [inherited] |
Returns true if this interface is bitwise the same as the interface described with the indicated formatted string, e.g.
"(uint8, uint8, int16)", or false otherwise.
If DCFile is not NULL, it specifies the DCFile that was previously loaded, from which some predefined structs and typedefs may be referenced in the description string.
bool checkMatch | ( | string | description | ) | [inherited] |
Returns true if this interface is bitwise the same as the interface described with the indicated formatted string, e.g.
"(uint8, uint8, int16)", or false otherwise.
If DCFile is not NULL, it specifies the DCFile that was previously loaded, from which some predefined structs and typedefs may be referenced in the description string.
Datagram clientFormatUpdate | ( | unsigned int | do_id, |
PyObject | args | ||
) | [inherited] |
Generates a datagram containing the message necessary to send an update for the indicated distributed object from the client.
bool compareKeywords | ( | DCKeywordList const | other | ) | [inherited] |
Returns true if this list has the same keywords as the other list, false if some keywords differ.
Order is not considered important.
int findSeekIndex | ( | string | name | ) | [inherited] |
Returns the index number to be passed to a future call to DCPacker.seek() to seek directly to the named field without having to look up the field name in a table later, or -1 if the named field cannot be found.
If the named field is nested within a switch or some similar dynamic structure that reveals different fields based on the contents of the data, this mechanism cannot be used to pre-fetch the field index number--you must seek for the field by name.
string formatData | ( | string | packed_data, |
bool | show_field_names | ||
) | [inherited] |
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 | ) | [inherited] |
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.
DCClass getClass | ( | ) | [inherited] |
Returns the DCClass pointer for the class that contains this field.
Reimplemented in DCClassParameter.
string getDefaultValue | ( | ) | [inherited] |
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.
DCParameter getElement | ( | int | n | ) |
Returns the parameter object describing the nth element.
string getElementDefault | ( | int | n | ) |
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.
This is deprecated; use get_element() instead.
int getElementDivisor | ( | int | n | ) |
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.
string getElementName | ( | int | n | ) |
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.
This method is deprecated; use get_element()->get_name() instead.
DCSubatomicType getElementType | ( | int | n | ) |
Returns the numeric type of the nth element of the field.
This method is deprecated; use get_element() instead.
DCKeyword const getKeyword | ( | int | n | ) | [inherited] |
Returns the nth keyword in the list.
DCKeyword const getKeywordByName | ( | string | name | ) | [inherited] |
Returns the keyword in the list with the indicated name, or NULL if there is no keyword in the list with that name.
string getName | ( | ) | [inherited] |
Returns the name of this field, or empty string if the field is unnamed.
int getNumber | ( | ) | [inherited] |
Returns a unique index number associated with this field.
This is defined implicitly when the .dc file(s) are read.
int getNumElements | ( | ) |
Returns the number of elements (parameters) of the atomic field.
int getNumKeywords | ( | ) | [inherited] |
Returns the number of keywords in the list.
bool hasDefaultValue | ( | ) | [inherited] |
Returns true if a default value has been explicitly established for this field, false otherwise.
bool hasElementDefault | ( | int | n | ) |
Returns true if the nth element of the field has a default value specified, false otherwise.
This is deprecated; use get_element() instead.
bool hasKeyword | ( | DCKeyword const | keyword | ) | [inherited] |
Returns true if this list includes the indicated keyword, false otherwise.
bool hasKeyword | ( | string | name | ) | [inherited] |
Returns true if this list includes the indicated keyword, false otherwise.
bool isAirecv | ( | ) | [inherited] |
Returns true if the "airecv" flag is set for this field, false otherwise.
bool isBogusField | ( | ) | [inherited] |
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 | ( | ) | [inherited] |
Returns true if the "broadcast" flag is set for this field, false otherwise.
bool isClrecv | ( | ) | [inherited] |
Returns true if the "clrecv" flag is set for this field, false otherwise.
bool isClsend | ( | ) | [inherited] |
Returns true if the "clsend" flag is set for this field, false otherwise.
bool isDb | ( | ) | [inherited] |
Returns true if the "db" flag is set for this field, false otherwise.
bool isOwnrecv | ( | ) | [inherited] |
Returns true if the "ownrecv" flag is set for this field, false otherwise.
bool isOwnsend | ( | ) | [inherited] |
Returns true if the "ownsend" flag is set for this field, false otherwise.
bool isRam | ( | ) | [inherited] |
Returns true if the "ram" flag is set for this field, false otherwise.
bool isRequired | ( | ) | [inherited] |
Returns true if the "required" flag is set for this field, false otherwise.
output | ( | ostream | out | ) | [inherited] |
Write a string representation of this instance to <out>.
bool packArgs | ( | DCPacker | packer, |
PyObject | sequence | ||
) | [inherited] |
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 | ) | [inherited] |
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 | ||
) | [inherited] |
Extracts the update message out of the datagram and applies it to the indicated object by calling the appropriate method.
PyObject unpackArgs | ( | DCPacker | packer | ) | [inherited] |
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 | ) | [inherited] |
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 | ||
) | [inherited] |
Write a string representation of this instance to <out>.