15 #include "dcTypedef.h" 16 #include "dcParameter.h" 17 #include "dcSimpleParameter.h" 29 _parameter(parameter),
30 _bogus_typedef(false),
31 _implicit_typedef(implicit),
45 _implicit_typedef(false),
92 _parameter->output(strm,
true);
107 return _bogus_typedef;
119 return _implicit_typedef;
130 DCParameter *new_parameter = _parameter->make_copy();
133 return new_parameter;
157 _parameter->output(out,
false);
166 write(ostream &out,
bool brief,
int indent_level)
const {
167 indent(out, indent_level)
172 _parameter->output(out,
false);
176 out <<
" // typedef " << _number;
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...
string get_description() const
Returns a brief decription of the typedef, useful for human consumption.
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.
const string & get_name() const
Returns the name of this field, or empty string if the field is unnamed.
DCParameter * make_new_parameter() const
Returns a newly-allocated DCParameter object that uses the same type as that named by the typedef...
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...
bool is_bogus_typedef() const
Returns true if the typedef has been flagged as a bogus typedef.
const 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 set_name(const string &name)
Sets the name of this field.
virtual void output(ostream &out, bool brief) const
Write a string representation of this instance to <out>.