29 _has_fixed_byte_size =
false;
30 _has_fixed_structure =
false;
31 _num_nested_fields = -1;
40 _typedef(copy._typedef)
71as_simple_parameter() {
79as_simple_parameter()
const {
95as_class_parameter()
const {
103as_switch_parameter() {
111as_switch_parameter()
const {
119as_array_parameter() {
127as_array_parameter()
const {
164output(ostream &out,
bool brief)
const {
169 output_instance(out, brief,
"", name,
"");
176write(ostream &out,
bool brief,
int indent_level)
const {
188 const string &prename,
const string &name,
189 const string &postname)
const {
190 indent(out, indent_level);
191 output_instance(out, brief, prename, name, postname);
192 output_keywords(out);
194 if (!brief && _number >= 0) {
195 out <<
" // field " << _number;
206 const string &name,
const string &postname)
const {
208 if (!prename.empty() || !name.empty() || !postname.empty()) {
209 out <<
" " << prename << name << postname;
219 const string &prename,
const string &name,
220 const string &postname)
const {
223 if (!prename.empty() || !name.empty() || !postname.empty()) {
224 out <<
" " << prename << name << postname;
226 output_keywords(out);
228 if (!brief && _number >= 0) {
229 out <<
" // field " << _number;
This represents an array of some other kind of object, meaning this parameter type accepts an arbitra...
This represents a class (or struct) object used as a parameter itself.
A single field of a Distributed Class, either atomic or molecular.
void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of these keywords into the hash.
int get_num_keywords() const
Returns the number of keywords in the list.
const std::string & get_name() const
Returns the name of this field, or empty string if the field is unnamed.
Represents the type specification for a single parameter within a field specification.
virtual void write_instance(std::ostream &out, bool brief, int indent_level, const std::string &prename, const std::string &name, const std::string &postname) const
Formats the parameter in the C++-like dc syntax as a typename and identifier.
virtual void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of this type into the hash.
void write_typedef_name(std::ostream &out, bool brief, int indent_level, const std::string &prename, const std::string &name, const std::string &postname) const
Formats the instance like write_instance, but uses the typedef name instead.
const DCTypedef * get_typedef() const
If this type has been referenced from a typedef, returns the DCTypedef instance, or NULL if the type ...
void output_typedef_name(std::ostream &out, bool brief, const std::string &prename, const std::string &name, const std::string &postname) const
Formats the instance like output_instance, but uses the typedef name instead.
virtual DCParameter * append_array_specification(const DCUnsignedIntRange &size)
Returns the type represented by this_type[size].
void set_typedef(const DCTypedef *dtypedef)
Records the DCTypedef object that generated this parameter.
This is the most fundamental kind of parameter type: a single number or string, one of the DCSubatomi...
This represents a switch object used as a parameter itself, which packs the appropriate fields of the...
This represents a single typedef declaration in the dc file.
const std::string & get_name() const
Returns the name of this typedef.
This class generates an arbitrary hash number from a sequence of ints.
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.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.