Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Static Protected Member Functions | Protected Attributes

vl::Collection< T > Class Template Reference

Reference counted container that encapsulates the base functionalites of an std::vector<>. More...

#include <Collection.hpp>

Inheritance diagram for vl::Collection< T >:
vl::Object

List of all members.

Public Member Functions

 Collection (const std::vector< ref< T > > &vector)
 Collection ()
Collectionoperator= (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 ()

Static Protected Member Functions

static bool less (const ref< T > &a, const ref< T > &b)

Protected Attributes

std::vector< ref< T > > mVector

Detailed Description

template<typename T>
class vl::Collection< T >

Reference counted container that encapsulates the base functionalites of an std::vector<>.

This container can be used only with objects whose classes derive from Object.

Definition at line 47 of file Collection.hpp.


Constructor & Destructor Documentation

template<typename T>
vl::Collection< T >::Collection ( const std::vector< ref< T > > &  vector ) [inline]

Definition at line 52 of file Collection.hpp.

template<typename T>
vl::Collection< T >::Collection (  ) [inline]

Definition at line 58 of file Collection.hpp.


Member Function Documentation

template<typename T>
Collection& vl::Collection< T >::operator= ( const std::vector< ref< T > > &  vector ) [inline]

Definition at line 63 of file Collection.hpp.

template<typename T>
vl::Collection< T >::operator std::vector< ref< T > > (  ) const [inline]

Definition at line 69 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::push_back ( T *  data ) [inline]
template<typename T>
void vl::Collection< T >::pop_back (  ) [inline]

Definition at line 76 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::resize ( int  size ) [inline]

Definition at line 78 of file Collection.hpp.

Referenced by vl::Geometry::deepCopyFrom().

template<typename T>
int vl::Collection< T >::size (  ) const [inline]

Definition at line 80 of file Collection.hpp.

Referenced by vl::TrackballManipulator::adjustView(), vl::OpenGLContext::bindVAS(), vl::Geometry::colorizePrimitives(), vl::ActorTreeAbstract::computeAABB(), vl::Sector::computeBoundingBox(), vl::SceneManager::computeBounds(), vl::Geometry::computeBounds_Implementation(), vl::Geometry::computeNormals(), vl::Geometry::convertDrawCallToDrawArrays(), vl::Geometry::convertToVertexAttribs(), vl::Geometry::deepCopyFrom(), vl::Geometry::deleteBufferObject(), vl::DrawPixels::deletePixelBufferObjects(), vl::RendererAbstract::dispatchOnRendererFinished(), vl::RendererAbstract::dispatchOnRendererStarted(), vl::RenderingAbstract::dispatchOnRenderingFinished(), vl::RenderingAbstract::dispatchOnRenderingStarted(), vl::VLXClassWrapper_Effect::export_ShaderPasses(), vl::VLXClassWrapper_Actor::exportActor(), vl::VLXClassWrapper_Geometry::exportGeometry(), vl::SceneManagerVectorGraphics::extractActors(), vl::ActorTreeAbstract::extractActors(), vl::EdgeExtractor::extractEdges(), vl::ActorTreeAbstract::extractVisibleActors(), vl::Rendering::fillRenderQueue(), vl::DrawPixels::generatePixelBufferObjects(), vl::ActorKdTree::harvestNonLeafActors(), vl::RayIntersector::intersect(), vl::RayIntersector::intersectGeometry(), vl::Geometry::makeGLESFriendly(), vl::DepthSortCallback::onActorRenderStarted(), vl::ActorTreeAbstract::prepareActors(), vl::Geometry::regenerateVertices(), vl::DrawPixels::releaseImages(), vl::DoubleVertexRemover::removeDoubles(), vl::RenderingTree::render(), vl::Rendering::render(), vl::Geometry::render_Implementation(), vl::DrawPixels::render_Implementation(), vl::MarchingCubes::run(), vl::Geometry::setTexCoordArray(), vl::Geometry::setVertexAttribArray(), vl::Geometry::sortVertices(), vl::TriangleStripGenerator::stripfy(), vl::MarchingCubes::updateAlpha(), vl::BezierSurface::updateBezierSurface(), vl::MarchingCubes::updateColor(), vl::Geometry::updateDirtyBufferObject(), vl::Geometry::vertexAttribArray(), and vl::SceneManagerPortals::visitSector().

template<typename T>
bool vl::Collection< T >::empty (  ) const [inline]
template<typename T>
void vl::Collection< T >::clear (  ) [inline]
template<typename T>
const T* vl::Collection< T >::back (  ) const [inline]

Definition at line 86 of file Collection.hpp.

template<typename T>
T* vl::Collection< T >::back (  ) [inline]

Definition at line 88 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::reserve ( int  capacity ) [inline]

Definition at line 90 of file Collection.hpp.

template<typename T>
int vl::Collection< T >::capacity (  ) const [inline]

Definition at line 92 of file Collection.hpp.

template<typename T>
const ref<T>& vl::Collection< T >::operator[] ( int  i ) const [inline]

Definition at line 94 of file Collection.hpp.

template<typename T>
ref<T>& vl::Collection< T >::operator[] ( int  i ) [inline]

Definition at line 96 of file Collection.hpp.

template<typename T>
const T* vl::Collection< T >::at ( int  i ) const [inline]

Definition at line 98 of file Collection.hpp.

Referenced by vl::TrackballManipulator::adjustView(), vl::OpenGLContext::bindVAS(), vl::ActorTreeAbstract::computeAABB(), vl::Sector::computeBoundingBox(), vl::SceneManager::computeBounds(), vl::Geometry::computeBounds_Implementation(), vl::Geometry::deleteBufferObject(), vl::VLXClassWrapper_Effect::export_ShaderPasses(), vl::VLXClassWrapper_Actor::exportActor(), vl::VLXClassWrapper_Geometry::exportGeometry(), vl::SceneManagerVectorGraphics::extractActors(), vl::EdgeExtractor::extractEdges(), vl::ActorTreeAbstract::extractVisibleActors(), vl::Rendering::fillRenderQueue(), vl::Geometry::fixTriangleWinding(), vl::RayIntersector::intersectGeometry(), vl::Geometry::makeGLESFriendly(), vl::Geometry::mergeDrawCallsWithMultiDrawElements(), vl::Geometry::mergeDrawCallsWithPrimitiveRestart(), vl::Geometry::mergeDrawCallsWithTriangles(), vl::Geometry::mergeTriangleStrips(), vl::DepthSortCallback::onActorRenderStarted(), vl::Geometry::regenerateVertices(), vl::DoubleVertexRemover::removeDoubles(), vl::RenderingTree::render(), vl::Rendering::render(), vl::Geometry::render_Implementation(), vl::DrawPixels::render_Implementation(), vl::MarchingCubes::run(), vl::Geometry::setTexCoordArray(), vl::Geometry::setVertexAttribArray(), vl::Geometry::shrinkDrawCalls(), vl::Geometry::sortVertices(), vl::TriangleStripGenerator::stripfy(), vl::Geometry::triangulateDrawCalls(), vl::MarchingCubes::updateAlpha(), vl::BezierSurface::updateBezierSurface(), vl::MarchingCubes::updateColor(), vl::Geometry::updateDirtyBufferObject(), vl::Geometry::vertexAttribArray(), and vl::SceneManagerPortals::visitSector().

template<typename T>
T* vl::Collection< T >::at ( int  i ) [inline]

Definition at line 100 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::swap ( Collection< T > &  other ) [inline]

Definition at line 102 of file Collection.hpp.

Referenced by vl::Collection< RenderingAbstract >::shrink().

template<typename T>
void vl::Collection< T >::sort (  ) [inline]

Definition at line 106 of file Collection.hpp.

Referenced by vl::Collection< RenderingAbstract >::sort().

template<typename T>
int vl::Collection< T >::find ( T *  obj ) const [inline]
template<typename T>
void vl::Collection< T >::shrink (  ) [inline]

Definition at line 120 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::push_back ( const Collection< T > &  objs ) [inline]

Definition at line 125 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::insert ( int  start,
const Collection< T > &  objs 
) [inline]

Definition at line 130 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::set ( const Collection< T > &  objs ) [inline]

Definition at line 135 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::erase ( int  start,
int  count 
) [inline]
template<typename T>
void vl::Collection< T >::set ( int  index,
T *  obj 
) [inline]

Definition at line 145 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::insert ( int  index,
T *  obj 
) [inline]

Definition at line 147 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::erase ( const T *  data ) [inline]

Definition at line 149 of file Collection.hpp.

template<typename T>
void vl::Collection< T >::eraseAt ( int  index ) [inline]
template<typename T>
const std::vector< ref<T> >& vl::Collection< T >::vector (  ) const [inline]
template<typename T>
std::vector< ref<T> >& vl::Collection< T >::vector (  ) [inline]

Definition at line 161 of file Collection.hpp.

template<typename T>
static bool vl::Collection< T >::less ( const ref< T > &  a,
const ref< T > &  b 
) [inline, static, protected]

Definition at line 164 of file Collection.hpp.

Referenced by vl::Collection< RenderingAbstract >::sort().


Member Data Documentation

template<typename T>
std::vector< ref<T> > vl::Collection< T >::mVector [protected]

The documentation for this class was generated from the following file:

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:06.
Permission is granted to use this page to write and publish articles regarding Visualization Library.