1 #ifndef CORE_WeakPointersList_CPP 2 #define CORE_WeakPointersList_CPP 27 typename vector<boost::weak_ptr<T> >::iterator iVector=
mVector.begin();
28 typename vector<boost::weak_ptr<Q> >::const_iterator iCpy=cpy.
begin();
29 typename vector<boost::weak_ptr<Q> >::const_iterator eCpy=cpy.
end();
31 *iVector==boost::dynamic_pointer_cast<T>(*iCpy);
40 typename vector<boost::weak_ptr<T> >::iterator iVector=
mVector.begin();
41 typename vector<boost::shared_ptr<Q> >::const_iterator iCpy=cpy.
begin();
42 typename vector<boost::shared_ptr<Q> >::const_iterator eCpy=cpy.
end();
44 *iVector==boost::dynamic_pointer_cast<T>(*iCpy);
53 typename vector<boost::weak_ptr<T> >::const_iterator iVector=
mVector.begin();
54 while (iVector!=
mVector.end()) {
55 if ((*iVector).lock().get()==&obj)
return true;
66 typename vector<boost::weak_ptr<T> >::iterator iVector=
mVector.begin();
68 if ((*iVector).lock().get()==&obj) {
81 if (index>=
size())
return false;
82 typename vector<boost::weak_ptr<T> >::iterator p=
mVector.begin()+index;
89 typename vector<boost::shared_ptr<T> >::iterator pi=
mVector.begin()+i;
90 typename vector<boost::shared_ptr<T> >::iterator pj=
mVector.begin()+j;
100 typename vector<boost::weak_ptr<T> >::iterator p=
mVector.begin()+index;
101 if (index>
size())
return false;
102 boost::weak_ptr<T> wobj=obj;
112 const boost::shared_ptr<T>& obj) {
117 boost::weak_ptr<T> wobj=obj;
124 typename vector<boost::weak_ptr<T> >::iterator ei=
mVector.end();
125 typename vector<boost::weak_ptr<T> >::iterator bi=
mVector.begin();
139 typename vector<boost::weak_ptr<T> >::iterator p=
mVector.begin()+oldSize;
140 typename vector<boost::weak_ptr<Q> >::const_iterator q=array.
begin();
141 typename vector<boost::weak_ptr<Q> >::const_iterator eq=array.
end();
class CORE_SharedPointersList is a list of shared pointers
Definition: CORE_SharedPointersList.h:11
void permute(const tUIndex &i, const tUIndex &j)
permute
Definition: CORE_WeakPointersList.hpp:88
tBoolean set(const tUIndex &i, const boost::shared_ptr< T > &obj)
set the pointer at the index i
Definition: CORE_WeakPointersList.hpp:111
vector< boost::shared_ptr< T > >::const_iterator end() const
get iterator
Definition: CORE_SharedPointersList.h:311
tBoolean removeAtIndex(const tUIndex &i)
remove the pointer at index i
Definition: CORE_WeakPointersList.hpp:80
vector< boost::weak_ptr< T > >::const_iterator end() const
get iterator
Definition: CORE_WeakPointersList.h:271
#define tBoolean
Definition: types.h:139
vector< boost::weak_ptr< T > > mVector
Definition: CORE_WeakPointersList.h:16
CORE_WeakPointersList()
internal constructor
Definition: CORE_WeakPointersList.hpp:7
vector< boost::shared_ptr< T > >::const_iterator begin() const
get iterator
Definition: CORE_SharedPointersList.h:300
tUIndex size() const
return the size of the array
Definition: CORE_WeakPointersList.h:213
virtual ~CORE_WeakPointersList()
destroy an array of T*
Definition: CORE_WeakPointersList.hpp:19
void add(const boost::shared_ptr< T > &obj)
add an element at the end
Definition: CORE_WeakPointersList.h:104
void setSize(const int &n)
set the size of the weak pointer list
Definition: CORE_WeakPointersList.h:88
tUIndex getSize() const
return the size of the array
Definition: CORE_WeakPointersList.h:216
void reverse()
reverse the vector
Definition: CORE_WeakPointersList.hpp:123
tBoolean insert(const tUIndex &i, const boost::shared_ptr< T > &obj)
insert the pointer at index i the old element i become the element i+1
Definition: CORE_WeakPointersList.hpp:97
#define tUIndex
Definition: types.h:126
class CORE_WeakPointersList is a list of weak shared pointers
Definition: CORE_WeakPointersList.h:11
abstract base class for most classes.
Definition: CORE_Object.h:53
tBoolean remove()
remove the last pointer
Definition: CORE_WeakPointersList.h:161
void clear()
clear the array
Definition: CORE_WeakPointersList.h:167
void copy(const CORE_WeakPointersList< Q > &cpy)
copy the weak pointers list cpy
Definition: CORE_WeakPointersList.hpp:26
tBoolean exists(const boost::shared_ptr< T > &obj) const
exists
Definition: CORE_WeakPointersList.h:221
vector< boost::weak_ptr< T > >::const_iterator begin() const
get iterator
Definition: CORE_WeakPointersList.h:260
void merge(const CORE_WeakPointersList< Q > &array)
merge the array in this
Definition: CORE_WeakPointersList.hpp:135