00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef NODEPATHCOLLECTION_H
00020 #define NODEPATHCOLLECTION_H
00021
00022 #include "pandabase.h"
00023 #include "nodePath.h"
00024 #include "pointerToArray.h"
00025
00026
00027
00028
00029
00030
00031
00032
00033 class EXPCL_PANDA NodePathCollection {
00034 PUBLISHED:
00035 NodePathCollection();
00036 NodePathCollection(const NodePathCollection ©);
00037 void operator = (const NodePathCollection ©);
00038 INLINE ~NodePathCollection();
00039
00040 void add_path(const NodePath &node_path);
00041 bool remove_path(const NodePath &node_path);
00042 void add_paths_from(const NodePathCollection &other);
00043 void remove_paths_from(const NodePathCollection &other);
00044 void remove_duplicate_paths();
00045 bool has_path(const NodePath &path) const;
00046 void clear();
00047
00048 bool is_empty() const;
00049 int get_num_paths() const;
00050 NodePath get_path(int index) const;
00051 NodePath operator [] (int index) const;
00052
00053
00054 INLINE void ls() const;
00055 void ls(ostream &out, int indent_level = 0) const;
00056
00057 NodePathCollection find_all_matches(const string &path) const;
00058 void reparent_to(const NodePath &other);
00059 void wrt_reparent_to(const NodePath &other);
00060
00061 void show();
00062 void hide();
00063 void stash();
00064 void unstash();
00065
00066 void output(ostream &out) const;
00067 void write(ostream &out, int indent_level = 0) const;
00068
00069 private:
00070 typedef PTA(NodePath) NodePaths;
00071 NodePaths _node_paths;
00072 };
00073
00074 INLINE ostream &operator << (ostream &out, const NodePathCollection &col) {
00075 col.output(out);
00076 return out;
00077 }
00078
00079 #include "nodePathCollection.I"
00080
00081 #endif
00082
00083