32 #ifndef Collection_INCLUDE_ONCE 33 #define Collection_INCLUDE_ONCE 59 VL_DEBUG_SET_OBJECT_NAME()
65 VL_DEBUG_SET_OBJECT_NAME()
74 operator std::vector< ref<T> >()
const 103 const T*
at(
size_t i)
const {
return mVector[i].get(); }
118 typename std::vector< ref<T> >::const_iterator pos = std::find(
mVector.begin(),
mVector.end(), obj);
122 return (
size_t)(pos -
mVector.begin());
145 void erase(
size_t start,
size_t count)
150 void set(
size_t index, T* obj) {
mVector[index] = obj; }
156 typename std::vector< ref<T> >::iterator it = std::find(
mVector.begin(),
mVector.end(), data);
ref< T > & operator[](size_t i)
std::vector< ref< T > > mVector
size_t find(T *obj) const
void reserve(size_t capacity)
void eraseAt(size_t index)
std::vector< ref< T > > & vector()
void push_back(const Collection< T > &objs)
void insert(size_t index, T *obj)
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
static const size_t not_found
void insert(size_t start, const Collection< T > &objs)
static bool less(const ref< T > &a, const ref< T > &b)
const T * at(size_t i) const
Visualization Library main namespace.
Collection(const std::vector< ref< T > > &vector)
Collection & operator=(const std::vector< ref< T > > &vector)
const std::vector< ref< T > > & vector() const
void erase(size_t start, size_t count)
The base class for all the reference counted objects.
const ref< T > & operator[](size_t i) const
void erase(const T *data)
void swap(Collection &other)
It's basically an std::vector for Objects that is itself an Object so it can be reference counted and...
The ref<> class is used to reference-count an Object.