Visualization Library 2.0.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The base class for all the reference counted objects. More...
#include <Object.hpp>
Public Member Functions | |
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... | |
Protected Member Functions | |
virtual | ~Object () |
Protected Attributes | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
The base class for all the reference counted objects.
See also vl::ref.
Definition at line 158 of file Object.hpp.
|
inline |
|
inline |
Copy constructor: copies the name, ref count mutex and user data.
Definition at line 181 of file Object.hpp.
References mObjectName, and mRefCountMutex.
|
protectedvirtual |
Definition at line 45 of file Object.cpp.
References automaticDelete(), vl::Log::bug(), mObjectName, and mReferenceCount.
|
inline |
Casts an Object to the specified class.
Definition at line 282 of file Object.hpp.
Referenced by vl::expandResourceDatabase(), vlX::VLXClassWrapper_Array::export_ArrayT(), vlX::VLXClassWrapper_ActorEventCallback::exportActorEventCallback(), vlX::VLXClassWrapper_DrawCall::exportDrawCall(), vlX::VLXClassWrapper_LODEvaluator::exportLODEvaluator(), vlX::VLXClassWrapper_Geometry::exportVLX(), vlX::VLXClassWrapper_DrawCall::exportVLX(), vlX::VLXClassWrapper_PatchParameter::exportVLX(), vlX::VLXClassWrapper_ResourceDatabase::exportVLX(), vlX::VLXClassWrapper_Uniform::exportVLX(), vlX::VLXClassWrapper_Shader::exportVLX(), vlX::VLXClassWrapper_LODEvaluator::exportVLX(), vlX::VLXClassWrapper_Effect::exportVLX(), vlX::VLXClassWrapper_Actor::exportVLX(), vlX::VLXClassWrapper_Camera::exportVLX(), vlX::VLXClassWrapper_Viewport::exportVLX(), vlX::VLXClassWrapper_Transform::exportVLX(), vlX::VLXClassWrapper_Light::exportVLX(), vlX::VLXClassWrapper_ClipPlane::exportVLX(), vlX::VLXClassWrapper_GLSLProgram::exportVLX(), vlX::VLXClassWrapper_GLSLShader::exportVLX(), vlX::VLXClassWrapper_VertexAttrib::exportVLX(), vlX::VLXClassWrapper_Color::exportVLX(), vlX::VLXClassWrapper_SecondaryColor::exportVLX(), vlX::VLXClassWrapper_Normal::exportVLX(), vlX::VLXClassWrapper_Material::exportVLX(), vlX::VLXClassWrapper_ActorEventCallback::exportVLX(), vlX::VLXClassWrapper_Texture::exportVLX(), vlX::VLXClassWrapper_TexParameter::exportVLX(), vlX::VLXClassWrapper_TextureSampler::exportVLX(), vl::Geometry::flipNormals(), vlX::VLXClassWrapper_ActorEventCallback::importActorEventCallback(), vlX::VLXClassWrapper_DrawCall::importDrawCall(), vlX::VLXClassWrapper_GLSLProgram::importGLSLProgram(), vlX::VLXClassWrapper_LODEvaluator::importLODEvaluator(), vlX::VLXClassWrapper_Transform::importTransform(), vl::Terrain::init(), vl::Applet::initialize(), vl::DaeLoader::load(), vlX::loadVLB(), vlX::loadVLT(), vl::DepthSortCallback::onActorRenderStarted(), vlX::VLXValue::setArray(), vl::Geometry::shrinkDrawCalls(), and vl::Geometry::sortVertices().
|
inline |
Casts an Object to the specified class.
Definition at line 286 of file Object.hpp.
|
inline |
If set to true the Object is deleted when its reference count reaches 0.
Definition at line 278 of file Object.hpp.
Referenced by ~Object().
|
inline |
Decrements the reference count of an object and deletes it if both automaticDelete() is true
the count reaches 0.
Definition at line 255 of file Object.hpp.
References vl::IMutex::lock(), vl::IMutex::unlock(), and VL_CHECK.
|
inline |
Increments the reference count of an object.
Definition at line 241 of file Object.hpp.
Referenced by vlX::VLXValue::setArrayInteger(), vlX::VLXValue::setArrayReal(), vlX::VLXValue::setList(), vlX::VLXValue::setRawtextBlock(), and vlX::VLXValue::setStructure().
|
inline |
The name of the object, by default set to the object's class name.
Definition at line 217 of file Object.hpp.
Referenced by vl::TextureSampler::apply(), vl::GLSLShader::compile(), vl::Image::convertFormat(), vl::Image::convertType(), vlX::VLXClassWrapper_Actor::exportActor(), vlX::VLXClassWrapper_Camera::exportCamera(), vlX::VLXClassWrapper_DrawCall::exportDrawCallBase(), vlX::VLXClassWrapper_Effect::exportEffect(), vlX::VLXClassWrapper_GLSLProgram::exportGLSLProgram(), vlX::VLXClassWrapper_Light::exportLight(), vlX::VLXClassWrapper_Material::exportMaterial(), vlX::VLXClassWrapper_Renderable::exportRenderable(), vlX::VLXClassWrapper_ResourceDatabase::exportResourceDatabase(), vlX::VLXClassWrapper_Shader::exportShader(), vlX::VLXClassWrapper_Texture::exportTexture(), vlX::VLXClassWrapper_Transform::exportTransform(), vlX::VLXClassWrapper_VertexAttrib::exportVertexAttrib(), vlX::VLXClassWrapper_Viewport::exportViewport(), vl::GLSLProgram::infoLog(), vl::MorphingCallback::init(), vl::GLSLProgram::linkProgram(), vl::DaeLoader::load(), vl::ObjLoader::loadOBJ(), vl::Image::print(), vl::GLSLProgram::programBinary(), vl::Renderer::renderRaw(), and vl::OpenGLContext::useGLSLProgram().
Copy operator: copies the object's name, ref count mutex and user data.
Definition at line 201 of file Object.hpp.
References mObjectName, and mRefCountMutex.
Referenced by vlX::VLXValue::~VLXValue().
|
inline |
The mutex used to protect the reference counting of an Object across multiple threads.
Definition at line 229 of file Object.hpp.
|
inline |
The mutex used to protect the reference counting of an Object across multiple threads.
Definition at line 232 of file Object.hpp.
|
inline |
Returns the number of references of an object.
Definition at line 235 of file Object.hpp.
|
inline |
If set to true the Object is deleted when its reference count reaches 0.
Definition at line 275 of file Object.hpp.
Referenced by vl::ActorTreeAbstract::ActorTreeAbstract(), vlMFC::MDIWindow::MDIWindow(), vlMFC::MFCWindow::MFCWindow(), vlQt4::Qt4Widget::Qt4Widget(), vlQt5::Qt5Widget::Qt5Widget(), vl::VectorGraphics::VectorGraphics(), and vlWX::WXGLCanvas::WXGLCanvas().
|
inline |
The name of the object, by default set to the object's class name in debug builds.
Definition at line 220 of file Object.hpp.
Referenced by vl::Image::convertFormat(), vl::Image::convertType(), vl::Texture::createTexture(), vl::DaeLoader::generateGeometry(), vl::Image::Image(), vlX::VLXClassWrapper_Actor::importActor(), vlX::VLXClassWrapper_Camera::importCamera(), vlX::VLXClassWrapper_DrawCall::importDrawCall(), vlX::VLXClassWrapper_Effect::importEffect(), vlX::VLXClassWrapper_GLSLProgram::importGLSLProgram(), vlX::VLXClassWrapper_Light::importLight(), vlX::VLXClassWrapper_Material::importMaterial(), vlX::VLXClassWrapper_Renderable::importRenderable(), vlX::VLXClassWrapper_ResourceDatabase::importResourceDatabase(), vlX::VLXClassWrapper_Shader::importShader(), vlX::VLXClassWrapper_Texture::importTexture(), vlX::VLXClassWrapper_Transform::importTransform(), vlX::VLXClassWrapper_VertexAttrib::importVertexAttrib(), vlX::VLXClassWrapper_Viewport::importViewport(), vl::DaeLoader::load(), vl::load3DS(), vl::loadAC3D(), vl::loadBMP(), vl::loadDDS(), vl::loadDICOM(), vl::loadImage(), vl::loadJPG(), vl::ObjLoader::loadOBJ(), vl::loadPNG(), vl::loadTGA(), vl::makeBox(), vl::makeCapsule(), vl::makeCircle(), vl::makeCone(), vl::makeCylinder(), vl::makeGrid(), vl::makeIcosahedron(), vl::makeIcosphere(), vl::makePoints(), vl::makePyramid(), vl::makeTorus(), vl::makeUVSphere(), vl::DaeLoader::parseEffects(), vl::DaeLoader::parseLight(), vl::GLSLShader::setSource(), and vl::DaeLoader::setupLights().
|
inline |
The name of the object, by default set to the object's class name in debug builds.
Definition at line 223 of file Object.hpp.
|
inline |
The mutex used to protect the reference counting of an Object across multiple threads.
Definition at line 226 of file Object.hpp.
|
protected |
Definition at line 304 of file Object.hpp.
|
protected |
Definition at line 300 of file Object.hpp.
Referenced by Object(), operator=(), vl::Image::reset(), and ~Object().
|
protected |
Definition at line 302 of file Object.hpp.
Referenced by Object(), and operator=().
|
mutableprotected |
Definition at line 303 of file Object.hpp.
Referenced by ~Object().
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:10.
© Copyright Michele Bosi. All rights reserved.