20 #include "dcDeclaration.h" 24 #include "pStatCollector.h" 25 #include "configVariableBool.h" 33 static const bool dc_multiple_inheritance =
true;
34 static const bool dc_virtual_inheritance =
true;
35 static const bool dc_sort_inheritance_by_file =
false;
37 #endif // WITHIN_PANDA 50 bool is_struct,
bool bogus_class);
55 virtual const DCClass *as_class()
const;
57 INLINE
DCFile *get_dc_file()
const;
59 INLINE
const string &get_name()
const;
60 INLINE
int get_number()
const;
62 int get_num_parents()
const;
63 DCClass *get_parent(
int n)
const;
65 bool has_constructor()
const;
66 DCField *get_constructor()
const;
68 int get_num_fields()
const;
69 DCField *get_field(
int n)
const;
71 DCField *get_field_by_name(
const string &name)
const;
72 DCField *get_field_by_index(
int index_number)
const;
74 int get_num_inherited_fields()
const;
75 DCField *get_inherited_field(
int n)
const;
77 INLINE
bool is_struct()
const;
78 INLINE
bool is_bogus_class()
const;
79 bool inherits_from_bogus_class()
const;
81 INLINE
void start_generate();
82 INLINE
void stop_generate();
84 virtual void output(ostream &out)
const;
87 bool has_class_def()
const;
88 void set_class_def(PyObject *class_def);
89 PyObject *get_class_def()
const;
90 bool has_owner_class_def()
const;
91 void set_owner_class_def(PyObject *owner_class_def);
92 PyObject *get_owner_class_def()
const;
95 void receive_update_broadcast_required(PyObject *distobj,
DatagramIterator &di)
const;
96 void receive_update_broadcast_required_owner(PyObject *distobj,
DatagramIterator &di)
const;
97 void receive_update_all_required(PyObject *distobj,
DatagramIterator &di)
const;
100 void direct_update(PyObject *distobj,
const string &field_name,
101 const string &value_blob);
102 void direct_update(PyObject *distobj,
const string &field_name,
104 bool pack_required_field(
Datagram &datagram, PyObject *distobj,
106 bool pack_required_field(
DCPacker &packer, PyObject *distobj,
111 Datagram client_format_update(
const string &field_name,
112 DOID_TYPE do_id, PyObject *args)
const;
113 Datagram ai_format_update(
const string &field_name, DOID_TYPE do_id,
114 CHANNEL_TYPE to_id, CHANNEL_TYPE from_id, PyObject *args)
const;
115 Datagram ai_format_update_msg_type(
const string &field_name, DOID_TYPE do_id,
116 CHANNEL_TYPE to_id, CHANNEL_TYPE from_id,
int msg_type, PyObject *args)
const;
117 Datagram ai_format_generate(PyObject *distobj, DOID_TYPE do_id, ZONEID_TYPE parent_id, ZONEID_TYPE zone_id,
118 CHANNEL_TYPE district_channel_id, CHANNEL_TYPE from_channel_id,
119 PyObject *optional_fields)
const;
120 Datagram client_format_generate_CMU(PyObject *distobj, DOID_TYPE do_id,
121 ZONEID_TYPE zone_id, PyObject *optional_fields)
const;
123 Datagram ai_database_generate_context(
unsigned int context_id, DOID_TYPE parent_id, ZONEID_TYPE zone_id, CHANNEL_TYPE owner_channel,
124 CHANNEL_TYPE database_server_id, CHANNEL_TYPE from_channel_id)
const;
125 Datagram ai_database_generate_context_old(
unsigned int context_id, DOID_TYPE parent_id, ZONEID_TYPE zone_id,
126 CHANNEL_TYPE database_server_id, CHANNEL_TYPE from_channel_id)
const;
131 virtual void output(ostream &out,
bool brief)
const;
132 virtual void write(ostream &out,
bool brief,
int indent_level)
const;
133 void output_instance(ostream &out,
bool brief,
const string &prename,
134 const string &name,
const string &postname)
const;
136 void clear_inherited_fields();
137 void rebuild_inherited_fields();
139 bool add_field(
DCField *field);
140 void add_parent(
DCClass *parent);
141 void set_number(
int number);
144 void shadow_inherited_field(
const string &name);
166 Fields _fields, _inherited_fields;
169 FieldsByName _fields_by_name;
172 FieldsByIndex _fields_by_index;
175 PyObject *_class_def;
176 PyObject *_owner_class_def;
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.
This is our own Panda specialization on the default STL map.
A single field of a Distributed Class, either atomic or molecular.
This is a convenience class to specialize ConfigVariable as a boolean type.
void write(ostream &out, int indent_level) const
Write a string representation of this instance to <out>.
Defines a particular DistributedClass as read from an input .dc file.
Represents the complete list of Distributed Class descriptions as read from a .dc file...
This is our own Panda specialization on the default STL vector.
A lightweight class that represents a single element that may be timed and/or counted via stats...
Represents the type specification for a single parameter within a field specification.
This is a common interface for a declaration in a DC file.
This class generates an arbitrary hash number from a sequence of ints.
This class can be used for packing a series of numeric and string data into a binary stream...
A class to retrieve the individual data elements previously stored in a Datagram. ...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...