Panda3D

pointerToArrayBase.I

00001 // Filename: pointerToArrayBase.I
00002 // Created by:  drose (30Oct06)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: ReferenceCountedVector::Constructor
00018 //       Access: Public
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 template<class Element>
00022 INLINE ReferenceCountedVector<Element>::
00023 ReferenceCountedVector(TypeHandle type_handle) : pvector<Element>(type_handle) {
00024 }
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: ReferenceCountedVector::Copy Constructor
00028 //       Access: Public
00029 //  Description:
00030 ////////////////////////////////////////////////////////////////////
00031 template<class Element>
00032 INLINE ReferenceCountedVector<Element>::
00033 ReferenceCountedVector(const ReferenceCountedVector<Element> &copy) :
00034   NodeReferenceCount(copy),
00035   pvector<Element>(copy)
00036 {
00037 }
00038 
00039 ////////////////////////////////////////////////////////////////////
00040 //     Function: ReferenceCountedVector::empty_array constructor
00041 //       Access: Public
00042 //  Description: Creates an array of initial_size elements.
00043 ////////////////////////////////////////////////////////////////////
00044 template<class Element>
00045 INLINE ReferenceCountedVector<Element>::
00046 ReferenceCountedVector(TYPENAME ReferenceCountedVector<Element>::size_type initial_size, TypeHandle type_handle) :
00047   pvector<Element>(initial_size, type_handle)
00048 {
00049 }
00050 
00051 ////////////////////////////////////////////////////////////////////
00052 //     Function: ReferenceCountedVector::Destructor
00053 //       Access: Public
00054 //  Description:
00055 ////////////////////////////////////////////////////////////////////
00056 template<class Element>
00057 INLINE ReferenceCountedVector<Element>::
00058 ~ReferenceCountedVector() {
00059 }
00060  
00061 ////////////////////////////////////////////////////////////////////
00062 //     Function: ReferenceCountedVector::size
00063 //       Access: Public
00064 //  Description: 
00065 ////////////////////////////////////////////////////////////////////
00066 template<class Element>
00067 INLINE TYPENAME ReferenceCountedVector<Element>::size_type ReferenceCountedVector<Element>::
00068 size() const {
00069   return pvector<Element>::size();
00070 }
00071 
00072 ////////////////////////////////////////////////////////////////////
00073 //     Function: ReferenceCountedVector::insert
00074 //       Access: Public
00075 //  Description: 
00076 ////////////////////////////////////////////////////////////////////
00077 template<class Element>
00078 INLINE TYPENAME ReferenceCountedVector<Element>::iterator ReferenceCountedVector<Element>::
00079 insert(iterator position, const Element &x) {
00080   return pvector<Element>::insert(position, x);
00081 }
00082 
00083 ////////////////////////////////////////////////////////////////////
00084 //     Function: ReferenceCountedVector::insert
00085 //       Access: Public
00086 //  Description: 
00087 ////////////////////////////////////////////////////////////////////
00088 template<class Element>
00089 INLINE void ReferenceCountedVector<Element>::
00090 insert(iterator position, size_type n, const Element &x) {
00091   pvector<Element>::insert(position, n, x);
00092 }
00093 
00094 ////////////////////////////////////////////////////////////////////
00095 //     Function: ReferenceCountedVector::erase
00096 //       Access: Public
00097 //  Description: 
00098 ////////////////////////////////////////////////////////////////////
00099 template<class Element>
00100 INLINE void ReferenceCountedVector<Element>::
00101 erase(iterator position) {
00102   pvector<Element>::erase(position);
00103 }
00104 
00105 ////////////////////////////////////////////////////////////////////
00106 //     Function: ReferenceCountedVector::erase
00107 //       Access: Public
00108 //  Description: 
00109 ////////////////////////////////////////////////////////////////////
00110 template<class Element>
00111 INLINE void ReferenceCountedVector<Element>::
00112 erase(iterator first, iterator last) {
00113   pvector<Element>::erase(first, last);
00114 }
00115 
00116 ////////////////////////////////////////////////////////////////////
00117 //     Function: ReferenceCountedVector::pop_back
00118 //       Access: Public
00119 //  Description: 
00120 ////////////////////////////////////////////////////////////////////
00121 template<class Element>
00122 INLINE void ReferenceCountedVector<Element>::
00123 pop_back() {
00124   pvector<Element>::pop_back();
00125 }
00126 
00127 ////////////////////////////////////////////////////////////////////
00128 //     Function: ReferenceCountedVector::clear
00129 //       Access: Public
00130 //  Description: 
00131 ////////////////////////////////////////////////////////////////////
00132 template<class Element>
00133 INLINE void ReferenceCountedVector<Element>::
00134 clear() {
00135   pvector<Element>::clear();
00136 }
00137 
00138 ////////////////////////////////////////////////////////////////////
00139 //     Function: PointerToArrayBase::Constructor
00140 //       Access: Protected
00141 //  Description: 
00142 ////////////////////////////////////////////////////////////////////
00143 template<class Element>
00144 INLINE PointerToArrayBase<Element>::
00145 PointerToArrayBase(ReferenceCountedVector<Element> *ptr) :
00146   PointerToBase<ReferenceCountedVector<Element> >(ptr)
00147 {
00148 }
00149 
00150 ////////////////////////////////////////////////////////////////////
00151 //     Function: PointerToArrayBase::Copy Constructor
00152 //       Access: Protected
00153 //  Description: 
00154 ////////////////////////////////////////////////////////////////////
00155 template<class Element>
00156 INLINE PointerToArrayBase<Element>::
00157 PointerToArrayBase(const PointerToArrayBase<Element> &copy) :
00158   PointerToBase<ReferenceCountedVector<Element> >(copy)
00159 {
00160 }
00161 
00162 ////////////////////////////////////////////////////////////////////
00163 //     Function: PointerToArrayBase::Destructor
00164 //       Access: Published
00165 //  Description: 
00166 ////////////////////////////////////////////////////////////////////
00167 template<class Element>
00168 INLINE PointerToArrayBase<Element>::
00169 ~PointerToArrayBase() {
00170 }
00171 
 All Classes Functions Variables Enumerations