14#ifndef DCKEYWORDLIST_H
15#define DCKEYWORDLIST_H
26class EXPCL_DIRECT_DCPARSER DCKeywordList {
29 DCKeywordList(
const DCKeywordList ©);
30 void operator = (
const DCKeywordList ©);
48 void output_keywords(std::ostream &out)
const;
52 typedef pvector<const DCKeyword *> Keywords;
55 typedef pmap<std::string, const DCKeyword *> KeywordsByName;
56 KeywordsByName _keywords_by_name;
void copy_keywords(const DCKeywordList &other)
Replaces this keyword list with those from the other list.
void clear_keywords()
Removes all keywords from the field.
bool add_keyword(const DCKeyword *keyword)
Adds the indicated keyword to the list.
const DCKeyword * get_keyword(int n) const
Returns the nth keyword in the list.
void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of these keywords into the hash.
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.
bool has_keyword(const std::string &name) const
Returns true if this list includes the indicated keyword, false otherwise.
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 w...
int get_num_keywords() const
Returns the number of keywords in the list.
This represents a single keyword declaration in the dc file.
This class generates an arbitrary hash number from a sequence of ints.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.