22 DCKeyword(
const std::string &name,
int historical_flag) :
24 _historical_flag(historical_flag)
51 return _historical_flag;
60 _historical_flag = ~0;
67 output(std::ostream &out,
bool brief)
const {
68 out <<
"keyword " << _name;
75 write(std::ostream &out,
bool,
int indent_level)
const {
77 <<
"keyword " << _name <<
";\n";
void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of this keyword into the hash.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void add_string(const std::string &str)
Adds a string to the hash, by breaking it down into a sequence of integers.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
const std::string & get_name() const
Returns the name of this keyword.
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.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
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...
int get_historical_flag() const
Returns the bitmask associated with this keyword, if any.