# Visualization Library

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

[Home] [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 >:

List of all members.

## Public Member Functions

virtual const char * | className ()
| Returns the name of the class.
| 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 ()

## 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>

virtual const char* vl::Collection< T >::className | ( | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::Object.

Reimplemented in vl::ShaderSequence.

Definition at line 50 of file Collection.hpp.

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]`

Definition at line 74 of file Collection.hpp.

Referenced by vl::ActorTreeAbstract::addActor(), vl::SlicedVolume::bindActor(), vl::RaycastVolume::bindActor(), vl::MorphingCallback::bindActor(), vl::VolumePlot::compute(), vl::Geometry::convertDrawCallToDrawArrays(), vl::Geometry::deepCopy(), vl::SceneManagerVectorGraphics::extractActors(), vl::SceneManagerPortals::extractActors(), vl::ActorTreeAbstract::extractActors(), vl::SceneManagerPortals::extractVisibleActors(), vl::ActorTreeAbstract::extractVisibleActors(), vl::ActorKdTree::harvestNonLeafActors(), vl::Terrain::init(), vl::VisualizationLibrary::initCore(), vl::ActorKdTree::insertActor(), vl::Applet::keyReleaseEvent(), vl::STLLoader::loadAscii(), vl::Geometry::mergeTriangleStrips(), vl::LoadWriterManager::registerLoadWriter(), vl::DoubleVertexRemover::removeDoubles(), vl::Geometry::setTexCoordArray(), vl::Geometry::setVertexAttribArray(), vl::PolygonSimplifier::simplify(), vl::Geometry::sortVertices(), vl::TriangleStripGenerator::stripfy(), and vl::BezierSurface::updateBezierSurface().

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::deepCopy().

template<typename T>

int vl::Collection< T >::size | ( | ) | const`[inline]`

Definition at line 80 of file Collection.hpp.

Referenced by vl::TrackballManipulator::adjustView(), vl::Geometry::colorizePrimitives(), vl::ActorTreeAbstract::computeAABB(), vl::Sector::computeBoundingBox(), vl::SceneManager::computeBounds(), vl::Geometry::computeBounds_Implementation(), vl::Geometry::computeNormals(), vl::Geometry::deepCopy(), vl::DrawPixels::deletePixelBufferObjects(), vl::Geometry::deleteVBOs(), vl::RendererAbstract::dispatchOnRendererFinished(), vl::RendererAbstract::dispatchOnRendererStarted(), vl::RenderingAbstract::dispatchOnRenderingFinished(), vl::RenderingAbstract::dispatchOnRenderingStarted(), vl::Geometry::eraseVertexAttrib(), vl::SceneManagerVectorGraphics::extractActors(), vl::ActorTreeAbstract::extractActors(), vl::EdgeExtractor::extractEdges(), vl::ActorTreeAbstract::extractVisibleActors(), vl::Rendering::fillRenderQueue(), vl::LoadWriterManager::findLoader(), vl::LoadWriterManager::findWriter(), vl::DrawPixels::generatePixelBufferObjects(), vl::ActorKdTree::harvestNonLeafActors(), vl::RayIntersector::intersect(), vl::RayIntersector::intersectGeometry(), vl::LoadWriterManager::loadResource(), vl::FileSystem::locateDirectory(), vl::FileSystem::locateFile(), 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::PolygonSimplifier::simplify(), vl::Geometry::sortVertices(), vl::TriangleStripGenerator::stripfy(), vl::Geometry::toGenericVertexAttribs(), vl::MarchingCubes::updateAlpha(), vl::BezierSurface::updateBezierSurface(), vl::MarchingCubes::updateColor(), vl::Geometry::updateVBOs(), vl::Geometry::vertexAttribInfo(), vl::SceneManagerPortals::visitSector(), and vl::LoadWriterManager::writeResource().

template<typename T>

bool vl::Collection< T >::empty | ( | ) | const`[inline]`

Definition at line 82 of file Collection.hpp.

Referenced by vl::Rendering::fillRenderQueue().

template<typename T>

void vl::Collection< T >::clear | ( | ) | `[inline]`

Definition at line 84 of file Collection.hpp.

Referenced by vl::VectorGraphics::clear(), vl::Geometry::clearArrays(), vl::VolumePlot::compute(), vl::ActorKdTree::harvestNonLeafActors(), vl::Terrain::init(), vl::RayIntersector::intersect(), vl::DoubleVertexRemover::removeDoubles(), vl::Rendering::render(), vl::MarchingCubes::reset(), vl::PolygonSimplifier::simplify(), vl::Geometry::sortVertices(), vl::Geometry::toGenericVertexAttribs(), and vl::BezierSurface::updateBezierSurface().

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::ActorTreeAbstract::computeAABB(), vl::Sector::computeBoundingBox(), vl::SceneManager::computeBounds(), vl::Geometry::computeBounds_Implementation(), vl::Geometry::deleteVBOs(), vl::Geometry::eraseVertexAttrib(), vl::SceneManagerVectorGraphics::extractActors(), vl::EdgeExtractor::extractEdges(), vl::ActorTreeAbstract::extractVisibleActors(), vl::Rendering::fillRenderQueue(), vl::LoadWriterManager::findLoader(), vl::LoadWriterManager::findWriter(), vl::RayIntersector::intersectGeometry(), vl::FileSystem::listFilesRecursive(), vl::LoadWriterManager::loadResource(), vl::FileSystem::locateDirectory(), vl::FileSystem::locateFile(), vl::Geometry::mergeTriangleStrips(), 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::PolygonSimplifier::simplify(), vl::Geometry::sortVertices(), vl::TriangleStripGenerator::stripfy(), vl::MarchingCubes::updateAlpha(), vl::BezierSurface::updateBezierSurface(), vl::MarchingCubes::updateColor(), vl::Geometry::updateVBOs(), vl::Geometry::vertexAttribInfo(), vl::SceneManagerPortals::visitSector(), and vl::LoadWriterManager::writeResource().

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]`

Definition at line 111 of file Collection.hpp.

Referenced by vl::Collection< RenderingAbstract >::erase(), vl::ActorTreeAbstract::eraseActor(), and vl::Collection< RenderingAbstract >::find().

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]`

Definition at line 140 of file Collection.hpp.

Referenced by vl::RaycastVolume::bindActor(), vl::Geometry::convertDrawCallToDrawArrays(), vl::Geometry::mergeTriangleStrips(), vl::LoadWriterManager::registerLoadWriter(), vl::Geometry::setTexCoordArray(), and vl::TriangleStripGenerator::stripfy().

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]`

Definition at line 156 of file Collection.hpp.

Referenced by vl::RendererAbstract::dispatchOnRendererFinished(), vl::RendererAbstract::dispatchOnRendererStarted(), vl::RenderingAbstract::dispatchOnRenderingFinished(), vl::RenderingAbstract::dispatchOnRenderingStarted(), vl::ActorTreeAbstract::eraseActor(), and vl::Geometry::eraseVertexAttrib().

template<typename T>

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

Definition at line 158 of file Collection.hpp.

Referenced by vl::Collection< RenderingAbstract >::Collection(), and vl::Collection< RenderingAbstract >::operator=().

template<typename T>

std::vector< ref<T> >& vl::Collection< T >::vector | ( | ) | `[inline]`

Definition at line 160 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 163 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]`

Definition at line 166 of file Collection.hpp.

Referenced by vl::Collection< RenderingAbstract >::at(), vl::Collection< RenderingAbstract >::back(), vl::Collection< RenderingAbstract >::capacity(), vl::Collection< RenderingAbstract >::clear(), vl::Collection< RenderingAbstract >::Collection(), vl::Collection< RenderingAbstract >::empty(), vl::Collection< RenderingAbstract >::erase(), vl::Collection< RenderingAbstract >::eraseAt(), vl::Collection< RenderingAbstract >::find(), vl::Collection< RenderingAbstract >::insert(), vl::Collection< WriteCallback >::operator std::vector< ref< WriteCallback > >(), vl::Collection< RenderingAbstract >::operator=(), vl::Collection< RenderingAbstract >::operator[](), vl::Collection< RenderingAbstract >::pop_back(), vl::Collection< RenderingAbstract >::push_back(), vl::Collection< RenderingAbstract >::reserve(), vl::Collection< RenderingAbstract >::resize(), vl::Collection< RenderingAbstract >::set(), vl::Collection< RenderingAbstract >::shrink(), vl::Collection< RenderingAbstract >::size(), vl::Collection< RenderingAbstract >::sort(), vl::Collection< RenderingAbstract >::swap(), and vl::Collection< RenderingAbstract >::vector().

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlCore/Collection.hpp

Visualization Library v2011.05.1142 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu May 26 2011 22:51:32.
Permission is granted to use this page to write and publish articles regarding Visualization Library.