DCField

from panda3d.direct import DCField
class DCField

Bases:

Bases: DCPackerInterface, DCKeywordList

A single field of a Distributed Class, either atomic or molecular.

Inheritance diagram

Inheritance diagram of DCField

ai_format_update(do_id: int, to_id: int, from_id: int, args: object) panda3d.core.Datagram
ai_format_update_msg_type(do_id: int, to_id: int, from_id: int, msg_type: int, args: object) panda3d.core.Datagram
as_atomic_field() DCAtomicField

Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.

as_atomic_field() DCAtomicField

Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.

as_field() DCField
as_field() DCField
as_molecular_field() DCMolecularField

Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.

as_molecular_field() DCMolecularField

Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.

as_parameter() DCParameter
as_parameter() DCParameter
client_format_update(do_id: int, args: object) panda3d.core.Datagram
format_data(packed_data: bytes, show_field_names: bool) str

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.

get_class() DCClass

Returns the DCClass pointer for the class that contains this field.

get_default_value() bytes

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.

get_number() int

Returns a unique index number associated with this field. This is defined implicitly when the .dc file(s) are read.

has_default_value() bool

Returns true if a default value has been explicitly established for this field, false otherwise.

is_airecv() bool

Returns true if the “airecv” flag is set for this field, false otherwise.

is_bogus_field() bool

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.

is_broadcast() bool

Returns true if the “broadcast” flag is set for this field, false otherwise.

is_clrecv() bool

Returns true if the “clrecv” flag is set for this field, false otherwise.

is_clsend() bool

Returns true if the “clsend” flag is set for this field, false otherwise.

is_db() bool

Returns true if the “db” flag is set for this field, false otherwise.

is_ownrecv() bool

Returns true if the “ownrecv” flag is set for this field, false otherwise.

is_ownsend() bool

Returns true if the “ownsend” flag is set for this field, false otherwise.

is_ram() bool

Returns true if the “ram” flag is set for this field, false otherwise.

is_required() bool

Returns true if the “required” flag is set for this field, false otherwise.

output(out: panda3d.core.ostream)

Write a string representation of this instance to <out>.

pack_args(packer: DCPacker, sequence: object) bool
parse_string(formatted_string: str) bytes

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.

receive_update(packer: DCPacker, distobj: object)
unpack_args(packer: DCPacker) object
validate_ranges(packed_data: bytes) bool

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(out: panda3d.core.ostream, indent_level: int)

Write a string representation of this instance to <out>.