44 INLINE
int get_number()
const;
45 INLINE
DCClass *get_class()
const;
48 virtual const DCField *as_field()
const;
56 std::string format_data(
const vector_uchar &packed_data,
bool show_field_names =
true);
57 vector_uchar parse_string(
const std::string &formatted_string);
59 bool validate_ranges(
const vector_uchar &packed_data)
const;
61 INLINE
bool has_default_value()
const;
62 INLINE
const vector_uchar &get_default_value()
const;
64 INLINE
bool is_bogus_field()
const;
66 INLINE
bool is_required()
const;
67 INLINE
bool is_broadcast()
const;
68 INLINE
bool is_ram()
const;
69 INLINE
bool is_db()
const;
70 INLINE
bool is_clsend()
const;
71 INLINE
bool is_clrecv()
const;
72 INLINE
bool is_ownsend()
const;
73 INLINE
bool is_ownrecv()
const;
74 INLINE
bool is_airecv()
const;
76 INLINE
void output(std::ostream &out)
const;
77 INLINE
void write(std::ostream &out,
int indent_level)
const;
80 bool pack_args(
DCPacker &packer, PyObject *sequence)
const;
81 PyObject *unpack_args(
DCPacker &packer)
const;
83 void receive_update(
DCPacker &packer, PyObject *distobj)
const;
85 Datagram client_format_update(DOID_TYPE do_id, PyObject *args)
const;
86 Datagram ai_format_update(DOID_TYPE do_id, CHANNEL_TYPE to_id, CHANNEL_TYPE from_id,
87 PyObject *args)
const;
88 Datagram ai_format_update_msg_type(DOID_TYPE do_id, CHANNEL_TYPE to_id, CHANNEL_TYPE from_id,
89 int msg_type, PyObject *args)
const;
93 virtual void output(std::ostream &out,
bool brief)
const=0;
94 virtual void write(std::ostream &out,
bool brief,
int indent_level)
const=0;
97 virtual void set_name(
const std::string &name);
99 INLINE
void set_number(
int number);
100 INLINE
void set_class(
DCClass *dclass);
101 INLINE
void set_default_value(vector_uchar default_value);
104 static std::string get_pystr(PyObject *value);
108 void refresh_default_value();
113 bool _default_value_stale;
114 bool _has_default_value;
118 vector_uchar _default_value;
125INLINE std::ostream &operator << (std::ostream &out,
const DCField &field) {
A single atomic field of a Distributed Class, as read from a .dc file.
Defines a particular DistributedClass as read from an input .dc file.
A single field of a Distributed Class, either atomic or molecular.
void output(std::ostream &out) const
Write a string representation of this instance to <out>.
This is a list of keywords (see DCKeyword) that may be set on a particular field.
void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of these keywords into the hash.
A single molecular field of a Distributed Class, as read from a .dc file.
This is a block of data that receives the results of DCPacker.
This defines the internal interface for packing values into a DCField.
virtual void set_name(const std::string &name)
Sets the name of this field.
virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const
Packs the field's specified default value (or a sensible default if no value is specified) into the s...
This class can be used for packing a series of numeric and string data into a binary stream,...
Represents the type specification for a single parameter within a field specification.
This represents a switch statement, which can appear inside a class body and represents two or more a...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This class generates an arbitrary hash number from a sequence of ints.
A lightweight class that represents a single element that may be timed and/or counted via stats.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.