Visualization Library 2.1.0
A lightweight C++ OpenGL middleware for 2D/3D graphics
|
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Utility class to generate logs. More...
#include <Log.hpp>
Public Member Functions | |
Log () | |
Log & | operator<< (ELogLevel log_level) |
Log & | operator<< (const String &str) |
Log & | operator<< (const std::string &v) |
Log & | operator<< (const void *v) |
Log & | operator<< (const char *v) |
Log & | operator<< (char v) |
Log & | operator<< (unsigned char v) |
Log & | operator<< (short v) |
Log & | operator<< (unsigned short v) |
Log & | operator<< (int v) |
Log & | operator<< (unsigned int v) |
Log & | operator<< (long v) |
Log & | operator<< (unsigned long v) |
Log & | operator<< (long long v) |
Log & | operator<< (unsigned long long v) |
Log & | operator<< (double v) |
Log & | operator<< (float v) |
Public Member Functions inherited from vl::Object | |
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... | |
Static Public Member Functions | |
static void | setLogMutex (IMutex *mutex) |
The mutex used to synchronize concurrent calls to the log functions. More... | |
static IMutex * | logMutex () |
The mutex used to synchronize concurrent calls to the log functions. More... | |
static void | notify (const String &message) |
Important application message for the user. More... | |
static void | print (const String &message) |
Application message for the user. More... | |
static void | debug (const String &message) |
Use this function to provide extra information useful to investigate and solve problems. More... | |
static void | warning (const String &message) |
Use this function to provide information about situations that might lead to errors or loss of data. More... | |
static void | error (const String &message) |
Use this function to provide information about run-time errors: file not found, out of memory, OpenGL version too old etc. More... | |
static void | bug (const String &message) |
Use this function to provide information about programming errors: wrong parameter initialization, division by zero, imminent crash, inconsistent program state etc. More... | |
Protected Member Functions | |
virtual void | printImplementation (ELogLevel level, const String &message)=0 |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
Protected Attributes | |
ELogLevel | mLogLevel |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
|
inline |
Definition at line 50 of file Log.hpp.
References vl::LL_LogPrint.
|
static |
Use this function to provide information about programming errors: wrong parameter initialization, division by zero, imminent crash, inconsistent program state etc.
Synchronize log across threads.
Definition at line 175 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), vl::LL_LogBug, logMutex(), printImplementation(), SET_TEXT_COLOR_PURPLE, and vl::VEL_VERBOSITY_ERROR.
Referenced by vl::Viewport::activate(), vl::Camera::adjustView(), vl::Image::allocate1D(), vl::Image::allocate2D(), vl::Image::allocate3D(), vl::Image::allocateCubemap(), vl::TexParameter::apply(), vl::TexGen::apply(), vl::TextureImageUnit::apply(), vl::GLSLProgram::applyUniformSet(), vl::FBOTexture2DAttachment::bindAttachment(), vl::GLSLShader::compile(), vl::Camera::computeNearFarOptimizedProjMatrix(), vl::Texture::createTexture(), vl::glcheck(), vl::VisualizationLibrary::isCoreInitialized(), vl::GLSLProgram::linkProgram(), vl::FramebufferObject::printFramebufferError(), vl::GLSLProgram::programBinary(), vl::Renderer::renderRaw(), vl::TexParameter::setMagFilter(), vl::Texture::setMipLevel(), vl::Texture::Texture(), vl::OpenGLContext::useGLSLProgram(), and vl::Object::~Object().
|
static |
Use this function to provide extra information useful to investigate and solve problems.
Synchronize log across threads.
Definition at line 145 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), vl::LL_LogDebug, logMutex(), printImplementation(), SET_TEXT_COLOR_BLUE, and vl::VEL_VERBOSITY_DEBUG.
Referenced by vlWin32::choosePixelFormat(), vl::Geometry::computeBounds_Implementation(), vlX::VLXClassWrapper_Renderable::exportRenderable(), vlX::VLXClassWrapper_ResourceDatabase::exportResourceDatabase(), vlX::VLXClassWrapper_Shader::exportShader(), vl::Image::isValid(), vl::LoadWriterManager::loadResource(), vl::loadTGA(), vl::OpenGLContext::logOpenGLInfo(), vl::Geometry::mergeDrawCallsWithMultiDrawElements(), vl::Geometry::mergeDrawCallsWithPrimitiveRestart(), and vl::DoubleVertexRemover::removeDoubles().
|
static |
Use this function to provide information about run-time errors: file not found, out of memory, OpenGL version too old etc.
Synchronize log across threads.
Definition at line 165 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), vl::LL_LogError, logMutex(), printImplementation(), SET_TEXT_COLOR_RED, and vl::VEL_VERBOSITY_ERROR.
Referenced by vl::ActorTree::addChild(), vl::EdgeExtractor::addEdge(), vl::MemoryDirectory::addFile(), vl::PlyLoader::analyzeHeader(), vl::Material::apply(), vl::OpenGLContext::applyEnables(), vl::OpenGLContext::areUniformsColliding(), vl::FramebufferObject::bindDrawBuffers(), vl::FramebufferObject::bindFramebuffer(), vl::FramebufferObject::checkDrawBuffers(), vl::FramebufferObject::checkFramebufferStatus(), vl::ActorKdTree::child(), vlWin32::choosePixelFormat(), vl::GZipCodec::close(), vl::GLSLShader::compile(), vl::Portal::computeNormal(), vl::Image::contrast(), vl::Image::convertFormat(), vl::Image::convertType(), vl::CopyTexSubImage3D::copyPixels(), vl::createCubemap(), vl::Texture::createTexture(), vlX::VisitorLinkMapper::declareID(), vl::DiskDirectory::diskSubDir(), vl::Image::equalize(), vl::DiskDirectory::exists(), vl::QtDirectory::exists(), vlX::VLXClassWrapper_DrawCall::exportDrawCall(), vlX::VLXClassWrapper_Uniform::exportUniform(), vlX::VLXSerializer::exportVLX(), vl::ZippedFile::extract(), vl::AdjacencyExtractor::extract(), vl::EdgeExtractor::extractEdges(), vl::Extrusion::extrude(), vl::Extrusions::extrude(), vl::GZipCodec::fillUncompressedBuffer(), vl::ZippedFile::fillUncompressedBuffer(), vl::String::filterStrings(), vl::FontManager::FontManager(), vl::String::fromUTF16(), vl::RaycastVolume::generateTextureCoordinates(), vl::SlicedVolume::generateTextureCoordinates(), vl::genRGBAVolume(), vl::PlyLoader::PlyScalar::getAsFloat(), vl::PlyLoader::PlyScalar::getAsInt(), vl::DaeLoader::getSource(), vlX::VLTTokenizer::getToken(), vlX::VLXClassWrapper_Geometry::importGeometry(), vlX::VLXClassWrapper_Uniform::importUniform(), vlX::VLXClassWrapper_Array::importVLX(), vlX::VLXSerializer::importVLX(), vl::MorphingCallback::init(), vl::Terrain::init(), vl::ZippedDirectory::init(), vl::OpenGLContext::initGLContext(), vl::TriangleIteratorIndexed< TArray >::initialize(), vl::SceneManagerPortals::initialize(), vl::initializeOpenGL(), vlSDL::SDLWindow::initSDLWindow(), vl::FBORenderbufferAttachment::initStorage(), vlWin32::Win32Context::initWin32GLContext(), vl::OpenGLContext::isCleanState(), vlX::VisitorLinker::link(), vl::DiskDirectory::listFiles(), vl::QtDirectory::listFiles(), vl::MemoryDirectory::listFiles(), vl::ZippedDirectory::listFiles(), vl::MemoryDirectory::listFilesRecursive(), vl::ZippedDirectory::listFilesRecursive(), vl::DiskDirectory::listSubDirs(), vl::QtDirectory::listSubDirs(), vl::MemoryDirectory::listSubDirs(), vl::ZippedDirectory::listSubDirs(), vl::DaeLoader::load(), vl::VirtualFile::load(), vl::LoadWriterDae::load(), vl::load3DS(), vl::loadAC3D(), vl::loadBMP(), vl::loadCubemap(), vl::loadDAT(), vl::loadDDS(), vl::loadDICOM(), vl::loadImage(), vl::DaeLoader::loadImages(), vl::loadJPG(), vl::loadMD2(), vl::loadMHD(), vl::loadMOL2(), vl::loadOBJ(), vl::ObjLoader::loadOBJ(), vl::ObjLoader::loadObjMaterials(), vl::loadPLY(), vl::loadPNG(), vl::loadRAW(), vl::LoadWriterManager::loadResource(), vl::loadSTL(), vl::String::loadText(), vl::loadTGA(), vl::loadTIFF(), vlX::loadVLB(), vlX::loadVLT(), vlEGL::EGLWindow::makeCurrent(), vl::Geometry::makeGLESFriendly(), vl::MemoryDirectory::memorySubDir(), vl::GZipCodec::open(), vl::MemoryFile::open(), vl::QtFile::open(), vl::DiskFile::open(), vl::ZippedFile::open(), vlX::ParserVLT::parse(), vlX::ParserVLB::parse(), vl::A3DSLoader::parse3DS(), vl::DaeLoader::parseEffects(), vl::DaeLoader::parseGeometry(), vlX::ParserVLT::parseHeader(), vl::ObjTexture::parseLine(), vl::DaeLoader::parseNode(), vlX::ParserVLT::parseStructure(), vl::VirtualFile::peek(), vl::VectorGraphics::popMatrix(), vl::VectorGraphics::popScissor(), vl::VectorGraphics::popState(), vl::QtFile::position_Implementation(), vl::DiskFile::position_Implementation(), vl::QtDirectory::qtSubDir(), vl::Text::rawboundingRect(), vl::CoreText::rawboundingRect(), vl::PlyLoader::PlyScalar::read(), vl::A3DSLoader::read_3D_EDITOR_CHUNK(), vl::QtFile::read_Implementation(), vl::DiskFile::read_Implementation(), vl::GZipCodec::read_Implementation(), vl::A3DSLoader::read_MATERIAL_BLOCK(), vl::A3DSLoader::read_OBJECT_BLOCK(), vl::A3DSLoader::read_TRIANGULAR_MESH(), vl::A3DSLoader::readColChunk(), vl::PlyLoader::readHeader(), vl::A3DSLoader::readMapChunk(), vl::ReadPixels::readPixels(), vl::OcclusionCullRenderer::render(), vl::Rendering::render(), vl::DrawArrays::render(), vl::MultiDrawElements< ArrayUShort1 >::render(), vl::DrawElements< ArrayUShort1 >::render(), vl::Clear::render_Implementation(), vl::OcclusionCullRenderer::render_pass1(), vl::Renderer::renderRaw(), vl::Text::renderText(), vl::CoreText::renderText(), vl::BezierPatch::resize(), vl::saveDICOM(), vl::saveImage(), vl::saveJPG(), vl::savePNG(), vl::saveTGA(), vl::saveTIFF(), vlX::saveVLB(), vlX::saveVLT(), vlX::VLXSerializer::saveVLT(), vl::VirtualFile::seekSet(), vl::QtFile::seekSet_Implementation(), vl::DiskFile::seekSet_Implementation(), vl::GZipCodec::seekSet_Implementation(), vl::ActorTree::setChild(), vl::Texture::setMipLevel(), vl::MemoryDirectory::setPath(), vl::ZippedDirectory::setPath(), vl::VirtualDirectory::setPath(), vl::GLSLShader::setSource(), vl::DaeLoader::setup_vl_Effect(), vlX::VLXSerializer::signalExportError(), vlX::VLXSerializer::signalImportError(), vl::PolygonSimplifier::simplify(), vl::DiskFile::size(), vl::A3DSLoader::skipChunk(), vl::Geometry::sortVertices(), vl::Image::substituteColorGreenKey(), vl::Image::substituteColorRGB_RGB(), vl::Image::substituteColorRGB_RGBA(), vl::Texture::supports(), vlEGL::EGLWindow::swapBuffers(), vl::Tessellator::tessBeginData(), vl::Tessellator::tessellate(), vl::Tessellator::tessError(), vl::Tessellator::tessVertexData(), vl::Texture::Texture(), vl::PlyLoader::translateType(), vl::MarchingCubes::updateAlpha(), vl::MarchingCubes::updateColor(), vl::KeyValues::value(), vlX::vlx_EClearColorMode(), vlX::vlx_EClearFlags(), vlX::vlx_EColorMaterial(), vlX::vlx_EDepthTextureMode(), vlX::vlx_EEnable(), vlX::vlx_EPolygonFace(), vlX::vlx_EPrimitiveType(), vlX::vlx_EProjectionMatrixType(), vlX::vlx_ETexCompareFunc(), vlX::vlx_ETexCompareMode(), vlX::vlx_ETexParamFilter(), vlX::vlx_ETexParamWrap(), vlX::vlx_ETextureDimension(), vlX::vlx_ETextureFormat(), vlX::vlx_EUniformType(), vlX::vlx_EVertexAttribInterpretation(), vlX::vlx_mat4(), vl::QtFile::write_Implementation(), vl::DiskFile::write_Implementation(), vl::GZipCodec::write_Implementation(), vl::LoadWriterManager::writeResource(), vl::ZippedDirectory::ZippedDirectory(), and vl::ZippedDirectory::zippedSubDir().
|
inlinestatic |
The mutex used to synchronize concurrent calls to the log functions.
Definition at line 175 of file Log.hpp.
References vl::defLogger(), vl::setDefLogger(), and VLCORE_EXPORT.
Referenced by bug(), debug(), error(), notify(), print(), and warning().
|
static |
Important application message for the user.
The message will be printed with an hightlighed color.
Synchronize log across threads.
Definition at line 126 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), vl::LL_LogNotify, logMutex(), printImplementation(), SET_TEXT_COLOR_GREEN, and vl::VEL_VERBOSITY_SILENT.
Definition at line 58 of file Log.hpp.
References vl::LL_LogBug, vl::LL_LogDebug, vl::LL_LogError, vl::LL_LogNotify, vl::LL_LogPrint, and vl::LL_LogWarning.
|
inline |
Definition at line 72 of file Log.hpp.
References vl::String::fromStdString().
|
inline |
Definition at line 78 of file Log.hpp.
References vl::String::fromPointer().
|
inline |
Definition at line 96 of file Log.hpp.
References vl::String::fromUInt().
|
inline |
Definition at line 102 of file Log.hpp.
References vl::String::fromInt().
|
inline |
Definition at line 108 of file Log.hpp.
References vl::String::fromUInt().
|
inline |
Definition at line 114 of file Log.hpp.
References vl::String::fromInt().
|
inline |
Definition at line 120 of file Log.hpp.
References vl::String::fromUInt().
|
inline |
Definition at line 126 of file Log.hpp.
References vl::String::fromLongLong().
|
inline |
Definition at line 132 of file Log.hpp.
References vl::String::fromULongLong().
|
inline |
Definition at line 138 of file Log.hpp.
References vl::String::fromLongLong().
|
inline |
Definition at line 144 of file Log.hpp.
References vl::String::fromULongLong().
|
inline |
Definition at line 150 of file Log.hpp.
References vl::String::fromDouble().
|
inline |
Definition at line 156 of file Log.hpp.
References vl::String::fromDouble().
|
static |
Application message for the user.
Synchronize log across threads.
Definition at line 136 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), vl::LL_LogPrint, logMutex(), printImplementation(), and vl::VEL_VERBOSITY_SILENT.
Referenced by vlSDL::SDLWindow::initSDLWindow(), vl::Applet::keyReleaseEvent(), vl::loadMD2(), vl::ObjLoader::loadOBJ(), vl::logSystemInfo(), vl::A3DSLoader::parse3DS(), vl::KeyValues::print(), vl::ObjTexture::print(), vl::readPixels(), vl::GZipCodec::seekSet_Implementation(), and vl::PolygonSimplifier::simplify().
|
inlinestatic |
|
static |
Use this function to provide information about situations that might lead to errors or loss of data.
Synchronize log across threads.
Definition at line 155 of file Log.cpp.
References vl::defLogger(), vl::globalSettings(), vl::LL_LogWarning, logMutex(), printImplementation(), SET_TEXT_COLOR_YELLOW, and vl::VEL_VERBOSITY_ERROR.
Referenced by vl::DrawCall::applyPatchParameters(), vl::GLSLProgram::applyUniformSet(), vl::Renderable::boundingBox(), vl::Renderable::boundingSphere(), vl::GLSLShader::compile(), vl::Geometry::computeNormals(), vl::LoadWriterManager::findLoader(), vl::LoadWriterManager::findWriter(), vl::DaeLoader::generateGeometry(), vlX::VLXClassWrapper_GLSLShader::importGLSLShader(), vl::initializeOpenGL(), vl::isDDS(), vl::isTGA(), vl::GLSLProgram::linkProgram(), vl::MemoryDirectory::listFilesRecursive(), vl::ZippedDirectory::listFilesRecursive(), vl::loadDDS(), vl::ObjLoader::loadOBJ(), vl::GLSLProgram::programBinary(), vl::DrawArrays::render(), vl::DrawElements< ArrayUShort1 >::render(), vl::Texture::setMipLevel(), vl::MemoryDirectory::setPath(), vl::ZippedDirectory::setPath(), vl::PolygonSimplifier::simplify(), vl::Geometry::sortVertices(), vl::Tessellator::tessellate(), vlX::VisitorIDCounter::visitList(), vlX::VisitorLinkMapper::visitList(), vlX::VisitorLinker::visitList(), vlX::VisitorExportToVLB::visitList(), vlX::VisitorExportToVLT::visitList(), vl::OpenGLContext::~OpenGLContext(), and vl::Transform::~Transform().
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:52.
© Copyright Michele Bosi. All rights reserved.