This represents a single keyword declaration in the dc file. More...
#include "dcKeyword.h"
Public Member Functions | |
DCKeyword (const std::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. More... | |
void | generate_hash (HashGenerator &hashgen) const |
Accumulates the properties of this keyword into the hash. More... | |
int | get_historical_flag () const |
Returns the bitmask associated with this keyword, if any. More... | |
const std::string & | get_name () const |
Returns the name of this keyword. More... | |
virtual void | output (std::ostream &out, bool brief) const |
Write a string representation of this instance to <out>. More... | |
virtual void | write (std::ostream &out, bool brief, int indent_level) const |
Public Member Functions inherited from DCDeclaration | |
virtual DCClass * | as_class () |
virtual const DCClass * | as_class () const |
virtual DCSwitch * | as_switch () |
virtual const DCSwitch * | as_switch () const |
virtual void | output (std::ostream &out) const |
Write a string representation of this instance to <out>. More... | |
void | write (std::ostream &out, int indent_level) const |
Write a string representation of this instance to <out>. More... | |
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 28 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 59 of file dcKeyword.cxx.
void DCKeyword::generate_hash | ( | HashGenerator & | hashgen | ) | const |
Accumulates the properties of this keyword into the hash.
Definition at line 84 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 50 of file dcKeyword.cxx.
Referenced by DCKeywordList::add_keyword().
const std::string & DCKeyword::get_name | ( | ) | const |
Returns the name of this keyword.
Definition at line 39 of file dcKeyword.cxx.
Referenced by DCKeywordList::add_keyword(), and DCKeywordList::has_keyword().
|
virtual |
Write a string representation of this instance to <out>.
Implements DCDeclaration.
Definition at line 67 of file dcKeyword.cxx.