Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::ref< T > Class Template Reference

The ref<> class is used to reference-count an Object. More...

#include <Object.hpp>

List of all members.

Public Member Functions

 ref (T *object=NULL)
 ref (const ref &other)
template<class T2 >
 ref (const ref< T2 > &other)
 ~ref ()
refoperator= (const ref &other)
template<class T2 >
refoperator= (const ref< T2 > &other)
refoperator= (T *other)
template<class T2 >
refoperator= (T2 *other)
void swap (ref &other)
T * get () const
T * operator-> () const
T & operator* () const
bool operator< (const ref &other) const
 operator bool () const

Protected Attributes

T * mObject

Detailed Description

template<class T>
class vl::ref< T >

The ref<> class is used to reference-count an Object.

When the last ref<> that points to an Object is deallocated also the pointed Object is deallocated.

Definition at line 222 of file Object.hpp.


Constructor & Destructor Documentation

template<class T>
vl::ref< T >::ref ( T *  object = NULL ) [inline]

Definition at line 225 of file Object.hpp.

template<class T>
vl::ref< T >::ref ( const ref< T > &  other ) [inline]

Definition at line 231 of file Object.hpp.

template<class T>
template<class T2 >
vl::ref< T >::ref ( const ref< T2 > &  other ) [inline]

Definition at line 236 of file Object.hpp.

template<class T>
vl::ref< T >::~ref (  ) [inline]

Definition at line 241 of file Object.hpp.


Member Function Documentation

template<class T>
ref& vl::ref< T >::operator= ( const ref< T > &  other ) [inline]

Definition at line 247 of file Object.hpp.

template<class T>
template<class T2 >
ref& vl::ref< T >::operator= ( const ref< T2 > &  other ) [inline]

Definition at line 256 of file Object.hpp.

template<class T>
ref& vl::ref< T >::operator= ( T *  other ) [inline]

Definition at line 265 of file Object.hpp.

template<class T>
template<class T2 >
ref& vl::ref< T >::operator= ( T2 *  other ) [inline]

Definition at line 274 of file Object.hpp.

template<class T>
void vl::ref< T >::swap ( ref< T > &  other ) [inline]

Definition at line 283 of file Object.hpp.

Referenced by vl::Image::Image().

template<class T>
T* vl::ref< T >::get (  ) const [inline]

Definition at line 289 of file Object.hpp.

Referenced by vl::FontManager::acquireFont(), vl::ActorTreeAbstract::addActor(), vl::Molecule::addBond(), vl::Applet::addedListenerEvent(), vl::OpenGLContext::applyRenderStates(), vl::Molecule::atomsStyle(), vl::Molecule::ballAndStickStyle(), vl::SlicedVolume::bindActor(), vl::RaycastVolume::bindActor(), vl::MorphingCallback::bindActor(), vl::GhostCameraManipulator::camera(), vl::ActorKdTree::child(), vl::VectorGraphics::clearColor(), vl::VectorGraphics::clearStencil(), vl::MemoryDirectory::clone(), vl::Geometry::colorizePrimitives(), vl::VolumePlot::compute(), vl::Geometry::computeNormals(), vl::Geometry::convertDrawCallToDrawArrays(), vl::createCubemap(), vl::Texture::createTexture(), vl::VertexAttribInfo::data(), vl::EdgeRenderer::declareActor(), vl::Geometry::deepCopy(), vl::VectorGraphics::drawActorCopy(), vl::VectorGraphics::drawLineLoop(), vl::VectorGraphics::drawLines(), vl::VectorGraphics::drawLineStrip(), vl::VectorGraphics::drawPoints(), vl::BlitFramebuffer::drawRenderTarget(), vl::VectorGraphics::drawText(), vl::ZippedFile::extract(), vl::EdgeExtractor::extractEdges(), vl::Extrusion::extrude(), vl::VectorGraphics::fillPolygon(), vl::VectorGraphics::fillQuads(), vl::VectorGraphics::fillQuadStrip(), vl::Rendering::fillRenderQueue(), vl::VectorGraphics::fillTriangleFan(), vl::VectorGraphics::fillTriangles(), vl::VectorGraphics::fillTriangleStrip(), vl::Light::followedTransform(), vl::Molecule::generateAtomLabel(), vl::Molecule::generateAtomLabels(), vl::EdgeExtractor::generateEdgeGeometry(), vl::Molecule::generateRings(), vl::ResourceDatabase::get(), vl::UniformSet::gocUniform(), vl::ArrayAbstract::gpuBuffer(), vl::ReadPixels::image(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::indexIterator(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::DrawArrays::indexIterator(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indices(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::indices(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indices(), vl::Terrain::init(), vl::MorphingCallback::init(), vl::ZippedDirectory::init(), vl::VisualizationLibrary::initCore(), vl::MorphingCallback::initFrom(), vl::Applet::initialize(), vl::BufferedStream< unsigned char, 128 *1024 >::inputFile(), vl::LinearInterpolatorDouble::interpolator(), vl::LinearInterpolatorDVec2::interpolator(), vl::LinearInterpolatorDVec3::interpolator(), vl::LinearInterpolatorDVec4::interpolator(), vl::LinearInterpolatorFloat::interpolator(), vl::LinearInterpolatorFVec2::interpolator(), vl::LinearInterpolatorFVec3::interpolator(), vl::LinearInterpolatorFVec4::interpolator(), vl::CatmullRomInterpolatorDouble::interpolator(), vl::CatmullRomInterpolatorDVec2::interpolator(), vl::CatmullRomInterpolatorDVec3::interpolator(), vl::CatmullRomInterpolatorDVec4::interpolator(), vl::CatmullRomInterpolatorFloat::interpolator(), vl::CatmullRomInterpolatorFVec2::interpolator(), vl::CatmullRomInterpolatorFVec3::interpolator(), vl::CatmullRomInterpolatorFVec4::interpolator(), vl::RayIntersector::intersect(), vl::Applet::keyReleaseEvent(), vl::load3DS(), vl::loadAC3D(), vl::STLLoader::loadAscii(), vl::STLLoader::loadBinary(), vl::loadBMP(), vl::loadCubemap(), vl::loadDAT(), vl::loadDDS(), vl::loadDICOM(), vl::loadImage(), vl::loadJPG(), vl::loadMD2(), vl::loadMOL2(), vl::loadOBJ(), vl::ObjLoader::loadOBJ(), vl::PlyLoader::loadPly(), vl::loadPLY(), vl::loadPNG(), vl::LoadWriterManager::loadResource(), vl::loadSTL(), vl::String::loadText(), vl::loadTGA(), vl::loadTIFF(), vl::makeBox(), vl::makeCircle(), vl::makeCone(), vl::makeCylinder(), vl::makeGrid(), vl::makeIcosahedron(), vl::makeIcosphere(), vl::makePyramid(), vl::makeTeapot(), vl::makeTorus(), vl::makeUVSphere(), vl::ObjMesh::material(), vl::MemoryDirectory::memoryFile(), vl::Geometry::mergeTriangleStrips(), vl::ResourceDatabase::next(), vl::SlicedVolume::onActorRenderStarted(), vl::MorphingCallback::onActorRenderStarted(), vl::DepthSortCallback::onActorRenderStarted(), vl::GZipCodec::open(), vl::operator!=(), vl::ref< ArrayAbstract >::operator<(), vl::Shader::operator=(), vl::ZippedFile::operator=(), vl::ref< ArrayAbstract >::operator=(), vl::operator==(), vl::DrawCall::patchParameter(), vl::ImagePBO::pixelBufferObject(), vl::VectorGraphics::pushScissor(), vl::Text::rawboundingRect(), vl::RaycastVolume::RaycastVolume(), vl::ReadPixels::readPixels(), vl::BlitFramebuffer::readRenderTarget(), vl::Geometry::regenerateVertices(), vl::Applet::removedListenerEvent(), vl::DoubleVertexRemover::removeDoubles(), vl::Renderer::render(), vl::OcclusionCullRenderer::render(), vl::OcclusionCullRenderer::render_pass1(), vl::OcclusionCullRenderer::render_pass2(), vl::SceneManagerPortals::renderPortal(), vl::MarchingCubes::run(), vl::saveImage(), vl::saveJPG(), vl::savePNG(), vl::saveTGA(), vl::saveTIFF(), vl::VolumePlot::setupLabels(), vl::ShaderNode::shader(), vl::PolygonSimplifier::simplify(), vl::ZippedFileInfo::sourceZipFile(), vl::ZippedDirectory::sourceZipFile(), vl::Molecule::sticksStyle(), vl::TriangleStripGenerator::stripfy(), vl::ref< ArrayAbstract >::swap(), vl::Tessellator::tessellateGeometry(), vl::Texture::Texture(), vl::CopyTexSubImage3D::texture(), vl::CopyTexSubImage2D::texture(), vl::CopyTexSubImage1D::texture(), vl::MultiDrawElements< Tgltype, arr_type >::triangleIterator(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::triangleIterator(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::triangleIterator(), vl::DrawArrays::triangleIterator(), vl::BezierSurface::updateBezierSurface(), vl::VolumeInfo::volume(), vl::Molecule::wireframeStyle(), vl::ZippedDirectory::ZippedDirectory(), vl::ZippedDirectory::zippedFile(), and vl::ZippedFile::zippedFileInfo().

template<class T>
T* vl::ref< T >::operator-> (  ) const [inline]

Definition at line 290 of file Object.hpp.

template<class T>
T& vl::ref< T >::operator* (  ) const [inline]

Definition at line 291 of file Object.hpp.

template<class T>
bool vl::ref< T >::operator< ( const ref< T > &  other ) const [inline]

Definition at line 292 of file Object.hpp.

template<class T>
vl::ref< T >::operator bool (  ) const [inline]

Definition at line 293 of file Object.hpp.


Member Data Documentation

template<class T>
T* vl::ref< T >::mObject [protected]

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

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