19 #include "dcPackerInterface.h"
20 #include "dcKeywordList.h"
24 #include "pStatCollector.h"
47 INLINE
int get_number()
const;
48 INLINE
DCClass *get_class()
const;
51 virtual const DCField *as_field()
const;
59 string format_data(
const string &packed_data,
bool show_field_names =
true);
60 string parse_string(
const string &formatted_string);
62 bool validate_ranges(
const string &packed_data)
const;
64 INLINE
bool has_default_value()
const;
65 INLINE
const string &get_default_value()
const;
67 INLINE
bool is_bogus_field()
const;
69 INLINE
bool is_required()
const;
70 INLINE
bool is_broadcast()
const;
71 INLINE
bool is_ram()
const;
72 INLINE
bool is_db()
const;
73 INLINE
bool is_clsend()
const;
74 INLINE
bool is_clrecv()
const;
75 INLINE
bool is_ownsend()
const;
76 INLINE
bool is_ownrecv()
const;
77 INLINE
bool is_airecv()
const;
79 INLINE
void output(ostream &out)
const;
80 INLINE
void write(ostream &out,
int indent_level)
const;
83 bool pack_args(
DCPacker &packer, PyObject *sequence)
const;
84 PyObject *unpack_args(
DCPacker &packer)
const;
86 void receive_update(
DCPacker &packer, PyObject *distobj)
const;
88 Datagram client_format_update(DOID_TYPE do_id, PyObject *args)
const;
89 Datagram ai_format_update(DOID_TYPE do_id, CHANNEL_TYPE to_id, CHANNEL_TYPE from_id,
90 PyObject *args)
const;
91 Datagram ai_format_update_msg_type(DOID_TYPE do_id, CHANNEL_TYPE to_id, CHANNEL_TYPE from_id,
92 int msg_type, PyObject *args)
const;
96 virtual void output(ostream &out,
bool brief)
const=0;
97 virtual void write(ostream &out,
bool brief,
int indent_level)
const=0;
100 virtual void set_name(
const string &name);
102 INLINE
void set_number(
int number);
103 INLINE
void set_class(
DCClass *dclass);
104 INLINE
void set_default_value(
const string &default_value);
107 static string get_pystr(PyObject *value);
111 void refresh_default_value();
116 bool _default_value_stale;
117 bool _has_default_value;
121 string _default_value;
128 INLINE ostream &operator << (ostream &out,
const DCField &field) {
This is a block of data that receives the results of DCPacker.
This is a list of keywords (see DCKeyword) that may be set on a particular field. ...
A single field of a Distributed Class, either atomic or molecular.
This represents a switch statement, which can appear inside a class body and represents two or more a...
Defines a particular DistributedClass as read from an input .dc file.
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...
A single atomic field of a Distributed Class, as read from a .dc file.
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 class generates an arbitrary hash number from a sequence of ints.
void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of these keywords into the hash.
This class can be used for packing a series of numeric and string data into a binary stream...
virtual void set_name(const string &name)
Sets the name of this field.
A single molecular field of a Distributed Class, as read from a .dc file.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This defines the internal interface for packing values into a DCField.