Panda3D

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

## Public Member Functions
| InternalNameCollection (const InternalNameCollection &copy)
void | add_name (const InternalName *name)
| Adds a new InternalName to the collection.
void | add_names_from (const InternalNameCollection &other)
| Adds all the InternalNames indicated in the other collection to this name.
void | clear ()
| Removes all InternalNames from the collection.
const InternalName * | get_name (int index) const
int | get_num_names () const
bool | has_name (const InternalName *name) const
| Returns true if the indicated InternalName appears in this collection, false otherwise.
InternalNameCollection | operator+ (const InternalNameCollection &other) const
| Returns a InternalNameCollection representing the concatenation of the two lists.
void | operator+= (const InternalNameCollection &other)
| Appends the other list onto the end of this one.
void | operator= (const InternalNameCollection &copy)
const InternalName * | operator[] (int index) const
| Returns the nth InternalName in the collection.
void | output (std::ostream &out) const
| Writes a brief one-line description of the InternalNameCollection to the indicated output stream.
void | remove_duplicate_names ()
| Removes any duplicate entries of the same InternalNames on this collection.
bool | remove_name (const InternalName *name)
| Removes the indicated InternalName from the collection.
void | remove_names_from (const InternalNameCollection &other)
| Removes from this collection all of the InternalNames listed in the other collection.
int | size () const
| Returns the number of names in the collection.
void | write (std::ostream &out, int indent_level=0) const
| Writes a complete multi-line description of the InternalNameCollection to the indicated output stream.

## Public Attributes
| get_name
| Returns the nth InternalName in the collection.
| get_num_names
| Returns the number of InternalNames in the collection.

## Detailed Description

Definition at line 24 of file internalNameCollection.h.

## Constructor & Destructor Documentation

## ◆ InternalNameCollection() [1/2]

InternalNameCollection::InternalNameCollection | ( |  | ) |

Definition at line 21 of file internalNameCollection.cxx.

## ◆ InternalNameCollection() [2/2]

InternalNameCollection::InternalNameCollection | ( | const InternalNameCollection & | copy | ) |

Definition at line 28 of file internalNameCollection.cxx.

## ◆ ~InternalNameCollection()

InternalNameCollection::~InternalNameCollection | ( |  | ) |
| inline

Definition at line 17 of file internalNameCollection.I.

## Member Function Documentation

## ◆ add_name()

void InternalNameCollection::add_name | ( | const InternalName * | name | ) |

Adds a new InternalName to the collection.

Definition at line 45 of file internalNameCollection.cxx.

Referenced by add_names_from(), NodePath::find_all_texcoords(), NodePath::find_all_texcoords(), NodePath::find_all_vertex_columns(), and NodePath::find_all_vertex_columns().

## ◆ add_names_from()

void InternalNameCollection::add_names_from | ( | const InternalNameCollection & | other | ) |

Adds all the InternalNames indicated in the other collection to this name.

The other names are simply appended to the end of the names in this list; duplicates are not automatically removed.

Definition at line 97 of file internalNameCollection.cxx.

References add_name(), get_name, and get_num_names.

Referenced by operator+=().

## ◆ clear()

void InternalNameCollection::clear | ( |  | ) |

Removes all InternalNames from the collection.

Definition at line 166 of file internalNameCollection.cxx.

## ◆ has_name()

bool InternalNameCollection::has_name | ( | const InternalName * | name | ) | const

Returns true if the indicated InternalName appears in this collection, false otherwise.

Definition at line 153 of file internalNameCollection.cxx.

References get_name, and get_num_names.

Referenced by remove_names_from().

## ◆ operator+()

InternalNameCollection InternalNameCollection::operator+ | ( | const InternalNameCollection & | other | ) | const
| inline

Returns a InternalNameCollection representing the concatenation of the two lists.

Definition at line 33 of file internalNameCollection.I.

## ◆ operator+=()

void InternalNameCollection::operator+= | ( | const InternalNameCollection & | other | ) |
| inline

Appends the other list onto the end of this one.

Definition at line 24 of file internalNameCollection.I.

References add_names_from().

## ◆ operator=()

void InternalNameCollection::operator= | ( | const InternalNameCollection & | copy | ) |

Definition at line 37 of file internalNameCollection.cxx.

## ◆ operator[]()

const InternalName * InternalNameCollection::operator[] | ( | int | index | ) | const

Returns the nth InternalName in the collection.

This is the same as get_name(), but it may be a more convenient way to access it.

Definition at line 193 of file internalNameCollection.cxx.

## ◆ output()

void InternalNameCollection::output | ( | std::ostream & | out | ) | const

Writes a brief one-line description of the InternalNameCollection to the indicated output stream.

Definition at line 213 of file internalNameCollection.cxx.

References get_num_names.

## ◆ remove_duplicate_names()

void InternalNameCollection::remove_duplicate_names | ( |  | ) |

Removes any duplicate entries of the same InternalNames on this collection.

If a InternalName appears multiple times, the first appearance is retained; subsequent appearances are removed.

Definition at line 128 of file internalNameCollection.cxx.

References get_name, and get_num_names.

## ◆ remove_name()

bool InternalNameCollection::remove_name | ( | const InternalName * | name | ) |

Removes the indicated InternalName from the collection.

Returns true if the name was removed, false if it was not a member of the collection.

Definition at line 64 of file internalNameCollection.cxx.

## ◆ remove_names_from()

void InternalNameCollection::remove_names_from | ( | const InternalNameCollection & | other | ) |

Removes from this collection all of the InternalNames listed in the other collection.

Definition at line 110 of file internalNameCollection.cxx.

References get_name, get_num_names, and has_name().

## ◆ size()

int InternalNameCollection::size | ( |  | ) | const

Returns the number of names in the collection.

This is the same thing as get_num_names().

Definition at line 204 of file internalNameCollection.cxx.

## ◆ write()

void InternalNameCollection::write | ( | std::ostream & | out,
|  | int | indent_level = 0 ) const

Writes a complete multi-line description of the InternalNameCollection to the indicated output stream.

Definition at line 226 of file internalNameCollection.cxx.

References get_name, get_num_names, and indent().

## Member Data Documentation

## ◆ get_name

const InternalName * InternalNameCollection::get_name

Returns the nth InternalName in the collection.

Definition at line 41 of file internalNameCollection.h.

Referenced by add_names_from(), has_name(), remove_duplicate_names(), remove_names_from(), and write().

## ◆ get_num_names

int InternalNameCollection::get_num_names

Returns the number of InternalNames in the collection.

Definition at line 41 of file internalNameCollection.h.

Referenced by add_names_from(), has_name(), output(), remove_duplicate_names(), remove_names_from(), and write().

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

- panda/src/pgraph/internalNameCollection.h
- panda/src/pgraph/internalNameCollection.cxx
- panda/src/pgraph/internalNameCollection.I