Panda3D
Loading...
Searching...
No Matches
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.
 
void generate_hash (HashGenerator &hashgen) const
 Accumulates the properties of this keyword into the hash.
 
int get_historical_flag () const
 Returns the bitmask associated with this keyword, if any.
 
const std::string & get_name () const
 Returns the name of this keyword.
 
virtual void output (std::ostream &out, bool brief) const
 Write a string representation of this instance to <out>.
 
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>.
 
void write (std::ostream &out, int indent_level) const
 Write a string representation of this instance to <out>.
 

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.

Constructor & Destructor Documentation

◆ DCKeyword()

DCKeyword::DCKeyword ( const std::string & name,
int historical_flag = ~0 )

Definition at line 21 of file dcKeyword.cxx.

◆ ~DCKeyword()

DCKeyword::~DCKeyword ( )
virtual

Definition at line 31 of file dcKeyword.cxx.

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 58 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 83 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 49 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 38 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 66 of file dcKeyword.cxx.

◆ write()

void DCKeyword::write ( std::ostream & out,
bool brief,
int indent_level ) const
virtual

Implements DCDeclaration.

Definition at line 74 of file dcKeyword.cxx.


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