Panda3D

Loading...
Searching...
No Matches
Public Member Functions | List of all members
DCDeclaration Class Referenceabstract

This is a common interface for a declaration in a DC file. More...

`#include "dcDeclaration.h"`

Inheritance diagram for DCDeclaration:

## Public Member Functions
virtual DCClass * | as_class ()
virtual const DCClass * | as_class () const
virtual DCSwitch * | as_switch ()
virtual const DCSwitch * | as_switch () const
virtual void | output (std::ostream &out) const
| Write a string representation of this instance to <out>.
virtual void | output (std::ostream &out, bool brief) const =0
virtual void | write (std::ostream &out, bool brief, int indent_level) const =0
void | write (std::ostream &out, int indent_level) const
| Write a string representation of this instance to <out>.

## Detailed Description

This is a common interface for a declaration in a DC file.

Currently, this is either a class or a typedef declaration (import declarations are still collected together at the top, and don't inherit from this object). Its only purpose is so that classes and typedefs can be stored in one list together so they can be ordered correctly on output.

Definition at line 29 of file dcDeclaration.h.

## Constructor & Destructor Documentation

## ◆ ~DCDeclaration()

DCDeclaration::~DCDeclaration | ( |  | ) |
| virtual

Definition at line 20 of file dcDeclaration.cxx.

## Member Function Documentation

## ◆ as_class() [1/2]

DCClass * DCDeclaration::as_class | ( |  | ) |
| virtual

Definition at line 27 of file dcDeclaration.cxx.

## ◆ as_class() [2/2]

const DCClass * DCDeclaration::as_class | ( |  | ) | const
| virtual

Definition at line 35 of file dcDeclaration.cxx.

## ◆ as_switch() [1/2]

DCSwitch * DCDeclaration::as_switch | ( |  | ) |
| virtual

Definition at line 43 of file dcDeclaration.cxx.

## ◆ as_switch() [2/2]

const DCSwitch * DCDeclaration::as_switch | ( |  | ) | const
| virtual

Definition at line 51 of file dcDeclaration.cxx.

## ◆ output() [1/2]

void DCDeclaration::output | ( | std::ostream & | out | ) | const
| virtual

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

Reimplemented in DCClass.

Definition at line 59 of file dcDeclaration.cxx.

References output().

Referenced by output().

## ◆ output() [2/2]

virtual void DCDeclaration::output | ( | std::ostream & | out,
|  | bool | brief ) const
| pure virtual

Implemented in DCClass, DCKeyword, DCSwitch, and DCTypedef.

## ◆ write() [1/2]

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

Implemented in DCClass, and DCSwitch.

## ◆ write() [2/2]

void DCDeclaration::write | ( | std::ostream & | out,
|  | int | indent_level ) const

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

Definition at line 67 of file dcDeclaration.cxx.

References write().

Referenced by write().

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

- direct/src/dcparser/dcDeclaration.h
- direct/src/dcparser/dcDeclaration.cxx