Panda3D
|
This represents a single keyword declaration in the dc file. More...
#include "dcKeyword.h"
Public Member Functions | |
DCKeyword (const string &name, int historical_flag=~0) | |
void | clear_historical_flag () |
Resets the historical flag to ~0, as if the keyword were not one of the historically defined keywords. | |
void | generate_hash (HashGenerator &hashgen) const |
Accumulates the properties of this keyword into the hash. | |
int | get_historical_flag () const |
Returns the bitmask associated with this keyword, if any. | |
const string & | get_name () const |
Returns the name of this keyword. | |
virtual void | output (ostream &out, bool brief) const |
Write a string representation of this instance to <out>. | |
virtual void | write (ostream &out, bool brief, int indent_level) const |
This represents a single keyword declaration in the dc file.
It is used to define a communication property associated with a field, for instance "broadcast" or "airecv".
Definition at line 31 of file dcKeyword.h.
void DCKeyword::clear_historical_flag | ( | ) |
Resets the historical flag to ~0, as if the keyword were not one of the historically defined keywords.
Definition at line 72 of file dcKeyword.cxx.
void DCKeyword::generate_hash | ( | HashGenerator & | hashgen | ) | const |
Accumulates the properties of this keyword into the hash.
Definition at line 105 of file dcKeyword.cxx.
References HashGenerator::add_string().
int DCKeyword::get_historical_flag | ( | ) | const |
Returns the bitmask associated with this keyword, if any.
This is the value that was historically associated with this keyword, and was used to generate a hash code before we had user-customizable keywords. It will return ~0 if this is not an historical keyword.
Definition at line 61 of file dcKeyword.cxx.
Referenced by DCKeywordList::add_keyword().
const string & DCKeyword::get_name | ( | ) | const |
Returns the name of this keyword.
Definition at line 46 of file dcKeyword.cxx.
Referenced by DCKeywordList::add_keyword(), and DCKeywordList::has_keyword().
void DCKeyword::output | ( | ostream & | out, |
bool | brief | ||
) | const [virtual] |
Write a string representation of this instance to <out>.
Implements DCDeclaration.
Definition at line 83 of file dcKeyword.cxx.