Visualization Library 2.0.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 (int size) |
int | size () const |
bool | empty () const |
void | clear () |
const T * | back () const |
T * | back () |
void | reserve (int capacity) |
int | capacity () const |
const ref< T > & | operator[] (int i) const |
ref< T > & | operator[] (int i) |
const T * | at (int i) const |
T * | at (int i) |
void | swap (Collection &other) |
void | sort () |
int | find (T *obj) const |
void | shrink () |
void | push_back (const Collection< T > &objs) |
void | insert (int start, const Collection< T > &objs) |
void | set (const Collection< T > &objs) |
void | erase (int start, int count) |
void | set (int index, T *obj) |
void | insert (int index, T *obj) |
void | erase (const T *data) |
void | eraseAt (int 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 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 54 of file Collection.hpp.
|
inline |
Definition at line 60 of file Collection.hpp.
|
inline |
Definition at line 100 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 102 of file Collection.hpp.
|
inline |
Definition at line 88 of file Collection.hpp.
|
inline |
Definition at line 90 of file Collection.hpp.
|
inline |
Definition at line 94 of file Collection.hpp.
|
inline |
Definition at line 86 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 84 of file Collection.hpp.
Referenced by vl::TrackballManipulator::adjustView(), and vl::Rendering::fillRenderQueue().
|
inline |
Definition at line 142 of file Collection.hpp.
|
inline |
Definition at line 151 of file Collection.hpp.
|
inline |
Definition at line 159 of file Collection.hpp.
Referenced by vl::RendererAbstract::dispatchOnRendererFinished(), vl::RendererAbstract::dispatchOnRendererStarted(), and vl::ActorTreeAbstract::eraseActor().
|
inline |
Definition at line 113 of file Collection.hpp.
Referenced by vl::ActorTreeAbstract::eraseActor().
|
inline |
Definition at line 132 of file Collection.hpp.
|
inline |
Definition at line 149 of file Collection.hpp.
|
inlinestaticprotected |
Definition at line 166 of file Collection.hpp.
Referenced by vl::Collection< vl::SceneManager >::sort().
|
inline |
Definition at line 71 of file Collection.hpp.
|
inline |
Definition at line 65 of file Collection.hpp.
|
inline |
Definition at line 96 of file Collection.hpp.
|
inline |
Definition at line 98 of file Collection.hpp.
|
inline |
Definition at line 78 of file Collection.hpp.
|
inline |
Definition at line 76 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 127 of file Collection.hpp.
|
inline |
Definition at line 92 of file Collection.hpp.
Referenced by vl::ActorKdTree::rebuildKdTree().
|
inline |
Definition at line 80 of file Collection.hpp.
Referenced by vl::Rendering::render().
|
inline |
Definition at line 137 of file Collection.hpp.
|
inline |
Definition at line 147 of file Collection.hpp.
|
inline |
Definition at line 122 of file Collection.hpp.
|
inline |
Definition at line 82 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 108 of file Collection.hpp.
|
inline |
Definition at line 104 of file Collection.hpp.
Referenced by vl::Collection< vl::SceneManager >::shrink().
|
inline |
Definition at line 161 of file Collection.hpp.
Referenced by vl::Collection< vl::SceneManager >::Collection(), vl::Collection< vl::SceneManager >::operator=(), and vl::ActorKdTree::rebuildKdTree().
|
inline |
Definition at line 163 of file Collection.hpp.
|
protected |
Definition at line 169 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().
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:07.
© Copyright Michele Bosi. All rights reserved.