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 | 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 (const ref &other)
 ref (const T *object=NULL)
template<class T2 >
 ref (const ref< T2 > &other)
 ~ref ()
refoperator= (const ref &other)
refoperator= (const T *other)
template<class T2 >
refoperator= (const ref< T2 > &other)
void swap (ref &other)
T * get_writable () const
 This is mainly useful when using ref<> with std::map, std::set, etc.
const T * get () const
const T * operator-> () const
const T & operator* () const
T * get ()
T * operator-> ()
T & operator* ()
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.

Note:
IMPORTANT: assigning to a ref<> 'washes aways' the constness of an object.

Definition at line 222 of file Object.hpp.


Constructor & Destructor Documentation

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

Definition at line 226 of file Object.hpp.

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

Definition at line 232 of file Object.hpp.

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

Definition at line 239 of file Object.hpp.

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

Definition at line 245 of file Object.hpp.


Member Function Documentation

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

Definition at line 253 of file Object.hpp.

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

Definition at line 264 of file Object.hpp.

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

Definition at line 275 of file Object.hpp.

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

Definition at line 285 of file Object.hpp.

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

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

This is mainly useful when using ref<> with std::map, std::set, etc.

Definition at line 293 of file Object.hpp.

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

Definition at line 295 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::DaeLoader::bindMaterials(), vl::Light::boundTransform(), vl::ArrayAbstract::bufferObject(), vl::GhostCameraManipulator::camera(), vl::FlatManipulator::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::Shader::deepCopyFrom(), vl::Geometry::deepCopyFrom(), vl::VectorGraphics::drawActorCopy(), vl::BlitFramebuffer::drawFramebuffer(), vl::VectorGraphics::drawLineLoop(), vl::VectorGraphics::drawLines(), vl::VectorGraphics::drawLineStrip(), vl::VectorGraphics::drawPoints(), vl::VectorGraphics::drawText(), vl::VLXClassWrapper_Effect::exportEffect(), vl::VLXClassWrapper_ResourceDatabase::exportResourceDatabase(), vl::VLXClassWrapper_Shader::exportShader(), vl::VLXClassWrapper_Transform::exportTransform(), vl::VLXClassWrapper_Uniform::exportUniform(), vl::VLXClassWrapper_Array::exportVLX(), vl::VLXSerializer::exportVLX(), vl::ZippedFile::extract(), vl::EdgeExtractor::extractEdges(), vl::Extrusion::extrude(), vl::VectorGraphics::fillPolygon(), vl::VectorGraphics::fillQuad(), vl::VectorGraphics::fillQuads(), vl::VectorGraphics::fillQuadStrip(), vl::Rendering::fillRenderQueue(), vl::VectorGraphics::fillTriangleFan(), vl::VectorGraphics::fillTriangles(), vl::VectorGraphics::fillTriangleStrip(), vl::Molecule::generateAtomLabel(), vl::Molecule::generateAtomLabels(), vl::EdgeExtractor::generateEdgeGeometry(), vl::DaeLoader::generateGeometry(), vl::Molecule::generateRings(), vl::DaeLoader::getSource(), vl::UniformSet::gocUniform(), vl::ReadPixels::image(), vl::VLXClassWrapper_TextureSampler::importVLX(), vl::VLXClassWrapper_TexParameter::importVLX(), vl::VLXClassWrapper_Texture::importVLX(), vl::VLXClassWrapper_ActorEventCallback::importVLX(), vl::VLXClassWrapper_Material::importVLX(), vl::VLXClassWrapper_Normal::importVLX(), vl::VLXClassWrapper_SecondaryColor::importVLX(), vl::VLXClassWrapper_Color::importVLX(), vl::VLXClassWrapper_VertexAttrib::importVLX(), vl::VLXClassWrapper_GLSLShader::importVLX(), vl::VLXClassWrapper_GLSLProgram::importVLX(), vl::VLXClassWrapper_ClipPlane::importVLX(), vl::VLXClassWrapper_Light::importVLX(), vl::VLXClassWrapper_Transform::importVLX(), vl::VLXClassWrapper_Viewport::importVLX(), vl::VLXClassWrapper_Camera::importVLX(), vl::VLXClassWrapper_Actor::importVLX(), vl::VLXClassWrapper_Effect::importVLX(), vl::VLXClassWrapper_LODEvaluator::importVLX(), vl::VLXClassWrapper_Shader::importVLX(), vl::VLXClassWrapper_Uniform::importVLX(), vl::VLXClassWrapper_ResourceDatabase::importVLX(), vl::VLXClassWrapper_PatchParameter::importVLX(), vl::VLXClassWrapper_DrawCall::importVLX(), vl::VLXClassWrapper_VertexAttribInfo::importVLX(), vl::VLXClassWrapper_Geometry::importVLX(), vl::VLXClassWrapper_Array::importVLX(), vl::VLXSerializer::importVLX(), vl::MultiDrawElements< ArrayUShort1 >::indexBuffer(), vl::DrawRangeElements< ArrayUShort1 >::indexBuffer(), vl::DrawElements< ArrayUShort1 >::indexBuffer(), vl::MultiDrawElements< ArrayUShort1 >::indexIterator(), vl::DrawRangeElements< ArrayUShort1 >::indexIterator(), vl::DrawElements< ArrayUShort1 >::indexIterator(), vl::DrawArrays::indexIterator(), vl::Terrain::init(), vl::ZippedDirectory::init(), vl::VisualizationLibrary::initCore(), vl::Applet::initialize(), vl::VLXParserVLB::inputFile(), vl::BufferedStream< 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::isVLB(), vl::isVLT(), vl::Applet::keyReleaseEvent(), vl::StereoCamera::leftCamera(), vl::LoadWriterDae::load(), vl::DaeLoader::load(), 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::LoadWriterDae::loadOptions(), vl::PlyLoader::loadPly(), vl::loadPLY(), vl::loadPNG(), vl::LoadWriterManager::loadResource(), vl::loadSTL(), vl::String::loadText(), vl::loadTGA(), vl::loadTIFF(), vl::loadVLB(), vl::VLXSerializer::loadVLB(), vl::loadVLT(), vl::VLXSerializer::loadVLT(), main(), vl::makeBox(), vl::makeCircle(), vl::makeCone(), vl::makeCylinder(), vl::makeGrid(), vl::makeIcosahedron(), vl::makeIcosphere(), vl::makePyramid(), makeScales(), vl::makeTeapot(), vl::makeTorus(), vl::makeUVSphere(), vl::ObjMesh::material(), vl::MemoryDirectory::memoryFile(), vl::Geometry::mergeDrawCallsWithMultiDrawElements(), vl::Geometry::mergeDrawCallsWithPrimitiveRestart(), vl::Geometry::mergeDrawCallsWithTriangles(), vl::Geometry::mergeTriangleStrips(), vl::StereoCamera::monoCamera(), vl::ResourceDatabase::next(), vl::SlicedVolume::onActorRenderStarted(), vl::MorphingCallback::onActorRenderStarted(), vl::GZipCodec::open(), vl::operator!=(), vl::GLSLProgram::operator=(), vl::ZippedFile::operator=(), vl::ref< ArrayAbstract >::operator=(), vl::operator==(), vl::PolygonSimplifier::outputSimplifiedGeometry(), vl::VLXParserVLT::parse(), vl::VLXParserVLB::parse(), vl::DaeLoader::parseColor(), vl::DaeLoader::parseEffects(), vl::DaeLoader::parseGeometry(), vl::VLXParserVLT::parseList(), vl::DaeLoader::parseNode(), vl::VLXParserVLT::parseStructure(), vl::DrawCall::patchParameter(), vl::ImagePBO::pixelBufferObject(), vl::DaeLoader::prepareTexture2D(), vl::VectorGraphics::pushScissor(), vl::Text::rawboundingRect(), vl::CoreText::rawboundingRect(), vl::RaycastVolume::RaycastVolume(), vl::BlitFramebuffer::readFramebuffer(), vl::ReadPixels::readPixels(), vl::Geometry::regenerateVertices(), vl::Applet::removedListenerEvent(), vl::DoubleVertexRemover::removeDoubles(), vl::Renderer::render(), vl::OcclusionCullRenderer::render(), vl::OcclusionCullRenderer::render_pass1(), vl::OcclusionCullRenderer::render_pass2(), vl::EdgeRenderer::renderLines(), vl::SceneManagerPortals::renderPortal(), vl::EdgeRenderer::renderSolids(), vl::DaeLoader::resources(), vl::StereoCamera::rightCamera(), vl::StereoCamera::rigthCamera(), vl::MarchingCubes::run(), vl::saveImage(), vl::saveJPG(), vl::savePNG(), vl::saveTGA(), vl::saveTIFF(), vl::saveVLB(), vl::VLXSerializer::saveVLB(), vl::saveVLT(), vl::VLXSerializer::saveVLT(), vl::Geometry::setColorArray(), vl::DaeLoader::setup_vl_Effect(), vl::VolumePlot::setupLabels(), vl::DaeLoader::setupLights(), vl::ShaderNode::shader(), vl::Shader::shallowCopyFrom(), vl::PolygonSimplifier::simplify(), vl::ZippedFileInfo::sourceZipFile(), vl::ZippedDirectory::sourceZipFile(), vl::Molecule::sticksStyle(), vl::TriangleStripGenerator::stripfy(), vl::Tessellator::tessellateGeometry(), vl::Texture::Texture(), vl::CopyTexSubImage3D::texture(), vl::CopyTexSubImage2D::texture(), vl::CopyTexSubImage1D::texture(), vl::VLXParserVLT::tokenizer(), vl::MultiDrawElements< arr_type >::triangleIterator(), vl::DrawRangeElements< ArrayUShort1 >::triangleIterator(), vl::DrawElements< ArrayUShort1 >::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>
const T* vl::ref< T >::operator-> (  ) const [inline]

Definition at line 296 of file Object.hpp.

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

Definition at line 297 of file Object.hpp.

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

Definition at line 299 of file Object.hpp.

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

Definition at line 300 of file Object.hpp.

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

Definition at line 301 of file Object.hpp.

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

Definition at line 303 of file Object.hpp.

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

Definition at line 305 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 v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:07.
Permission is granted to use this page to write and publish articles regarding Visualization Library.