DCClass

from panda3d.direct import DCClass
class DCClass

Bases: DCDeclaration

Defines a particular DistributedClass as read from an input .dc file.

Inheritance diagram

Inheritance diagram of DCClass

__init__(*args, **kwargs)
aiFormatGenerate()

C++ Interface: ai_format_generate(DCClass self, object distobj, int do_id, int parent_id, int zone_id, long district_channel_id, long from_channel_id, object optional_fields)

aiFormatUpdate()

C++ Interface: ai_format_update(DCClass self, str field_name, int do_id, long to_id, long from_id, object args)

aiFormatUpdateMsgType()

C++ Interface: ai_format_update_msg_type(DCClass self, str field_name, int do_id, long to_id, long from_id, int msg_type, object args)

ai_format_generate()

C++ Interface: ai_format_generate(DCClass self, object distobj, int do_id, int parent_id, int zone_id, long district_channel_id, long from_channel_id, object optional_fields)

ai_format_update()

C++ Interface: ai_format_update(DCClass self, str field_name, int do_id, long to_id, long from_id, object args)

ai_format_update_msg_type()

C++ Interface: ai_format_update_msg_type(DCClass self, str field_name, int do_id, long to_id, long from_id, int msg_type, object args)

clientFormatGenerateCMU()

C++ Interface: client_format_generate_CMU(DCClass self, object distobj, int do_id, int zone_id, object optional_fields)

clientFormatUpdate()

C++ Interface: client_format_update(DCClass self, str field_name, int do_id, object args)

client_format_generate_CMU()

C++ Interface: client_format_generate_CMU(DCClass self, object distobj, int do_id, int zone_id, object optional_fields)

client_format_update()

C++ Interface: client_format_update(DCClass self, str field_name, int do_id, object args)

directUpdate()

C++ Interface: direct_update(const DCClass self, object distobj, str field_name, const Datagram datagram) direct_update(const DCClass self, object distobj, str field_name, bytes value_blob)

direct_update()

C++ Interface: direct_update(const DCClass self, object distobj, str field_name, const Datagram datagram) direct_update(const DCClass self, object distobj, str field_name, bytes value_blob)

getClassDef()

C++ Interface: get_class_def(DCClass self)

getConstructor()

C++ Interface: get_constructor(DCClass self)

/**
  • Returns the constructor method for this class if it is defined, or NULL if

  • the class uses the default constructor.

*/

getDcFile()

C++ Interface: get_dc_file(DCClass self)

/**
  • Returns the DCFile object that contains the class.

*/

getField()

C++ Interface: get_field(DCClass self, int n)

/**
  • Returns the nth field in the class. This is not necessarily the field with

  • index n; this is the nth field defined in the class directly, ignoring

  • inheritance.

*/

getFieldByIndex()

C++ Interface: get_field_by_index(DCClass self, int index_number)

/**
  • Returns a pointer to the DCField that has the indicated index number. If

  • the numbered field is not found in the current class, the parent classes

  • will be searched, so the value returned may not actually be a field within

  • this class. Returns NULL if there is no such field defined.

*/

getFieldByName()

C++ Interface: get_field_by_name(DCClass self, str name)

/**
  • Returns a pointer to the DCField that shares the indicated name. If the

  • named field is not found in the current class, the parent classes will be

  • searched, so the value returned may not actually be a field within this

  • class. Returns NULL if there is no such field defined.

*/

getInheritedField()

C++ Interface: get_inherited_field(DCClass self, int n)

/**
  • Returns the nth field field in the class and all of its ancestors.

  • This used to be the same thing as get_field_by_index(), back when the

  • fields were numbered sequentially within a class’s inheritance hierarchy.

  • Now that fields have a globally unique index number, this is no longer

  • true.

*/

getName()

C++ Interface: get_name(DCClass self)

/**
  • Returns the name of this class.

*/

getNumFields()

C++ Interface: get_num_fields(DCClass self)

/**
  • Returns the number of fields defined directly in this class, ignoring

  • inheritance.

*/

getNumInheritedFields()

C++ Interface: get_num_inherited_fields(DCClass self)

/**
  • Returns the total number of field fields defined in this class and all

  • ancestor classes.

*/

getNumParents()

C++ Interface: get_num_parents(DCClass self)

/**
  • Returns the number of base classes this class inherits from.

*/

getNumber()

C++ Interface: get_number(DCClass self)

/**
  • Returns a unique index number associated with this class. This is defined

  • implicitly when the .dc file(s) are read.

*/

getOwnerClassDef()

C++ Interface: get_owner_class_def(DCClass self)

getParent()

C++ Interface: get_parent(DCClass self, int n)

/**
  • Returns the nth parent class this class inherits from.

*/

get_class_def()

C++ Interface: get_class_def(DCClass self)

get_constructor()

C++ Interface: get_constructor(DCClass self)

/**
  • Returns the constructor method for this class if it is defined, or NULL if

  • the class uses the default constructor.

*/

get_dc_file()

C++ Interface: get_dc_file(DCClass self)

/**
  • Returns the DCFile object that contains the class.

*/

get_field()

C++ Interface: get_field(DCClass self, int n)

/**
  • Returns the nth field in the class. This is not necessarily the field with

  • index n; this is the nth field defined in the class directly, ignoring

  • inheritance.

*/

get_field_by_index()

C++ Interface: get_field_by_index(DCClass self, int index_number)

/**
  • Returns a pointer to the DCField that has the indicated index number. If

  • the numbered field is not found in the current class, the parent classes

  • will be searched, so the value returned may not actually be a field within

  • this class. Returns NULL if there is no such field defined.

*/

get_field_by_name()

C++ Interface: get_field_by_name(DCClass self, str name)

/**
  • Returns a pointer to the DCField that shares the indicated name. If the

  • named field is not found in the current class, the parent classes will be

  • searched, so the value returned may not actually be a field within this

  • class. Returns NULL if there is no such field defined.

*/

get_inherited_field()

C++ Interface: get_inherited_field(DCClass self, int n)

/**
  • Returns the nth field field in the class and all of its ancestors.

  • This used to be the same thing as get_field_by_index(), back when the

  • fields were numbered sequentially within a class’s inheritance hierarchy.

  • Now that fields have a globally unique index number, this is no longer

  • true.

*/

get_name()

C++ Interface: get_name(DCClass self)

/**
  • Returns the name of this class.

*/

get_num_fields()

C++ Interface: get_num_fields(DCClass self)

/**
  • Returns the number of fields defined directly in this class, ignoring

  • inheritance.

*/

get_num_inherited_fields()

C++ Interface: get_num_inherited_fields(DCClass self)

/**
  • Returns the total number of field fields defined in this class and all

  • ancestor classes.

*/

get_num_parents()

C++ Interface: get_num_parents(DCClass self)

/**
  • Returns the number of base classes this class inherits from.

*/

get_number()

C++ Interface: get_number(DCClass self)

/**
  • Returns a unique index number associated with this class. This is defined

  • implicitly when the .dc file(s) are read.

*/

get_owner_class_def()

C++ Interface: get_owner_class_def(DCClass self)

get_parent()

C++ Interface: get_parent(DCClass self, int n)

/**
  • Returns the nth parent class this class inherits from.

*/

hasClassDef()

C++ Interface: has_class_def(DCClass self)

hasConstructor()

C++ Interface: has_constructor(DCClass self)

/**
  • Returns true if this class has a constructor method, false if it just uses

  • the default constructor.

*/

hasOwnerClassDef()

C++ Interface: has_owner_class_def(DCClass self)

has_class_def()

C++ Interface: has_class_def(DCClass self)

has_constructor()

C++ Interface: has_constructor(DCClass self)

/**
  • Returns true if this class has a constructor method, false if it just uses

  • the default constructor.

*/

has_owner_class_def()

C++ Interface: has_owner_class_def(DCClass self)

inheritsFromBogusClass()

C++ Interface: inherits_from_bogus_class(DCClass self)

/**
  • Returns true if this class, or any class in the inheritance heirarchy for

  • this class, is a “bogus” class–a forward reference to an as-yet-undefined

  • class.

*/

inherits_from_bogus_class()

C++ Interface: inherits_from_bogus_class(DCClass self)

/**
  • Returns true if this class, or any class in the inheritance heirarchy for

  • this class, is a “bogus” class–a forward reference to an as-yet-undefined

  • class.

*/

isBogusClass()

C++ Interface: is_bogus_class(DCClass self)

/**
  • Returns true if the class has been flagged as a bogus class. This is set

  • for classes that are generated by the parser as placeholder for missing

  • classes, as when reading a partial file; it should not occur in a normal

  • valid dc file.

*/

isStruct()

C++ Interface: is_struct(DCClass self)

/**
  • Returns true if the class has been identified with the “struct” keyword in

  • the dc file, false if it was declared with “dclass”.

*/

is_bogus_class()

C++ Interface: is_bogus_class(DCClass self)

/**
  • Returns true if the class has been flagged as a bogus class. This is set

  • for classes that are generated by the parser as placeholder for missing

  • classes, as when reading a partial file; it should not occur in a normal

  • valid dc file.

*/

is_struct()

C++ Interface: is_struct(DCClass self)

/**
  • Returns true if the class has been identified with the “struct” keyword in

  • the dc file, false if it was declared with “dclass”.

*/

output()

C++ Interface: output(DCClass self, ostream out)

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

*/

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

*/

packRequiredField()

C++ Interface: pack_required_field(DCClass self, Datagram datagram, object distobj, const DCField field) pack_required_field(DCClass self, DCPacker packer, object distobj, const DCField field)

pack_required_field()

C++ Interface: pack_required_field(DCClass self, Datagram datagram, object distobj, const DCField field) pack_required_field(DCClass self, DCPacker packer, object distobj, const DCField field)

receiveUpdate()

C++ Interface: receive_update(DCClass self, object distobj, DatagramIterator di)

receiveUpdateAllRequired()

C++ Interface: receive_update_all_required(DCClass self, object distobj, DatagramIterator di)

receiveUpdateBroadcastRequired()

C++ Interface: receive_update_broadcast_required(DCClass self, object distobj, DatagramIterator di)

receiveUpdateBroadcastRequiredOwner()

C++ Interface: receive_update_broadcast_required_owner(DCClass self, object distobj, DatagramIterator di)

receiveUpdateOther()

C++ Interface: receive_update_other(DCClass self, object distobj, DatagramIterator di)

receive_update()

C++ Interface: receive_update(DCClass self, object distobj, DatagramIterator di)

receive_update_all_required()

C++ Interface: receive_update_all_required(DCClass self, object distobj, DatagramIterator di)

receive_update_broadcast_required()

C++ Interface: receive_update_broadcast_required(DCClass self, object distobj, DatagramIterator di)

receive_update_broadcast_required_owner()

C++ Interface: receive_update_broadcast_required_owner(DCClass self, object distobj, DatagramIterator di)

receive_update_other()

C++ Interface: receive_update_other(DCClass self, object distobj, DatagramIterator di)

setClassDef()

C++ Interface: set_class_def(const DCClass self, object class_def)

setOwnerClassDef()

C++ Interface: set_owner_class_def(const DCClass self, object owner_class_def)

set_class_def()

C++ Interface: set_class_def(const DCClass self, object class_def)

set_owner_class_def()

C++ Interface: set_owner_class_def(const DCClass self, object owner_class_def)

startGenerate()

C++ Interface: start_generate(const DCClass self)

/**
  • Starts the PStats timer going on the “generate” task, that is, marks the

  • beginning of the process of generating a new object, for the purposes of

  • timing this process.

  • This should balance with a corresponding call to stop_generate().

*/

start_generate()

C++ Interface: start_generate(const DCClass self)

/**
  • Starts the PStats timer going on the “generate” task, that is, marks the

  • beginning of the process of generating a new object, for the purposes of

  • timing this process.

  • This should balance with a corresponding call to stop_generate().

*/

stopGenerate()

C++ Interface: stop_generate(const DCClass self)

/**
  • Stops the PStats timer on the “generate” task. This should balance with a

  • preceding call to start_generate().

*/

stop_generate()

C++ Interface: stop_generate(const DCClass self)

/**
  • Stops the PStats timer on the “generate” task. This should balance with a

  • preceding call to start_generate().

*/