32 static const bool dc_multiple_inheritance =
true;
33 static const bool dc_virtual_inheritance =
true;
34 static const bool dc_sort_inheritance_by_file =
false;
36 #endif // WITHIN_PANDA 47 bool is_struct,
bool bogus_class);
52 virtual const DCClass *as_class()
const;
54 INLINE
DCFile *get_dc_file()
const;
56 INLINE
const std::string &get_name()
const;
57 INLINE
int get_number()
const;
59 int get_num_parents()
const;
60 DCClass *get_parent(
int n)
const;
62 bool has_constructor()
const;
63 DCField *get_constructor()
const;
65 int get_num_fields()
const;
66 DCField *get_field(
int n)
const;
68 DCField *get_field_by_name(
const std::string &name)
const;
69 DCField *get_field_by_index(
int index_number)
const;
71 int get_num_inherited_fields()
const;
72 DCField *get_inherited_field(
int n)
const;
74 INLINE
bool is_struct()
const;
75 INLINE
bool is_bogus_class()
const;
76 bool inherits_from_bogus_class()
const;
78 INLINE
void start_generate();
79 INLINE
void stop_generate();
81 virtual void output(std::ostream &out)
const;
84 bool has_class_def()
const;
85 void set_class_def(PyObject *class_def);
86 PyObject *get_class_def()
const;
87 bool has_owner_class_def()
const;
88 void set_owner_class_def(PyObject *owner_class_def);
89 PyObject *get_owner_class_def()
const;
92 void receive_update_broadcast_required(PyObject *distobj,
DatagramIterator &di)
const;
93 void receive_update_broadcast_required_owner(PyObject *distobj,
DatagramIterator &di)
const;
94 void receive_update_all_required(PyObject *distobj,
DatagramIterator &di)
const;
97 void direct_update(PyObject *distobj,
const std::string &field_name,
98 const vector_uchar &value_blob);
99 void direct_update(PyObject *distobj,
const std::string &field_name,
101 bool pack_required_field(
Datagram &datagram, PyObject *distobj,
103 bool pack_required_field(
DCPacker &packer, PyObject *distobj,
108 Datagram client_format_update(
const std::string &field_name,
109 DOID_TYPE do_id, PyObject *args)
const;
110 Datagram ai_format_update(
const std::string &field_name, DOID_TYPE do_id,
111 CHANNEL_TYPE to_id, CHANNEL_TYPE from_id, PyObject *args)
const;
112 Datagram ai_format_update_msg_type(
const std::string &field_name, DOID_TYPE do_id,
113 CHANNEL_TYPE to_id, CHANNEL_TYPE from_id,
int msg_type, PyObject *args)
const;
114 Datagram ai_format_generate(PyObject *distobj, DOID_TYPE do_id, ZONEID_TYPE parent_id, ZONEID_TYPE zone_id,
115 CHANNEL_TYPE district_channel_id, CHANNEL_TYPE from_channel_id,
116 PyObject *optional_fields)
const;
117 Datagram client_format_generate_CMU(PyObject *distobj, DOID_TYPE do_id,
118 ZONEID_TYPE zone_id, PyObject *optional_fields)
const;
123 virtual void output(std::ostream &out,
bool brief)
const;
124 virtual void write(std::ostream &out,
bool brief,
int indent_level)
const;
125 void output_instance(std::ostream &out,
bool brief,
const std::string &prename,
126 const std::string &name,
const std::string &postname)
const;
128 void clear_inherited_fields();
129 void rebuild_inherited_fields();
131 bool add_field(
DCField *field);
132 void add_parent(
DCClass *parent);
133 void set_number(
int number);
136 void shadow_inherited_field(
const std::string &name);
158 Fields _fields, _inherited_fields;
161 FieldsByName _fields_by_name;
164 FieldsByIndex _fields_by_index;
167 PyObject *_class_def;
168 PyObject *_owner_class_def;
This is our own Panda specialization on the default STL map.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
A single field of a Distributed Class, either atomic or molecular.
This is a convenience class to specialize ConfigVariable as a boolean type.
Defines a particular DistributedClass as read from an input .dc file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a common interface for a declaration in a DC file.
This class generates an arbitrary hash number from a sequence of ints.
void write(std::ostream &out, int indent_level) const
Write a string representation of this instance to <out>.
This class can be used for packing a series of numeric and string data into a binary stream,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.