Panda3D
eggMorphList.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file eggMorphList.h
10  * @author drose
11  * @date 1999-01-29
12  */
13 
14 #ifndef EGGMORPHLIST_H
15 #define EGGMORPHLIST_H
16 
17 #include "pandabase.h"
18 
19 #include "eggMorph.h"
20 
21 #include "indent.h"
22 
23 #include "epvector.h"
24 
25 /**
26  * A collection of <Dxyz>'s or <Duv>'s or some such.
27  */
28 template<class MorphType>
29 class EggMorphList {
30 private:
31  typedef epvector<MorphType> Morphs;
32 
33 public:
34  typedef typename Morphs::iterator iterator;
35  typedef typename Morphs::const_iterator const_iterator;
36  typedef typename Morphs::size_type size_type;
37 
38  INLINE EggMorphList();
39  INLINE EggMorphList(const EggMorphList<MorphType> &copy);
40  INLINE void operator = (const EggMorphList<MorphType> &copy);
41  INLINE ~EggMorphList();
42 
43  INLINE bool operator == (const EggMorphList<MorphType> &other) const;
44  INLINE bool operator != (const EggMorphList<MorphType> &other) const;
45  INLINE bool operator < (const EggMorphList<MorphType> &other) const;
46  int compare_to(const EggMorphList<MorphType> &other, double threshold) const;
47 
48  INLINE iterator begin();
49  INLINE const_iterator begin() const;
50  INLINE iterator end();
51  INLINE const_iterator end() const;
52 
53  INLINE size_type size() const;
54  INLINE bool empty() const;
55 
56  std::pair<iterator, bool> insert(const MorphType &value);
57  INLINE void clear();
58 
59  void write(std::ostream &out, int indent_level,
60  const std::string &tag, int num_dimensions) const;
61 
62 private:
63  Morphs _morphs;
64 };
65 
70 
71 #include "eggMorphList.I"
72 
73 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::pair< iterator, bool > insert(const MorphType &value)
This is similar to the insert() interface for sets, except it does not guarantee that the resulting l...
Definition: eggMorphList.I:159
void clear()
Empties the list of morphs.
Definition: eggMorphList.I:183
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A collection of <Dxyz>'s or <Duv>'s or some such.
Definition: eggMorphList.h:29
int compare_to(const EggMorphList< MorphType > &other, double threshold) const
compare_to() compares a different space than the operator methods, which only check the morph's name.
Definition: eggMorphList.I:83
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.