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;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_number(int number)
Assigns the unique number to this typedef.
DCTypedef(DCParameter *parameter, bool implicit=false)
The DCTypedef object becomes the owner of the supplied parameter pointer and will delete it upon dest...
const std::string & get_name() const
Returns the name of this field, or empty string if the field is unnamed.
std::string get_description() const
Returns a brief decription of the typedef, useful for human consumption.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the most fundamental kind of parameter type: a single number or string, one of the DCSubatomi...
void set_typedef(const DCTypedef *dtypedef)
Records the DCTypedef object that generated this parameter.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
DCParameter * make_new_parameter() const
Returns a newly-allocated DCParameter object that uses the same type as that named by the typedef.
virtual void set_name(const std::string &name)
Sets the name of this field.
Represents the type specification for a single parameter within a field specification.
bool is_implicit_typedef() const
Returns true if the typedef has been flagged as an implicit typedef, meaning it was created for a DCC...
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
bool is_bogus_typedef() const
Returns true if the typedef has been flagged as a bogus typedef.
const std::string & get_name() const
Returns the name of 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>.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.