Panda3D
Loading...
Searching...
No Matches
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 */
28template<class MorphType>
30private:
31 typedef epvector<MorphType> Morphs;
32
33public:
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
62private:
63 Morphs _morphs;
64};
65
70
71#include "eggMorphList.I"
72
73#endif
A collection of <Dxyz>'s or <Duv>'s or some such.
void clear()
Empties the list of morphs.
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.
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...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.