Panda3D
|
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. | |
void | clear_keywords () |
Removes all keywords from the field. | |
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. | |
void | copy_keywords (const DCKeywordList &other) |
Replaces this keyword list with those from the other list. | |
void | generate_hash (HashGenerator &hashgen) const |
Accumulates the properties of these keywords into the hash. | |
const DCKeyword * | get_keyword (int n) const |
Returns the nth keyword in the list. | |
const DCKeyword * | get_keyword_by_name (const 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. | |
int | get_num_keywords () const |
Returns the number of keywords in the list. | |
bool | has_keyword (const string &name) const |
Returns true if this list includes the indicated keyword, false otherwise. | |
bool | has_keyword (const DCKeyword *keyword) const |
Returns true if this list includes the indicated keyword, false otherwise. | |
void | operator= (const DCKeywordList ©) |
void | output_keywords (ostream &out) const |
This is a list of keywords (see DCKeyword) that may be set on a particular field.
Definition at line 28 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 157 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 173 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 135 of file dcKeywordList.cxx.
void DCKeywordList::copy_keywords | ( | const DCKeywordList & | other | ) |
Replaces this keyword list with those from the other list.
Definition at line 146 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.
Reimplemented in DCArrayParameter, DCAtomicField, DCClassParameter, DCField, DCMolecularField, DCParameter, DCSimpleParameter, and DCSwitchParameter.
Definition at line 199 of file dcKeywordList.cxx.
References HashGenerator::add_int().
const DCKeyword * DCKeywordList::get_keyword | ( | int | n | ) | const |
Returns the nth keyword in the list.
Definition at line 104 of file dcKeywordList.cxx.
Referenced by DCFile::get_keyword().
const DCKeyword * DCKeywordList::get_keyword_by_name | ( | const 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 117 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 93 of file dcKeywordList.cxx.
Referenced by DCParameter::generate_hash(), and DCFile::get_num_keywords().
bool DCKeywordList::has_keyword | ( | const DCKeyword * | keyword | ) | const |
Returns true if this list includes the indicated keyword, false otherwise.
Definition at line 83 of file dcKeywordList.cxx.
References DCKeyword::get_name(), and has_keyword().
bool DCKeywordList::has_keyword | ( | const string & | name | ) | const |
Returns true if this list includes the indicated keyword, false otherwise.
Definition at line 72 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().