Loki  0.1.7
Loki::SmallValueObject< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy > Class Template Reference

#include <SmallObj.h>

Inheritance diagram for Loki::SmallValueObject< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >:
Collaboration diagram for Loki::SmallValueObject< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >:

Additional Inherited Members

- Public Types inherited from Loki::SmallObjectBase< ::Loki::SingleThreaded, 4096, 256, 4, ::Loki::LongevityLifetime::DieAsSmallObjectParent, ::Loki::Mutex >
typedef AllocatorSingleton< ::Loki::SingleThreaded, chunkSize, maxSmallObjectSize, objectAlignSize, ::Loki::LongevityLifetime::DieAsSmallObjectParentObjAllocatorSingleton
 
- Static Public Member Functions inherited from Loki::SmallObjectBase< ::Loki::SingleThreaded, 4096, 256, 4, ::Loki::LongevityLifetime::DieAsSmallObjectParent, ::Loki::Mutex >
static void * operator new (std::size_t size) throw ( std::bad_alloc )
 Throwing single-object new throws bad_alloc when allocation fails.
 
static void * operator new (std::size_t size, const std::nothrow_t &) throw ()
 Non-throwing single-object new returns NULL if allocation fails.
 
static void * operator new (std::size_t size, void *place)
 Placement single-object new merely calls global placement new.
 
static void operator delete (void *p, std::size_t size) throw ()
 Single-object delete.
 
static void operator delete (void *p, const std::nothrow_t &) throw ()
 
static void operator delete (void *p, void *place)
 Placement single-object delete merely calls global placement delete.
 

Detailed Description

template<template< class, class > class ThreadingModel = ::Loki::SingleThreaded, std::size_t chunkSize = 4096, std::size_t maxSmallObjectSize = 256, std::size_t objectAlignSize = 4, template< class > class LifetimePolicy = ::Loki::LongevityLifetime::DieAsSmallObjectParent, class MutexPolicy = ::Loki::Mutex>
class Loki::SmallValueObject< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy, MutexPolicy >

SmallValueObject Base class for small objects with value-type semantics - offers fast allocations & deallocations. Destructor is non-virtual, inline, and protected to prevent unintentional destruction through base class. Default constructor is trivial. Copy-constructor and copy-assignment operator are trivial since value-types almost always need those operations. Class has no data members so compilers can use Empty-Base-Optimization.


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