Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
It's basically an std::vector for Objects that is itself an Object so it can be reference counted and passed around with ease. More...
#include <Collection.hpp>
Public Member Functions | |
Collection (const std::vector< ref< T > > &vector) | |
Collection () | |
Collection & | operator= (const std::vector< ref< T > > &vector) |
operator std::vector< ref< T > > () const | |
void | push_back (T *data) |
void | pop_back () |
void | resize (size_t size) |
size_t | size () const |
bool | empty () const |
void | clear () |
const T * | back () const |
T * | back () |
void | reserve (size_t capacity) |
size_t | capacity () const |
const ref< T > & | operator[] (size_t i) const |
ref< T > & | operator[] (size_t i) |
const T * | at (size_t i) const |
T * | at (size_t i) |
void | swap (Collection &other) |
void | sort () |
size_t | find (T *obj) const |
void | shrink () |
void | push_back (const Collection< T > &objs) |
void | insert (size_t start, const Collection< T > &objs) |
void | set (const Collection< T > &objs) |
void | erase (size_t start, size_t count) |
void | set (size_t index, T *obj) |
void | insert (size_t index, T *obj) |
void | erase (const T *data) |
void | eraseAt (size_t index) |
const std::vector< ref< T > > & | vector () const |
std::vector< ref< T > > & | vector () |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Static Public Attributes | |
static const size_t | not_found = size_t( -1 ) |
Static Protected Member Functions | |
static bool | less (const ref< T > &a, const ref< T > &b) |
Protected Attributes | |
std::vector< ref< T > > | mVector |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
It's basically an std::vector for Objects that is itself an Object so it can be reference counted and passed around with ease.
It has also handy utility functions like sort(), find(), etc. Handy alternative to std::vector< ref< Object > > which becomes Collection<Object>.
Definition at line 49 of file Collection.hpp.
|
inline |
Definition at line 57 of file Collection.hpp.
|
inline |
Definition at line 63 of file Collection.hpp.
|
inline |
Definition at line 103 of file Collection.hpp.
Referenced by vl::TrackballManipulator::adjustView(), vl::ActorTreeAbstract::computeAABB(), vl::SceneManager::computeBounds(), vlX::VLXClassWrapper_Effect::export_ShaderPasses(), vl::EdgeExtractor::extractEdges(), vl::ActorTreeAbstract::extractVisibleActors(), vl::Rendering::fillRenderQueue(), vl::Rendering::render(), and vl::SceneManagerPortals::visitSector().
|
inline |
Definition at line 105 of file Collection.hpp.
|
inline |
Definition at line 91 of file Collection.hpp.
|
inline |
Definition at line 93 of file Collection.hpp.
|
inline |
Definition at line 97 of file Collection.hpp.
|
inline |
Definition at line 89 of file Collection.hpp.
Referenced by vl::VectorGraphics::clear(), vl::VolumePlot::compute(), vl::ActorKdTree::harvestNonLeafActors(), vl::Terrain::init(), vl::RayIntersector::intersect(), vl::ActorKdTree::rebuildKdTree(), vl::Rendering::render(), and vl::Molecule::reset().
|
inline |
Definition at line 87 of file Collection.hpp.
Referenced by vl::TrackballManipulator::adjustView(), and vl::Rendering::fillRenderQueue().
|
inline |
Definition at line 145 of file Collection.hpp.
|
inline |
Definition at line 154 of file Collection.hpp.
|
inline |
Definition at line 162 of file Collection.hpp.
Referenced by vl::RendererAbstract::dispatchOnRendererFinished(), vl::RendererAbstract::dispatchOnRendererStarted(), and vl::ActorTreeAbstract::eraseActor().
|
inline |
Definition at line 116 of file Collection.hpp.
Referenced by vl::ActorTreeAbstract::eraseActor().
|
inline |
Definition at line 135 of file Collection.hpp.
|
inline |
Definition at line 152 of file Collection.hpp.
|
inlinestaticprotected |
Definition at line 169 of file Collection.hpp.
Referenced by vl::Collection< vl::SceneManager >::sort().
|
inline |
Definition at line 74 of file Collection.hpp.
|
inline |
Definition at line 68 of file Collection.hpp.
|
inline |
Definition at line 99 of file Collection.hpp.
|
inline |
Definition at line 101 of file Collection.hpp.
|
inline |
Definition at line 81 of file Collection.hpp.
|
inline |
Definition at line 79 of file Collection.hpp.
Referenced by vl::ActorTreeAbstract::addActor(), vl::VolumePlot::compute(), vl::SceneManagerVectorGraphics::extractActors(), vl::ActorTreeAbstract::extractActors(), vl::SceneManagerPortals::extractActors(), vl::ActorTreeAbstract::extractVisibleActors(), vl::SceneManagerPortals::extractVisibleActors(), vl::ActorKdTree::harvestNonLeafActors(), vl::Terrain::init(), vl::ActorKdTree::insertActor(), vl::VectorGraphics::popScissor(), and vl::ActorKdTree::rebuildKdTree().
|
inline |
Definition at line 130 of file Collection.hpp.
|
inline |
Definition at line 95 of file Collection.hpp.
Referenced by vl::ActorKdTree::rebuildKdTree().
|
inline |
Definition at line 83 of file Collection.hpp.
Referenced by vl::Rendering::render().
|
inline |
Definition at line 140 of file Collection.hpp.
|
inline |
Definition at line 150 of file Collection.hpp.
|
inline |
Definition at line 125 of file Collection.hpp.
|
inline |
Definition at line 85 of file Collection.hpp.
Referenced by vl::TrackballManipulator::adjustView(), vl::ActorTreeAbstract::computeAABB(), vl::SceneManager::computeBounds(), vl::RendererAbstract::dispatchOnRendererFinished(), vl::RendererAbstract::dispatchOnRendererStarted(), vl::RenderingAbstract::dispatchOnRenderingFinished(), vl::RenderingAbstract::dispatchOnRenderingStarted(), vlX::VLXClassWrapper_Effect::export_ShaderPasses(), vl::ActorTreeAbstract::extractActors(), vl::EdgeExtractor::extractEdges(), vl::ActorTreeAbstract::extractVisibleActors(), vl::Rendering::fillRenderQueue(), vl::ActorKdTree::harvestNonLeafActors(), vl::RayIntersector::intersect(), vl::ActorTreeAbstract::prepareActors(), vl::ActorKdTree::rebuildKdTree(), vl::Rendering::render(), and vl::SceneManagerPortals::visitSector().
|
inline |
Definition at line 111 of file Collection.hpp.
|
inline |
Definition at line 107 of file Collection.hpp.
Referenced by vl::Collection< vl::SceneManager >::shrink().
|
inline |
Definition at line 164 of file Collection.hpp.
Referenced by vl::Collection< vl::SceneManager >::Collection(), vl::Collection< vl::SceneManager >::operator=(), and vl::ActorKdTree::rebuildKdTree().
|
inline |
Definition at line 166 of file Collection.hpp.
|
protected |
Definition at line 172 of file Collection.hpp.
Referenced by vl::Collection< vl::SceneManager >::at(), vl::Collection< vl::SceneManager >::back(), vl::Collection< vl::SceneManager >::capacity(), vl::Collection< vl::SceneManager >::clear(), vl::Collection< vl::SceneManager >::Collection(), vl::Collection< vl::SceneManager >::empty(), vl::Collection< vl::SceneManager >::erase(), vl::Collection< vl::SceneManager >::eraseAt(), vl::Collection< vl::SceneManager >::find(), vl::Collection< vl::SceneManager >::insert(), vl::Collection< vl::VolumeInfo >::operator std::vector< ref< vl::VolumeInfo > >(), vl::Collection< vl::SceneManager >::operator=(), vl::Collection< vl::SceneManager >::operator[](), vl::Collection< vl::SceneManager >::pop_back(), vl::Collection< vl::SceneManager >::push_back(), vl::Collection< vl::SceneManager >::reserve(), vl::Collection< vl::SceneManager >::resize(), vl::Collection< vl::SceneManager >::set(), vl::Collection< vl::SceneManager >::shrink(), vl::Collection< vl::SceneManager >::size(), vl::Collection< vl::SceneManager >::sort(), vl::Collection< vl::SceneManager >::swap(), and vl::Collection< vl::SceneManager >::vector().
|
static |
Definition at line 54 of file Collection.hpp.
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:48.
© Copyright Michele Bosi. All rights reserved.