27 _parameter(parameter),
28 _bogus_typedef(false),
29 _implicit_typedef(implicit),
41 _implicit_typedef(false),
77 std::ostringstream strm;
78 _parameter->output(strm,
true);
90 return _bogus_typedef;
99 return _implicit_typedef;
108 DCParameter *new_parameter = _parameter->make_copy();
111 return new_parameter;
127 output(std::ostream &out,
bool brief)
const {
129 _parameter->output(out,
false);
136 write(std::ostream &out,
bool brief,
int indent_level)
const {
142 _parameter->output(out,
false);
146 out <<
" // typedef " << _number;
virtual void set_name(const std::string &name)
Sets the name of this field.
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.
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...
DCParameter * make_new_parameter() const
Returns a newly-allocated DCParameter object that uses the same type as that named by the typedef.
DCTypedef(DCParameter *parameter, bool implicit=false)
The DCTypedef object becomes the owner of the supplied parameter pointer and will delete it upon dest...
bool is_implicit_typedef() const
Returns true if the typedef has been flagged as an implicit typedef, meaning it was created for a DCC...
void set_number(int number)
Assigns the unique number to this typedef.
int get_number() const
Returns a unique index number associated with this typedef definition.
virtual void output(std::ostream &out, bool brief) const
Write a string representation of this instance to <out>.
const std::string & get_name() const
Returns the name of this typedef.
std::string get_description() const
Returns a brief decription of the typedef, useful for human consumption.
bool is_bogus_typedef() const
Returns true if the typedef has been flagged as a bogus typedef.
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.