This is a list of keywords (see DCKeyword) that may be set on a particular field. More...
#include "dcKeywordList.h"
Public Member Functions | |
DCKeywordList (const DCKeywordList ©) | |
bool | add_keyword (const DCKeyword *keyword) |
Adds the indicated keyword to the list. More... | |
void | clear_keywords () |
Removes all keywords from the field. More... | |
bool | compare_keywords (const DCKeywordList &other) const |
Returns true if this list has the same keywords as the other list, false if some keywords differ. More... | |
void | copy_keywords (const DCKeywordList &other) |
Replaces this keyword list with those from the other list. More... | |
void | generate_hash (HashGenerator &hashgen) const |
Accumulates the properties of these keywords into the hash. More... | |
const DCKeyword * | get_keyword (int n) const |
Returns the nth keyword in the list. More... | |
const DCKeyword * | get_keyword_by_name (const std::string &name) const |
Returns the keyword in the list with the indicated name, or NULL if there is no keyword in the list with that name. More... | |
int | get_num_keywords () const |
Returns the number of keywords in the list. More... | |
bool | has_keyword (const std::string &name) const |
Returns true if this list includes the indicated keyword, false otherwise. More... | |
bool | has_keyword (const DCKeyword *keyword) const |
Returns true if this list includes the indicated keyword, false otherwise. More... | |
void | operator= (const DCKeywordList ©) |
void | output_keywords (std::ostream &out) const |
This is a list of keywords (see DCKeyword) that may be set on a particular field.
Definition at line 26 of file dcKeywordList.h.
bool DCKeywordList::add_keyword | ( | const DCKeyword * | keyword | ) |
Adds the indicated keyword to the list.
Returns true if it is added, false if it was already there.
Definition at line 127 of file dcKeywordList.cxx.
References DCKeyword::get_historical_flag(), and DCKeyword::get_name().
Referenced by DCFile::add_keyword().
void DCKeywordList::clear_keywords | ( | ) |
Removes all keywords from the field.
Definition at line 141 of file dcKeywordList.cxx.
Referenced by DCFile::clear().
bool DCKeywordList::compare_keywords | ( | const DCKeywordList & | other | ) | const |
Returns true if this list has the same keywords as the other list, false if some keywords differ.
Order is not considered important.
Definition at line 110 of file dcKeywordList.cxx.
void DCKeywordList::copy_keywords | ( | const DCKeywordList & | other | ) |
Replaces this keyword list with those from the other list.
Definition at line 118 of file dcKeywordList.cxx.
Referenced by DCMolecularField::add_atomic().
void DCKeywordList::generate_hash | ( | HashGenerator & | hashgen | ) | const |
Accumulates the properties of these keywords into the hash.
Definition at line 162 of file dcKeywordList.cxx.
References HashGenerator::add_int().
Referenced by DCAtomicField::generate_hash(), and DCParameter::generate_hash().
const DCKeyword * DCKeywordList::get_keyword | ( | int | n | ) | const |
Returns the nth keyword in the list.
Definition at line 85 of file dcKeywordList.cxx.
Referenced by DCFile::get_keyword().
const DCKeyword * DCKeywordList::get_keyword_by_name | ( | const std::string & | name | ) | const |
Returns the keyword in the list with the indicated name, or NULL if there is no keyword in the list with that name.
Definition at line 95 of file dcKeywordList.cxx.
Referenced by DCFile::get_keyword_by_name().
int DCKeywordList::get_num_keywords | ( | ) | const |
Returns the number of keywords in the list.
Definition at line 76 of file dcKeywordList.cxx.
Referenced by DCParameter::generate_hash(), and DCFile::get_num_keywords().
bool DCKeywordList::has_keyword | ( | const std::string & | name | ) | const |
Returns true if this list includes the indicated keyword, false otherwise.
Definition at line 60 of file dcKeywordList.cxx.
Referenced by has_keyword(), DCField::is_airecv(), DCField::is_broadcast(), DCField::is_clrecv(), DCField::is_clsend(), DCField::is_db(), DCField::is_ownrecv(), DCField::is_ownsend(), DCField::is_ram(), and DCField::is_required().
bool DCKeywordList::has_keyword | ( | const DCKeyword * | keyword | ) | const |
Returns true if this list includes the indicated keyword, false otherwise.
Definition at line 68 of file dcKeywordList.cxx.
References DCKeyword::get_name(), and has_keyword().