DCClass

from acron.direct import DCClass
class DCClass

Bases:

Bases: DCDeclaration

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

Inheritance diagram

digraph inheritance4b1ac572af { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DCClass" [URL="acron.direct.DCClass.html#acron.direct.DCClass",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DCDeclaration" -> "DCClass" [arrowsize=0.75,style=""]; "DCDeclaration" [URL="acron.direct.DCDeclaration.html#acron.direct.DCDeclaration",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "DCDeclaration" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; }
ai_format_generate()
ai_format_update()
ai_format_update_msg_type()
client_format_generate_CMU()
client_format_update()
direct_update()
get_class_def()
get_constructor()

Returns the constructor method for this class if it is defined, or NULL if the class uses the default constructor.

get_dc_file()

Returns the DCFile object that contains the class.

get_field()

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()

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()

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()

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()

Returns the name of this class.

get_num_fields()

Returns the number of fields defined directly in this class, ignoring inheritance.

get_num_inherited_fields()

Returns the total number of field fields defined in this class and all ancestor classes.

get_num_parents()

Returns the number of base classes this class inherits from.

get_number()

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

get_owner_class_def()
get_parent()

Returns the nth parent class this class inherits from.

has_class_def()
has_constructor()

Returns true if this class has a constructor method, false if it just uses the default constructor.

has_owner_class_def()
inherits_from_bogus_class()

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.

is_bogus_class()

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()

Returns true if the class has been identified with the “struct” keyword in the dc file, false if it was declared with “dclass”.

output()

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

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

pack_required_field()
receive_update()
receive_update_all_required()
receive_update_broadcast_required()
receive_update_broadcast_required_owner()
receive_update_other()
set_class_def()
set_owner_class_def()
start_generate()

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().

stop_generate()

Stops the PStats timer on the “generate” task. This should balance with a preceding call to start_generate().