15 #include "dcKeyword.h" 16 #include "hashGenerator.h" 25 DCKeyword(
const string &name,
int historical_flag) :
27 _historical_flag(historical_flag)
62 return _historical_flag;
73 _historical_flag = ~0;
83 output(ostream &out,
bool brief)
const {
84 out <<
"keyword " << _name;
93 write(ostream &out,
bool,
int indent_level)
const {
94 indent(out, indent_level)
95 <<
"keyword " << _name <<
";\n";
void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of this keyword into the hash.
void add_string(const string &str)
Adds a string to the hash, by breaking it down into a sequence of integers.
virtual void output(ostream &out, bool brief) const
Write a string representation of this instance to <out>.
This class generates an arbitrary hash number from a sequence of ints.
void clear_historical_flag()
Resets the historical flag to ~0, as if the keyword were not one of the historically defined keywords...
const string & get_name() const
Returns the name of this keyword.
int get_historical_flag() const
Returns the bitmask associated with this keyword, if any.