PolyVox  0.3.0-dev
Open source voxel management library
Classes | Namespaces | Macros | Typedefs | Functions
ErrorHandling.h File Reference
#include "PolyVoxCore/Impl/Config.h"
#include <cstdlib>
#include <iostream>
#include <stdexcept>

Go to the source code of this file.

Classes

struct  PolyVox::StaticAssert< b >
 
struct  PolyVox::StaticAssert< true >
 

Namespaces

namespace  PolyVox
 Main namespace.
 

Macros

#define POLYVOX_HALT()   *((unsigned int*)0) = 0xDEAD
 
#define POLYVOX_MSC_WARNING_PUSH
 
#define POLYVOX_DISABLE_MSC_WARNING(x)
 
#define POLYVOX_MSC_WARNING_POP
 
#define POLYVOX_UNUSED(x)   do { (void)sizeof(x); } while(0)
 
#define POLYVOX_ASSERT(condition, message)
 
#define POLYVOX_STATIC_ASSERT(condition, message)   StaticAssert<(condition)>::ERROR_The_static_assertion_has_failed();
 
#define POLYVOX_THROW(type, message)
 

Typedefs

typedef void(* PolyVox::ThrowHandler )(std::exception &e, const char *file, int line)
 

Functions

ThrowHandler PolyVox::getThrowHandler ()
 
void PolyVox::setThrowHandler (ThrowHandler newHandler)
 

Macro Definition Documentation

#define POLYVOX_ASSERT (   condition,
  message 
)
Value:
/* We use the do...while(0) construct in our macros (for reasons see here: http://stackoverflow.com/a/154138) \
but Visual Studio gives unhelpful 'conditional expression is constant' warnings. The recommended solution \
(http://stackoverflow.com/a/1946485) is to disable these warnings. */ \
do { POLYVOX_UNUSED(condition); POLYVOX_UNUSED(message); } while(0) \
POLYVOX_MSC_WARNING_POP

Definition at line 90 of file ErrorHandling.h.

Referenced by PolyVox::Region::accumulate(), PolyVox::SurfaceMesh< VertexType >::addTriangle(), PolyVox::SurfaceMesh< VertexType >::addTriangleCubic(), PolyVox::BaseVolume< _VoxelType >::BaseVolume(), PolyVox::bilerp(), PolyVox::calculateAmbientOcclusion(), PolyVox::Block< VoxelType >::compress(), PolyVox::MinizCompressor::decompress(), PolyVox::extractSubset(), PolyVox::Array< noOfDims, ElementType >::getDimension(), PolyVox::Vector< Size, StorageType, OperationType >::getElement(), PolyVox::RawVolume< VoxelType >::getVoxel(), PolyVox::BaseVolume< _VoxelType >::getVoxel(), PolyVox::SimpleVolume< VoxelType >::getVoxel(), PolyVox::LargeVolume< VoxelType >::getVoxel(), PolyVox::ConstVolumeProxy< VoxelType >::getVoxelAt(), PolyVox::SimpleVolume< VoxelType >::Block::getVoxelAt(), PolyVox::Block< VoxelType >::getVoxelAt(), PolyVox::BaseVolume< _VoxelType >::Sampler< DerivedVolumeType >::getVoxelAt(), PolyVox::BaseVolume< _VoxelType >::getVoxelAt(), PolyVox::RawVolume< VoxelType >::getVoxelWithWrapping(), PolyVox::BaseVolume< _VoxelType >::getVoxelWithWrapping(), PolyVox::SimpleVolume< VoxelType >::getVoxelWithWrapping(), PolyVox::LargeVolume< VoxelType >::getVoxelWithWrapping(), PolyVox::Block< VoxelType >::initialise(), PolyVox::SimpleVolume< VoxelType >::Block::initialise(), PolyVox::LargeVolume< VoxelType >::LargeVolume(), PolyVox::lerp(), PolyVox::logBase2(), PolyVox::LowPassFilter< SrcVolumeType, DstVolumeType, AccumulationType >::LowPassFilter(), PolyVox::Vector< Size, StorageType, OperationType >::normalise(), PolyVox::RawVolume< VoxelType >::operator=(), PolyVox::SimpleVolume< VoxelType >::operator=(), PolyVox::BaseVolume< _VoxelType >::operator=(), PolyVox::LargeVolume< VoxelType >::operator=(), PolyVox::SubArray< noOfDims, ElementType >::operator[](), PolyVox::SubArray< 1, ElementType >::operator[](), PolyVox::Array< noOfDims, ElementType >::operator[](), PolyVox::Array< 1, ElementType >::operator[](), PolyVox::RawVolume< VoxelType >::RawVolume(), PolyVox::Array< noOfDims, ElementType >::resize(), PolyVox::Vector< Size, StorageType, OperationType >::setElement(), PolyVox::LargeVolume< VoxelType >::Sampler::setVoxel(), PolyVox::ConstVolumeProxy< VoxelType >::setVoxelAt(), PolyVox::Block< VoxelType >::setVoxelAt(), PolyVox::SimpleVolume< VoxelType >::Block::setVoxelAt(), PolyVox::BaseVolume< _VoxelType >::setVoxelAt(), PolyVox::SimpleVolume< VoxelType >::setVoxelAt(), PolyVox::LargeVolume< VoxelType >::setVoxelAt(), PolyVox::SimpleVolume< VoxelType >::SimpleVolume(), PolyVox::trilerp(), and PolyVox::Block< VoxelType >::uncompress().

#define POLYVOX_DISABLE_MSC_WARNING (   x)

Definition at line 51 of file ErrorHandling.h.

#define POLYVOX_HALT ( )    *((unsigned int*)0) = 0xDEAD

Definition at line 39 of file ErrorHandling.h.

#define POLYVOX_MSC_WARNING_POP

Definition at line 52 of file ErrorHandling.h.

#define POLYVOX_MSC_WARNING_PUSH

Definition at line 50 of file ErrorHandling.h.

#define POLYVOX_STATIC_ASSERT (   condition,
  message 
)    StaticAssert<(condition)>::ERROR_The_static_assertion_has_failed();
#define POLYVOX_THROW (   type,
  message 
)
#define POLYVOX_UNUSED (   x)    do { (void)sizeof(x); } while(0)

Definition at line 55 of file ErrorHandling.h.