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

This represents a single keyword declaration in the dc file. More...

#include "dcKeyword.h"

Inheritance diagram for DCKeyword:
DCDeclaration

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 DCClassas_class ()
 
virtual const DCClassas_class () const
 
virtual DCSwitchas_switch ()
 
virtual const DCSwitchas_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...
 

Detailed Description

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.

Member Function Documentation

◆ clear_historical_flag()

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.

◆ generate_hash()

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

◆ get_historical_flag()

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

◆ get_name()

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

◆ output()

void DCKeyword::output ( std::ostream &  out,
bool  brief 
) const
virtual

Write a string representation of this instance to <out>.

Implements DCDeclaration.

Definition at line 67 of file dcKeyword.cxx.


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