Panda3D
Public Member Functions | List of all members
DCKeywordList Class Reference

This is a list of keywords (see DCKeyword) that may be set on a particular field. More...

#include "dcKeywordList.h"

Inheritance diagram for DCKeywordList:
DCField DCAtomicField DCMolecularField DCParameter DCArrayParameter DCClassParameter DCSimpleParameter DCSwitchParameter

Public Member Functions

 DCKeywordList (const DCKeywordList &copy)
 
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 DCKeywordget_keyword (int n) const
 Returns the nth keyword in the list. More...
 
const DCKeywordget_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 &copy)
 
void output_keywords (std::ostream &out) const
 

Detailed Description

This is a list of keywords (see DCKeyword) that may be set on a particular field.

Definition at line 26 of file dcKeywordList.h.

Member Function Documentation

◆ add_keyword()

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().

◆ clear_keywords()

void DCKeywordList::clear_keywords ( )

Removes all keywords from the field.

Definition at line 141 of file dcKeywordList.cxx.

Referenced by DCFile::clear().

◆ compare_keywords()

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.

◆ copy_keywords()

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().

◆ generate_hash()

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().

◆ get_keyword()

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().

◆ get_keyword_by_name()

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().

◆ get_num_keywords()

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().

◆ has_keyword() [1/2]

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().

◆ has_keyword() [2/2]

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().


The documentation for this class was generated from the following files: