Namable

class Namable

Bases: MemoryBase

A base class for all things which can have a name. The name is either empty or nonempty, but it is never NULL.

Inheritance diagram

Inheritance diagram of Namable

explicit Namable(std::string const &initial_name = "")
Namable(Namable const&) = default
void clear_name(void)

Resets the Namable’s name to empty.

static TypeHandle get_class_type(void)
std::string const &get_name(void) const
bool has_name(void) const

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

void output(std::ostream &out) const

In the absence of any definition to the contrary, outputting a Namable will write out its name.

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

void set_name(std::string const &name)