#include <nodePathCollection.h>
Public Member Functions | |
NodePathCollection () | |
NodePathCollection (const NodePathCollection ©) | |
void | operator= (const NodePathCollection ©) |
~NodePathCollection () | |
void | add_path (const NodePath &node_path) |
Adds a new NodePath to the collection. | |
bool | remove_path (const NodePath &node_path) |
Removes the indicated NodePath from the collection. | |
void | add_paths_from (const NodePathCollection &other) |
Adds all the NodePaths indicated in the other collection to this path. | |
void | remove_paths_from (const NodePathCollection &other) |
Removes from this collection all of the NodePaths listed in the other collection. | |
void | remove_duplicate_paths () |
Removes any duplicate entries of the same NodePaths on this collection. | |
bool | has_path (const NodePath &path) const |
Returns true if the indicated NodePath appears in this collection, false otherwise. | |
void | clear () |
Removes all NodePaths from the collection. | |
bool | is_empty () const |
Returns true if there are no NodePaths in the collection, false otherwise. | |
int | get_num_paths () const |
Returns the number of NodePaths in the collection. | |
NodePath | get_path (int index) const |
Returns the nth NodePath in the collection. | |
NodePath | operator[] (int index) const |
Returns the nth NodePath in the collection. | |
void | ls () const |
Lists all the nodes at and below each node in the collection hierarchically. | |
void | ls (ostream &out, int indent_level=0) const |
Lists all the nodes at and below each node in the collection hierarchically. | |
NodePathCollection | find_all_matches (const string &path) const |
Returns the complete set of all NodePaths that begin with any NodePath in this collection and can be extended by path. | |
void | reparent_to (const NodePath &other) |
Reparents all the NodePaths in the collection to the indicated node. | |
void | wrt_reparent_to (const NodePath &other) |
Reparents all the NodePaths in the collection to the indicated node, adjusting each transform so as not to move in world coordinates. | |
void | show () |
Shows all NodePaths in the collection. | |
void | hide () |
Hides all NodePaths in the collection. | |
void | stash () |
Stashes all NodePaths in the collection. | |
void | unstash () |
Unstashes all NodePaths in the collection. | |
void | output (ostream &out) const |
Writes a brief one-line description of the NodePathCollection to the indicated output stream. | |
void | write (ostream &out, int indent_level=0) const |
Writes a complete multi-line description of the NodePathCollection to the indicated output stream. | |
Private Types | |
typedef PointerToArray< NodePath > | NodePaths |
Private Attributes | |
NodePaths | _node_paths |
It's handy for returning from functions that need to return multiple NodePaths (for instance, NodePaths::get_children).
Definition at line 42 of file nodePathCollection.h.
|
Definition at line 79 of file nodePathCollection.h. |
|
Definition at line 36 of file nodePathCollection.cxx. |
|
Definition at line 47 of file nodePathCollection.cxx. References _node_paths. |
|
Definition at line 31 of file nodePathCollection.I. |
|
Adds a new NodePath to the collection.
Definition at line 73 of file nodePathCollection.cxx. References _node_paths. Referenced by FindApproxLevelEntry::consider_node(), and NodePath::get_top_node(). |
|
Adds all the NodePaths indicated in the other collection to this path. The other paths are simply appended to the end of the paths in this list; duplicates are not automatically removed. Definition at line 144 of file nodePathCollection.cxx. |
|
Removes all NodePaths from the collection.
Definition at line 239 of file nodePathCollection.cxx. References _node_paths, nassertr, and PointerToArray< NodePath >::size(). |
|
Returns the complete set of all NodePaths that begin with any NodePath in this collection and can be extended by path. The shortest paths will be listed first. Definition at line 340 of file nodePathCollection.cxx. |
|
Returns the number of NodePaths in the collection.
Definition at line 267 of file nodePathCollection.cxx. References FindApproxPath::add_string(), and path. Referenced by FindApproxLevelEntry::consider_node(), get_path(), is_empty(), operator[](), reparent_to(), and wrt_reparent_to(). |
|
Returns the nth NodePath in the collection.
Definition at line 280 of file nodePathCollection.cxx. References FindApproxLevel::add_entry(), NodePath::get_max_search_depth(), get_num_paths(), and NodePath::r_find_matches(). Referenced by NodePath::get_children(), is_empty(), operator[](), remove_paths_from(), and wrt_reparent_to(). |
|
Returns true if the indicated NodePath appears in this collection, false otherwise.
Definition at line 221 of file nodePathCollection.cxx. References _node_paths. |
|
Hides all NodePaths in the collection.
Definition at line 419 of file nodePathCollection.cxx. |
|
Returns true if there are no NodePaths in the collection, false otherwise.
Definition at line 254 of file nodePathCollection.cxx. References get_num_paths(), get_path(), indent(), and path. Referenced by NodePath::get_children(). |
|
Lists all the nodes at and below each node in the collection hierarchically.
Definition at line 316 of file nodePathCollection.cxx. |
|
Lists all the nodes at and below each node in the collection hierarchically.
Definition at line 45 of file nodePathCollection.I. Referenced by ~NodePathCollection(). |
|
Definition at line 60 of file nodePathCollection.cxx. References _node_paths, PointerToArray< NodePath >::get_ref_count(), and PointerToArray< NodePath >::v(). |
|
Returns the nth NodePath in the collection. This is the same as get_path(), but it may be a more convenient way to access it. Definition at line 299 of file nodePathCollection.cxx. References get_num_paths(), get_path(), and NodePath::reparent_to(). |
|
Writes a brief one-line description of the NodePathCollection to the indicated output stream.
Definition at line 466 of file nodePathCollection.cxx. |
|
Removes any duplicate entries of the same NodePaths on this collection. If a NodePath appears multiple times, the first appearance is retained; subsequent appearances are removed. Definition at line 190 of file nodePathCollection.cxx. |
|
Removes the indicated NodePath from the collection. Returns true if the path was removed, false if it was not a member of the collection. Definition at line 101 of file nodePathCollection.cxx. References _node_paths, and PointerToArray< NodePath >::v(). |
|
Removes from this collection all of the NodePaths listed in the other collection.
Definition at line 163 of file nodePathCollection.cxx. References get_path(), and path. |
|
Reparents all the NodePaths in the collection to the indicated node.
Definition at line 370 of file nodePathCollection.cxx. References get_num_paths(). |
|
Shows all NodePaths in the collection.
Definition at line 404 of file nodePathCollection.cxx. |
|
Stashes all NodePaths in the collection.
Definition at line 434 of file nodePathCollection.cxx. |
|
Unstashes all NodePaths in the collection.
Definition at line 449 of file nodePathCollection.cxx. |
|
Writes a complete multi-line description of the NodePathCollection to the indicated output stream.
Definition at line 485 of file nodePathCollection.cxx. |
|
Reparents all the NodePaths in the collection to the indicated node, adjusting each transform so as not to move in world coordinates.
Definition at line 389 of file nodePathCollection.cxx. References get_num_paths(), get_path(), and indent(). |
|
Definition at line 80 of file nodePathCollection.h. Referenced by add_path(), clear(), has_path(), NodePathCollection(), operator=(), and remove_path(). |