Panda3D
pointerToArrayBase.I
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 pointerToArrayBase.I
10  * @author drose
11  * @date 2006-10-30
12  */
13 
14 /**
15  *
16  */
17 template<class Element>
19 ReferenceCountedVector(TypeHandle type_handle) : pvector<Element>(type_handle) {
20 }
21 
22 /**
23  * Creates an array of initial_size elements.
24  */
25 template<class Element>
27 ReferenceCountedVector(typename ReferenceCountedVector<Element>::size_type initial_size, TypeHandle type_handle) :
28  pvector<Element>(initial_size, type_handle)
29 {
30 }
31 
32 /**
33  * Creates an array with all elements from begin up to but not including end.
34  */
35 template<class Element>
37 ReferenceCountedVector(const Element *begin, const Element *end, TypeHandle type_handle) :
38  pvector<Element>(begin, end, type_handle)
39 {
40 }
41 
42 /**
43  * Creates an array that takes its elements from the given vector.
44  */
45 template<class Element>
48  pvector<Element>(std::move(from))
49 {
50 }
51 
52 /**
53  *
54  */
55 template<class Element>
56 INLINE typename ReferenceCountedVector<Element>::size_type ReferenceCountedVector<Element>::
57 size() const {
58  return pvector<Element>::size();
59 }
60 
61 /**
62  *
63  */
64 template<class Element>
65 INLINE typename ReferenceCountedVector<Element>::iterator ReferenceCountedVector<Element>::
66 insert(iterator position, const Element &x) {
67  return pvector<Element>::insert(position, x);
68 }
69 
70 /**
71  *
72  */
73 template<class Element>
75 insert(iterator position, size_type n, const Element &x) {
76  pvector<Element>::insert(position, n, x);
77 }
78 
79 /**
80  *
81  */
82 template<class Element>
84 erase(iterator position) {
85  pvector<Element>::erase(position);
86 }
87 
88 /**
89  *
90  */
91 template<class Element>
93 erase(iterator first, iterator last) {
94  pvector<Element>::erase(first, last);
95 }
96 
97 /**
98  *
99  */
100 template<class Element>
102 pop_back() {
104 }
105 
106 /**
107  *
108  */
109 template<class Element>
111 clear() {
113 }
114 
115 /**
116  *
117  */
118 template<class Element>
121  PointerToBase<ReferenceCountedVector<Element> >(ptr)
122 {
123 }
124 
125 /**
126  *
127  */
128 template<class Element>
131  PointerToBase<ReferenceCountedVector<Element> >(copy)
132 {
133 }
134 
135 /**
136  *
137  */
138 template<class Element>
142 {
143 }
144 
145 /**
146  *
147  */
148 template<class Element>
151 }
This is the base class for PointerTo and ConstPointerTo.
Definition: pointerToBase.h:29
This is our own Panda specialization on the default STL vector.
Definition: pvector.h:42
This is the base class for PointerToArray and ConstPointerToArray.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
This defines the object that is actually stored and reference-counted internally by a PointerToArray.