| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- // Filename: internalNameCollection.h
- // Created by: drose (16Mar02)
- //
- ////////////////////////////////////////////////////////////////////
- //
- // PANDA 3D SOFTWARE
- // Copyright (c) Carnegie Mellon University. All rights reserved.
- //
- // All use of this software is subject to the terms of the revised BSD
- // license. You should have received a copy of this license along
- // with this source code in a file named "LICENSE."
- //
- ////////////////////////////////////////////////////////////////////
- #ifndef INTERNALNAMECOLLECTION_H
- #define INTERNALNAMECOLLECTION_H
- #include "pandabase.h"
- #include "pointerToArray.h"
- #include "internalName.h"
- ////////////////////////////////////////////////////////////////////
- // Class : InternalNameCollection
- // Description :
- ////////////////////////////////////////////////////////////////////
- class EXPCL_PANDA_PGRAPH InternalNameCollection {
- PUBLISHED:
- InternalNameCollection();
- InternalNameCollection(const InternalNameCollection ©);
- void operator = (const InternalNameCollection ©);
- INLINE ~InternalNameCollection();
- void add_name(InternalName *name);
- bool remove_name(InternalName *name);
- void add_names_from(const InternalNameCollection &other);
- void remove_names_from(const InternalNameCollection &other);
- void remove_duplicate_names();
- bool has_name(InternalName *name) const;
- void clear();
- int get_num_names() const;
- InternalName *get_name(int index) const;
- InternalName *operator [] (int index) const;
- void output(ostream &out) const;
- void write(ostream &out, int indent_level = 0) const;
- private:
- typedef PTA(PT(InternalName)) InternalNames;
- InternalNames _names;
- };
- INLINE ostream &operator << (ostream &out, const InternalNameCollection &col) {
- col.output(out);
- return out;
- }
- #include "internalNameCollection.I"
- #endif
|