Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Namable Class Reference

A base class for all things which can have a name. More...

`#include "namable.h"`

Inheritance diagram for Namable:

## Public Member Functions
| Namable (const std::string &initial_name="")
void | clear_name ()
| Resets the Namable's name to empty.
const std::string & | get_name () const
bool | has_name () const
| Returns true if the Namable has a nonempty name set, false if the name is empty.
void | output (std::ostream &out) const
| Outputs the Namable.
void | set_name (const std::string &name)
Public Member Functions inherited from MemoryBase
void | operator delete (void *, void *)
void | operator delete (void *ptr)
void | operator delete[] (void *, void *)
void | operator delete[] (void *ptr)
void * | operator new (size_t size)
void * | operator new (size_t size, void *ptr)
void * | operator new[] (size_t size)
void * | operator new[] (size_t size, void *ptr)

## Static Public Member Functions
static TypeHandle | get_class_type ()
static void | init_type ()

## Public Attributes
| get_name
| set_name

## Detailed Description

A base class for all things which can have a name.

The name is either empty or nonempty, but it is never NULL.

Definition at line 26 of file namable.h.

## Constructor & Destructor Documentation

## ◆ Namable()

Namable::Namable | ( | const std::string & | initial_name = "" | ) |
| inline explicit

Definition at line 17 of file namable.I.

## Member Function Documentation

## ◆ clear_name()

void Namable::clear_name | ( |  | ) |
| inline

Resets the Namable's name to empty.

Definition at line 34 of file namable.I.

## ◆ get_class_type()

static TypeHandle Namable::get_class_type | ( |  | ) |
| inline static

Definition at line 44 of file namable.h.

## ◆ has_name()

bool Namable::has_name | ( |  | ) | const
| inline

Returns true if the Namable has a nonempty name set, false if the name is empty.

Definition at line 43 of file namable.I.

Referenced by XFileNode::add_child(), EggComponentData::add_name(), EggGroupUniquifier::get_category(), EggXfmSAnim::optimize(), NodePathComponent::output(), EggSAnimData::write(), ParametricCurve::write_egg(), ParametricCurveCollection::write_egg(), EggNamedObject::write_header(), XFileDataDef::write_text(), and XFileDataNodeTemplate::write_text().

## ◆ init_type()

static void Namable::init_type | ( |  | ) |
| inline static

Definition at line 47 of file namable.h.

## ◆ output()

void Namable::output | ( | std::ostream & | out | ) | const
| inline

Outputs the Namable.

This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.

Definition at line 60 of file namable.I.

## Member Data Documentation

## ◆ get_name

const std::string & Namable::get_name
| inline

Definition at line 34 of file namable.h.

## ◆ set_name

void Namable::set_name
| inline

Definition at line 34 of file namable.h.

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

- panda/src/express/namable.h
- panda/src/express/namable.cxx
- panda/src/express/namable.I