Loki  0.1.7
Checker.h File Reference
#include <exception>
#include <assert.h>
Include dependency graph for Checker.h:

Classes

class  Loki::CheckForNoThrow< Host >
 
class  Loki::CheckForNoChange< Host >
 
class  Loki::CheckForNoChangeOrThrow< Host >
 
class  Loki::CheckForEquality< Host >
 
class  Loki::CheckForNothing< Host >
 
class  Loki::ContractChecker< Host, ExceptionPolicy >
 
class  Loki::CheckStaticForNoThrow
 
class  Loki::CheckStaticForNothing
 
class  Loki::StaticChecker< ExceptionPolicy >
 

Namespaces

 Loki
 

Detailed Description

This file provides Loki's Checker facility.

Loki::LockedStorage::ReferenceType
T & ReferenceType
type returned by operator->
Definition: SmartPtr.h:288
Loki::SmallObjectBase::ObjAllocatorSingleton
AllocatorSingleton< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy > ObjAllocatorSingleton
Definition: SmallObj.h:445
Loki::operator!=
bool operator!=(const SmartPtr< T, OP, CP, KP, SP, CNP > &lhs, U *rhs)
Definition: SmartPtr.h:1570
Loki::LevelMutexInfo
Definition: LevelMutex.h:148
LevelMutex.h
Loki::Functor
Definition: Functor.h:1220
Loki::FunctionStorage::ReferenceType
T & ReferenceType
type returned by operator*
Definition: SPCachedFactory.h:72
Loki::ScopeGuardImpl0
Definition: ScopeGuard.h:109
Loki::JustReturnMutexError
Definition: LevelMutex.h:469
Loki::MutexException::operator=
MutexException & operator=(const MutexException &that)
Copy-assignment operator performs a member-by-member copy of an exception.
Definition: LevelMutex.cpp:974
Loki::FunctionStorage
Implementation of the StoragePolicy used by SmartPtr.
Definition: SPCachedFactory.h:63
Loki::HeapStorage::ReferenceType
T & ReferenceType
type returned by operator->
Definition: SmartPtr.h:77
Loki::ArrayStorage
Definition: SmartPtr.h:361
Loki::RateLimitedCreation
Limit in rate.
Definition: CachedFactory.h:163
Loki::SingletonWithLongevity
Definition: Singleton.h:497
Loki::ContractChecker::~ContractChecker
~ContractChecker(void)
Definition: Checker.h:311
Loki::StrongPtr::GreaterThan
bool GreaterThan(const T1 *p) const
Helper function which can be called to avoid exposing GetPointer function.
Definition: StrongPtr.h:1180
Loki::FixedAllocator::HasBlock
const Chunk * HasBlock(void *p) const
Definition: SmallObj.cpp:722
Loki::MutexException::GetLevel
unsigned int GetLevel(void) const
Returns level of mutex(es) used when problem occurred.
Definition: LevelMutex.h:1036
Loki::EvictRandom
Evicts a random object.
Definition: CachedFactory.h:486
Loki::CloneFactory
Creates a copy from a polymorphic object.
Definition: Factory.h:1041
Loki::SafeBitConst::operator<<
const SafeBitConst operator<<(unsigned int s) const
Definition: SafeBits.h:225
Loki::ThrowOnBadDesignMutexError
Definition: LevelMutex.h:415
Loki::SafeBitField::SafeBitField
SafeBitField(const const_t &rhs)
Copy constructor and assignment operators from constant bit fields.
Definition: SafeBits.h:312
Loki::GetOffset
std::size_t GetOffset(std::size_t numBytes, std::size_t alignment)
Definition: SmallObj.cpp:1013
Loki::CheckStaticForNoThrow
Definition: Checker.h:373
Loki::HeapStorage::PointerType
T * PointerType
type used to declare OwnershipPolicy type.
Definition: SmartPtr.h:76
Loki::LevelMutexInfo::UnlockedLevel
static const unsigned int UnlockedLevel
Definition: LevelMutex.h:154
Loki::NeverCreate
Never allows creation. Testing purposes only.
Definition: CachedFactory.h:109
Loki::ScopeGuardImpl4
Definition: ScopeGuard.h:303
Loki::MutexException::GetReason
MutexErrors::Type GetReason(void) const
Returns an error status for why operation failed.
Definition: LevelMutex.h:1039
Loki::DeleteUsingFree
Definition: StrongPtr.h:128
Loki::COMRefCounted
Definition: SmartPtr.h:576
Loki::LongevityLifetime::DieDirectlyBeforeLast
Lifetime is a one less than DieLast: 0xFFFFFFFF-1.
Definition: Singleton.h:577
Loki::StrongPtr::LessThan
bool LessThan(const T1 *p) const
Helper function which can be called to avoid exposing GetPointer function.
Definition: StrongPtr.h:1173
Loki::LevelMutex::GetMutexPolicy
const volatile MutexPolicy & GetMutexPolicy(void) const volatile
Definition: LevelMutex.h:778
Loki::StaticChecker::Check
bool Check(void) const
Definition: Checker.h:481
Loki::FunctionStorage::FunctorType
Functor< void, Seq< void * > > FunctorType
type of the Functor to set
Definition: SPCachedFactory.h:74
Loki::LevelMutexInfo::IsLockedByCurrentThread
bool IsLockedByCurrentThread(void) const volatile
Returns true if this was locked by current thread.
Definition: LevelMutex.cpp:575
Loki::operator>=
bool operator>=(const SmartPtr< T, OP, CP, KP, SP, CNP > &lhs, U *rhs)
Definition: SmartPtr.h:1726
Loki::SafeBitConst::size
static size_t size()
Word size is also the maximum number of different bit fields for a given word type.
Definition: SafeBits.h:229
Loki::FixedAllocator
Definition: SmallObj.cpp:171
Loki::StaticChecker::StaticChecker
StaticChecker(Validator validator, Validator pre=0, Validator post=0)
Definition: Checker.h:449
Loki::SafeBitField::operator|
SafeBitField operator|(const SafeBitField &rhs) const
Bitwise operations that use bit-fields.
Definition: SafeBits.h:332
Loki::MultiMutexLocker::Unlock
bool Unlock(void)
Definition: LevelMutex.cpp:1138
Loki::SafeBitField::SafeBitField
SafeBitField()
Default constructor allows client code to construct bit fields on the stack.
Definition: SafeBits.h:305
Loki::DontPropagateConst
Definition: ConstPolicy.h:37
Loki::EvictAging
LRU aware of the time span of use.
Definition: CachedFactory.h:410
Loki::Forbidden_conversion
Definition: SafeBits.h:117
Loki::LevelMutexInfo::MutexUndoer
Definition: LevelMutex.h:299
LongevityLifetime
In this namespace are special lifetime policies to manage lifetime dependencies.
Loki::SingleThreaded
Definition: Threads.h:361
Loki::CheckForNothing
Definition: Checker.h:220
Loki::SmallValueObject
Definition: SmallObj.h:632
Loki::LevelMutexInfo::IsValid
bool IsValid(void) const volatile
Definition: LevelMutex.cpp:545
Loki::ScopeGuardImpl2
Definition: ScopeGuard.h:204
Loki::LockingPtr
Definition: LockingPtr.h:42
Loki::CachedFactory::ReleaseObject
void ReleaseObject(ProductReturn &object)
Use this function to release the object.
Definition: CachedFactory.h:1140
Loki::CheckForNoChange
Definition: Checker.h:117
Loki::LokiAllocator::rebind
Convert an allocator<Type> to an allocator <Type1>.
Definition: Allocator.h:69
Loki::LongevityLifetime::SingletonFixedLongevity
Definition: Singleton.h:551
Loki::ScopeGuardImplBase::ScopeGuardImplBase
ScopeGuardImplBase(const ScopeGuardImplBase &other)
Copy-constructor takes over responsibility from other ScopeGuard.
Definition: ScopeGuard.h:54
Loki::ScopeGuardImplBase
Definition: ScopeGuard.h:44
Loki::RejectNullStatic
Definition: SmartPtr.h:941
Loki::SmallObjAllocator
Definition: SmallObj.h:87
Loki::CreateUsing
Definition: Singleton.h:249
Loki::MutexException
Definition: LevelMutex.h:1015
Loki::ClassLevelLockable
Definition: Threads.h:523
Loki::LockedStorage
Definition: SmartPtr.h:282
Loki::MutexLocker::IsLocked
bool IsLocked(void) const
Returns true if the mutex is locked by this object.
Definition: LevelMutex.h:1108
Loki::RefToValue
Definition: RefToValue.h:32
Loki::AllocatorSingleton::~AllocatorSingleton
~AllocatorSingleton(void)
The destructor is not meant to be called directly.
Definition: SmallObj.h:249
Loki::TwoRefLinks
Definition: StrongPtr.h:778
Loki::CyclicVisitor
Definition: Visitor.h:327
Loki::AssertCheck
Definition: SmartPtr.h:851
Loki::Singleton
Definition: Singleton.h:865
Loki::SleepLevelMutex::Lock
virtual MutexErrors::Type Lock(void) volatile
Definition: LevelMutex.cpp:935
Loki::AllocatorSingleton::ClearExtraMemory
static void ClearExtraMemory(void)
Definition: SmallObj.h:287
Loki::SafeBitConst::bit_word_t
word_t bit_word_t
Type of the bit field is available if needed.
Definition: SafeBits.h:152
Loki::SingletonHolder::ObjectType
T ObjectType
Type of the singleton object.
Definition: Singleton.h:730
Loki::LokiAllocator::deallocate
void deallocate(pointer p, size_type size)
Ask allocator to release memory at pointer with size bytes.
Definition: Allocator.h:95
Loki::Visitor
Definition: Visitor.h:126
Loki::StrongPtr::operator==
bool operator==(const StrongPtr< T1, S1, OP1, CP1, KP1, RP1, DP1, CNP1 > &rhs) const
Equality comparison operator is templated to handle ambiguity.
Definition: StrongPtr.h:1197
Loki::DeleteUsingFree::Default
static P * Default(void)
Provides default value to initialize the pointer.
Definition: StrongPtr.h:140
Loki::LokiAllocator::destroy
void destroy(pointer p)
Destruct the object at pointer.
Definition: Allocator.h:118
Loki::ClassLevelLockable::Lock::~Lock
~Lock()
Unlock class.
Definition: Threads.h:575
Loki::SafeBitConst
Definition: SafeBits.h:148
Loki::SleepLevelMutex
Definition: LevelMutex.h:579
Loki::ObjectLevelLockable
Definition: Threads.h:456
Loki::SafeBitConst::SafeBitConst
SafeBitConst()
Default constructor allows client code to construct bit fields on the stack.
Definition: SafeBits.h:190
Loki::DefaultSPStorage
Definition: SmartPtr.h:154
Loki::PhoenixSingleton
Definition: Singleton.h:371
Loki::SleepLevelMutex::SleepLevelMutex
SleepLevelMutex(unsigned int level)
Loki::Private::TwoRefCountInfo
Definition: StrongPtr.h:319
Loki::UnRegisterOnDeleteSet
Definition: Register.h:98
Loki::DisallowConversion
Definition: SmartPtr.h:796
Loki::FollowIntoDeath::AfterMaster::IsDestroyed
Definition: Singleton.h:683
Loki::SafeBitField::operator==
bool operator==(const SafeBitField &rhs) const
These comparison operators act on bit-fields of the same type.
Definition: SafeBits.h:316
Loki::Mutex
Definition: Threads.h:325
Loki::DefaultSPStorage::PointerType
T * PointerType
type used to declare OwnershipPolicy type.
Definition: SmartPtr.h:158
Loki::SmartPtr
Definition: SmartPtr.h:1063
Loki::StaticChecker::~StaticChecker
~StaticChecker(void)
Definition: Checker.h:465
Loki::SmallObject
Definition: SmallObj.h:596
Loki::CreateStatic
Definition: Singleton.h:305
Loki::FixedAllocator::~FixedAllocator
~FixedAllocator()
Destroy the FixedAllocator and release all its Chunks.
Definition: SmallObj.cpp:558
Loki::CantResetWithStrong
Definition: StrongPtr.h:247
Loki::DestructiveCopy
Definition: SmartPtr.h:708
Loki::FollowIntoDeath::With
Definition: Singleton.h:648
Loki::ObjScopeGuardImpl2
Definition: ScopeGuard.h:536
Loki::MultiMutexLocker::IsLocked
bool IsLocked(void) const
Returns true if the mutexes are locked by this object.
Definition: LevelMutex.h:1186
Loki::FixedAllocator::TrimChunkList
bool TrimChunkList(void)
Definition: SmallObj.cpp:781
Loki::HeapStorage::HeapStorage
HeapStorage()
type returned by operator*
Definition: SmartPtr.h:79
Loki::operator==
bool operator==(const LokiAllocator< Type > &, const LokiAllocator< Type > &)
Definition: Allocator.h:135
LockableTwoRefCountInfo
Loki::SetLongevity
void SetLongevity(T *pDynObject, unsigned int longevity, Destroyer d)
Definition: Singleton.h:148
Loki::LevelMutexInfo::TryLock
virtual MutexErrors::Type TryLock(void) volatile=0
Loki::LokiAllocator::~LokiAllocator
~LokiAllocator()
Destructor does nothing.
Definition: Allocator.h:64
Loki::FixedAllocator::CountEmptyChunks
std::size_t CountEmptyChunks(void) const
Definition: SmallObj.cpp:586
Loki::LevelMutexInfo::DecrementCount
void DecrementCount(void) volatile
Called to unlock a mutex locked multiple times by the current thread.
Definition: LevelMutex.cpp:566
Loki::StaticChecker
Definition: Checker.h:434
Loki::AlwaysCreate
Always allows creation.
Definition: CachedFactory.h:134
Loki::Factory
Definition: Factory.h:753
Loki::LevelMutex::Lock
virtual MutexErrors::Type Lock(unsigned int milliSeconds) volatile
Definition: LevelMutex.h:825
Loki::ConstPropPtr
Definition: Pimpl.h:41
Loki::ClassLevelLockable::Lock::Lock
Lock(const ClassLevelLockable *)
Lock class.
Definition: Threads.h:568
Loki::DeleteSingle
Definition: StrongPtr.h:184
Loki::GetLongevity
unsigned int GetLongevity(AllocatorSingleton< T, C, M, O, L, X > *)
Definition: SmallObj.h:331
Loki::FollowIntoDeath
Definition: Singleton.h:607
Loki::MutexLocker::Unlock
bool Unlock(void)
Definition: LevelMutex.cpp:1059
Loki::ObjScopeGuardImpl0
Definition: ScopeGuard.h:411
Loki::LevelMutexInfo::MutexContainer
::std::vector< volatile LevelMutexInfo * > MutexContainer
Container for locking multiple mutexes at once.
Definition: LevelMutex.h:157
Loki::LevelMutex::~LevelMutex
~LevelMutex(void)
The destructor.
Definition: LevelMutex.h:767
Loki::FixedAllocator::IsCorrupt
bool IsCorrupt(void) const
Definition: SmallObj.cpp:607
Loki::ByRef
RefToValue< T > ByRef(T &t)
Definition: RefToValue.h:61
Loki::LevelMutexInfo::GetPrevious
const volatile LevelMutexInfo * GetPrevious(void) const volatile
Returns pointer to mutex previously locked by the thread which locked this.
Definition: LevelMutex.h:217
Loki::HeapStorage::InitPointerType
T * InitPointerType
the type of the pointee_ object
Definition: SmartPtr.h:75
Loki::LokiAllocator::address
const_pointer address(const_reference elem) const
Return address of reference to const element.
Definition: Allocator.h:77
Loki::DefaultAllocator
void * DefaultAllocator(std::size_t numBytes, bool doThrow)
Definition: SmallObj.cpp:1028
std
Definition: SmartPtr.h:1757
Loki::CachedFactory::RegisteredIds
std::vector< IdentifierType > & RegisteredIds()
Return the registered ID in this Factory.
Definition: CachedFactory.h:860
Loki::SmallObjAllocator::~SmallObjAllocator
~SmallObjAllocator(void)
Definition: SmallObj.cpp:1078
Loki::operator<=
bool operator<=(const SmartPtr< T, OP, CP, KP, SP, CNP > &lhs, U *rhs)
Definition: SmartPtr.h:1688
Loki::LevelMutexInfo::LevelMutexInfo
LevelMutexInfo(unsigned int level)
Definition: LevelMutex.cpp:526
Loki::CheckForEquality
Definition: Checker.h:187
Loki::RegisterFunction
bool RegisterFunction()
Loki::LevelMutexInfo::MultiUnlock
static MutexErrors::Type MultiUnlock(MutexContainer &mutexes)
Definition: LevelMutex.cpp:479
Loki::StrongPtr::Merge
bool Merge(StrongPtr< T1, S1, OP1, CP1, KP1, RP1, DP1, CNP1 > &rhs)
Definition: StrongPtr.h:1115
Loki::SmallObjAllocator::TrimExcessMemory
bool TrimExcessMemory(void)
Definition: SmallObj.cpp:1088
Loki::MultiMutexLocker
Definition: LevelMutex.h:1140
Loki::LockingPtr::~LockingPtr
~LockingPtr()
Destructor unlocks the mutex.
Definition: LockingPtr.h:71
Loki::LevelMutexInfo::IsValidList
static bool IsValidList(void)
Definition: LevelMutex.cpp:275
Loki::LockedStorage::LockedStorage
LockedStorage()
type returned by operator*
Definition: SmartPtr.h:290
Loki::LevelMutex::Unlock
virtual MutexErrors::Type Unlock(void) volatile
Definition: LevelMutex.h:861
Loki::Function
Definition: Function.h:45
Loki::NullPointerException
Definition: SmartPtr.h:924
Loki::ContractChecker::Validator
bool(Host::* Validator)(void) const
Signature for the validation function.
Definition: Checker.h:285
Loki::LongevityLifetime::DieAsSmallObjectChild
Definition: SmallObj.h:74
Loki::LevelMutexInfo::IncrementCount
void IncrementCount(void) volatile
Called to relock a mutex already locked by the current thread.
Definition: LevelMutex.cpp:557
Loki::CreateUsingNew
Definition: Singleton.h:231
Loki::LevelMutexInfo::IsRecentLock
bool IsRecentLock(void) const volatile
Definition: LevelMutex.cpp:594
Loki::LokiAllocator::LokiAllocator
LokiAllocator(const LokiAllocator< Type1 > &)
Type converting allocator constructor does nothing.
Definition: Allocator.h:61
Loki::CheckStaticForNothing
Definition: Checker.h:393
Loki::operator<
bool operator<(const SmartPtr< T, OP, CP, KP, SP, CNP > &lhs, U *rhs)
Definition: SmartPtr.h:1608
Loki::CheckReturn::~CheckReturn
~CheckReturn(void)
Destructor checks if return value was used.
Definition: CheckReturn.h:129
Loki::MutexException::~MutexException
virtual ~MutexException(void)
Destroys the exception.
Definition: LevelMutex.cpp:984
Loki
Definition: AbstractFactory.h:42
Loki::StrongPtr::Lock
void Lock(void)
Definition: StrongPtr.h:1127
Loki::AllocatorSingleton::AllocatorSingleton
AllocatorSingleton()
The default constructor is not meant to be called directly.
Definition: SmallObj.h:244
Loki::AllocatorSingleton::MyAllocator
AllocatorSingleton< ThreadingModel, chunkSize, maxSmallObjectSize, objectAlignSize, LifetimePolicy > MyAllocator
Defines type of allocator.
Definition: SmallObj.h:228
Loki::FixedAllocator::Initialize
void Initialize(std::size_t blockSize, std::size_t pageSize)
Initializes a FixedAllocator by calculating # of blocks per Chunk.
Definition: SmallObj.cpp:570
Loki::StrongPtr::operator!=
bool operator!=(const StrongPtr< T1, S1, OP1, CP1, KP1, RP1, DP1, CNP1 > &rhs) const
Inequality comparison operator is templated to handle ambiguity.
Definition: StrongPtr.h:1215
Loki::SingletonHolder::Instance
static T & Instance()
Returns a reference to singleton object.
Definition: Singleton.h:787
Loki::DeletableSingleton::GracefulDelete
static void GracefulDelete()
delete singleton object manually
Definition: Singleton.h:438
Loki::LevelMutexInfo::Lock
virtual MutexErrors::Type Lock(void) volatile=0
Loki::LevelMutexInfo::IsLocked
bool IsLocked(void) const volatile
Returns true if this mutex was locked at least once.
Definition: LevelMutex.h:211
Loki::ObjectLevelLockable::Lock::Lock
Lock(const ObjectLevelLockable &host)
Lock object.
Definition: Threads.h:476
Loki::LockingPtr::LockingPtr
LockingPtr(volatile ConstOrNotType &object, LockingPolicy &mutex)
Definition: LockingPtr.h:51
Loki::MutexLocker::~MutexLocker
~MutexLocker(void)
Destructs the locker, and determines if it needs to unlock the mutex.
Definition: LevelMutex.cpp:1028
Loki::CachedFactory
Factory with caching support.
Definition: CachedFactory.h:663
Loki::NoMutexWait
Definition: LevelMutex.h:486
Loki::ContractChecker
Definition: Checker.h:278
Loki::SimplePointer
No encaspulation : returns the pointer.
Definition: CachedFactory.h:73
Loki::ContractChecker::Check
bool Check(void) const
Definition: Checker.h:328
Loki::NeverReset
Definition: StrongPtr.h:290
Loki::DefaultDeallocator
void DefaultDeallocator(void *p)
Definition: SmallObj.cpp:1049
Loki::LokiAllocator::address
pointer address(reference elem) const
Return address of reference to mutable element.
Definition: Allocator.h:74
Loki::AllowConversion
Definition: SmartPtr.h:779
Loki::FollowIntoDeath::AfterMaster
Definition: Singleton.h:678
Loki::SpinLevelMutex::~SpinLevelMutex
virtual ~SpinLevelMutex(void)
Destructs the mutex.
Definition: LevelMutex.cpp:811
Loki::LevelMutexInfo::GetLevel
unsigned int GetLevel(void) const volatile
Returns the level of this mutex.
Definition: LevelMutex.h:208
Loki::StrongPtr::operator<=
bool operator<=(const StrongPtr< T1, S1, OP1, CP1, KP1, RP1, DP1, CNP1 > &rhs) const
Less-than-or-equal-to operator is templated to handle ambiguity.
Definition: StrongPtr.h:1269
Loki::CheckForNoChangeOrThrow
Definition: Checker.h:152
Loki::LevelMutexInfo::GetLockCount
unsigned int GetLockCount(void) const volatile
Returns count of how many times this mutex got locked.
Definition: LevelMutex.h:214
Loki::MultiMutexLocker::~MultiMutexLocker
~MultiMutexLocker(void)
Destructs the locker, and determines if it needs to unlock the mutexes.
Definition: LevelMutex.cpp:1107
Loki::RejectNull
Definition: SmartPtr.h:989
Loki::StrongPtr::operator>=
bool operator>=(const StrongPtr< T1, S1, OP1, CP1, KP1, RP1, DP1, CNP1 > &rhs) const
Greater-than-or-equal-to operator is templated to handle ambiguity.
Definition: StrongPtr.h:1287
Loki::AllocatorSingleton
Definition: SmallObj.h:223
Loki::StrongPtr::Equals
bool Equals(const T1 *p) const
Helper function which can be called to avoid exposing GetPointer function.
Definition: StrongPtr.h:1166
Loki::FunctionStorage::StoredType
T * StoredType
the type of the pointee_ object
Definition: SPCachedFactory.h:66
Loki::MutexLocker
Definition: LevelMutex.h:1065
Loki::SmallObjAllocator::GetMaxObjectSize
std::size_t GetMaxObjectSize() const
Returns max # of bytes which this can allocate.
Definition: SmallObj.h:153
Loki::ArrayStorage::PointerType
T * PointerType
type used to declare OwnershipPolicy type.
Definition: SmartPtr.h:365
Loki::CountLocksInCurrentThread
unsigned int CountLocksInCurrentThread(void)
Definition: LevelMutex.cpp:151
Loki::StrongPtr::operator>
bool operator>(const StrongPtr< T1, S1, OP1, CP1, KP1, RP1, DP1, CNP1 > &rhs) const
Greater-than comparison operator is templated to handle ambiguity.
Definition: StrongPtr.h:1251
Loki::StrongPtr
Definition: StrongPtr.h:868
Loki::AssertCheckStrict
Definition: SmartPtr.h:887
Loki::LongevityLifetime::DieAsSmallObjectParent
Definition: SmallObj.h:65
Loki::SmallObjAllocator::Deallocate
void Deallocate(void *p, std::size_t size)
Definition: SmallObj.cpp:1144
Loki::FunctionStorage::PointerType
T * PointerType
type returned by operator->
Definition: SPCachedFactory.h:70
Loki::AllocatorSingleton::MyThreadingModel
ThreadingModel< MyAllocator, MutexPolicy > MyThreadingModel
Defines type for thread-safety locking mechanism.
Definition: SmallObj.h:231
Loki::SimpleStatisticPolicy
Simple statistics.
Definition: CachedFactory.h:568
Loki::AssertBadDesignMutexError
Definition: LevelMutex.h:449
Loki::Chainer
Definition: Functor.h:1632
Loki::FixedAllocator::Allocate
void * Allocate(void)
Definition: SmallObj.cpp:831
Loki::SafeBitConst::operator|
const SafeBitConst operator|(const SafeBitConst &rhs) const
Definition: SafeBits.h:213
Loki::LevelMutexInfo::IsLockedByAnotherThread
bool IsLockedByAnotherThread(void) const volatile
Returns true if this was locked by another thread.
Definition: LevelMutex.cpp:637
Loki::AllocatorSingleton::IsCorrupted
static bool IsCorrupted(void)
Definition: SmallObj.h:303
Loki::LockedStorage::PointerType
Locker< T > PointerType
type used to declare OwnershipPolicy type.
Definition: SmartPtr.h:287
Loki::PropagateConst
Definition: ConstPolicy.h:50
Loki::LokiAllocator::LokiAllocator
LokiAllocator(void)
Default constructor does nothing.
Definition: Allocator.h:54
Loki::ThrowOnAnyMutexError
Definition: LevelMutex.h:401
Loki::CheckForNoThrow
Definition: Checker.h:86
Loki::StrongPtr::operator<
bool operator<(const StrongPtr< T1, S1, OP1, CP1, KP1, RP1, DP1, CNP1 > &rhs) const
Less-than comparison operator is templated to handle ambiguity.
Definition: StrongPtr.h:1233
Loki::LokiAllocator
Definition: Allocator.h:42
Loki::SafeBitConst::operator==
bool operator==(const SafeBitConst &rhs) const
Comparison operators which take a constant bit value.
Definition: SafeBits.h:196
Loki::CheckReturn::CheckReturn
CheckReturn(const CheckReturn &that)
Definition: CheckReturn.h:124
Loki::CheckReturn::CheckReturn
CheckReturn(const Value &value)
Conversion constructor changes Value type to CheckReturn type.
Definition: CheckReturn.h:118
Loki::LevelMutex
Definition: LevelMutex.h:747
Loki::ScopeGuardImpl3
Definition: ScopeGuard.h:253
Loki::operator!=
bool operator!=(const LokiAllocator< Type > &, const LokiAllocator< Type > &)
Definition: Allocator.h:144
Loki::LongevityLifetime::DieLast
Longest possible SingletonWithLongevity lifetime: 0xFFFFFFFF.
Definition: Singleton.h:570
Loki::GetCurrentThreadsLevel
unsigned int GetCurrentThreadsLevel(void)
Definition: LevelMutex.cpp:129
Loki::TwoRefCounts
Definition: StrongPtr.h:554
Loki::NoCheck
Definition: SmartPtr.h:819
Loki::SingletonHolder
Definition: Singleton.h:726
Loki::FunctionStorage::InitPointerType
T * InitPointerType
type used to declare OwnershipPolicy type.
Definition: SPCachedFactory.h:68
Loki::AllocatorSingleton::MyAllocatorSingleton
Loki::SingletonHolder< MyAllocator, Loki::CreateStatic, LifetimePolicy, ThreadingModel > MyAllocatorSingleton
Defines singleton made from allocator.
Definition: SmallObj.h:235
Loki::ImplOf
Definition: Pimpl.h:152
Loki::Chain
Fun2 Chain(const Fun1 &fun1, const Fun2 &fun2)
Definition: Functor.h:1777
Loki::AllowReset
Definition: StrongPtr.h:269
Loki::NoCopy
Definition: SmartPtr.h:744
Loki::SafeBitConst::SafeBitConst
SafeBitConst(const SafeBitConst &rhs)
Copy constructor.
Definition: SafeBits.h:193
Loki::FollowIntoDeath::With::AsMasterLifetime
Definition: Singleton.h:653
Loki::ObjScopeGuardImpl3
Definition: ScopeGuard.h:600
Loki::LokiAllocator::LokiAllocator
LokiAllocator(const LokiAllocator &)
Copy constructor does nothing.
Definition: Allocator.h:57
Loki::Chunk
Definition: SmallObj.cpp:71
Loki::StaticChecker::Validator
bool(* Validator)(void)
Signature for the validation function.
Definition: Checker.h:441
Loki::SmallObjAllocator::GetAlignment
std::size_t GetAlignment() const
Returns # of bytes between allocation boundaries.
Definition: SmallObj.h:157
Loki::BaseVisitor
Definition: Visitor.h:37
Loki::LokiAllocator::construct
void construct(pointer p, const Type &value)
Construct an element at the pointer.
Definition: Allocator.h:111
Loki::CheckReturn
Definition: CheckReturn.h:114
Loki::EvictLRU
Evicts least accessed objects first.
Definition: CachedFactory.h:352
Loki::LevelMutexInfo::MultiLock
static MutexErrors::Type MultiLock(MutexContainer &mutexes)
Definition: LevelMutex.cpp:316
Loki::LevelMutexInfo::Checker
Definition: LevelMutex.h:280
Loki::FixedAllocator::TrimEmptyChunk
bool TrimEmptyChunk(void)
Definition: SmallObj.cpp:736
Loki::SleepLevelMutex::~SleepLevelMutex
virtual ~SleepLevelMutex(void)
Destructs the mutex.
Definition: LevelMutex.cpp:929
LockableTwoRefCounts
Loki::DeleteArray::Delete
static void Delete(const P *p)
Definition: StrongPtr.h:217
Loki::ClassLevelLockable::Lock::Lock
Lock(const ClassLevelLockable &)
Lock class.
Definition: Threads.h:561
Loki::AmountLimitedCreation
Limit by number of objects.
Definition: CachedFactory.h:254
Loki::ScopeGuardImpl1
Definition: ScopeGuard.h:156
Loki::Key
Definition: Key.h:35
Loki::FixedAllocator::Deallocate
bool Deallocate(void *p, Chunk *hint)
Definition: SmallObj.cpp:888
Loki::ClassLevelLockable::Lock
Definition: Threads.h:550
Loki::SmartPointer
Encapsulate the object in a SmartPtr with FunctionStorage policy.
Definition: SPCachedFactory.h:166
Loki::UnRegisterFunction
bool UnRegisterFunction()
Loki::RefCounted
Definition: SmartPtr.h:437
Loki::SafeBitField::SafeBitField
SafeBitField(const SafeBitField &rhs)
Copy constructor and assignment operators.
Definition: SafeBits.h:308
Loki::NoDestroy
Definition: Singleton.h:518
Loki::ContractChecker::ContractChecker
ContractChecker(const Host *host, Validator validator, Validator pre=0, Validator post=0)
Definition: Checker.h:294
Loki::LockingPtr::LockingPtr
LockingPtr(Pair lockpair)
Definition: LockingPtr.h:63
Loki::MultiMutexLocker::GetMutexes
const LevelMutexInfo::MutexContainer & GetMutexes(void) const
Provides access to the collection of mutexes controlled by this.
Definition: LevelMutex.h:1189
Loki::LevelMutex::Lock
virtual MutexErrors::Type Lock(void) volatile
Definition: LevelMutex.h:805
LOKI_THREAD_LOCAL
#define LOKI_THREAD_LOCAL
Definition: LevelMutex.h:64
Loki::ObjectLevelLockable::Lock
Definition: Threads.h:472
Loki::Pimpl
Definition: Pimpl.h:76
Loki::DeletableSingleton
Definition: Singleton.h:418
Loki::DeleteArray
Definition: StrongPtr.h:215
Loki::RefLinked
Definition: SmartPtr.h:675
Loki::ObjScopeGuardImpl1
Definition: ScopeGuard.h:473
Loki::SafeBitField::bit_word_t
word_t bit_word_t
Type of the bit field is available if needed.
Definition: SafeBits.h:298
Loki::MutexLocker::GetMutex
const volatile LevelMutexInfo & GetMutex(void) const
Provides access to mutex controlled by this.
Definition: LevelMutex.h:1111
Loki::MutexException::what
virtual const char * what(void) const
Returns a simple message about which operation failed.
Definition: LevelMutex.cpp:990
Loki::LockedStorage::InitPointerType
T * InitPointerType
the type of the pointee_ object
Definition: SmartPtr.h:286
Loki::AllocatorSingleton::Instance
static AllocatorSingleton & Instance(void)
Returns reference to the singleton.
Definition: SmallObj.h:238
RefCountedMT
Loki::CountMutexesAtCurrentLevel
unsigned int CountMutexesAtCurrentLevel(void)
Definition: LevelMutex.cpp:165
Loki::DeleteSingle::Delete
static void Delete(const P *p)
Definition: StrongPtr.h:186
Loki::DefaultFactoryError
Default policy that throws an exception
Definition: Factory.h:92
Loki::SpinLevelMutex
Definition: LevelMutex.h:516
Loki::DoMutexesMatchContainer
MutexErrors::Type DoMutexesMatchContainer(const LevelMutexInfo::MutexContainer &mutexes)
Definition: LevelMutex.cpp:184
Loki::SafeBitConst::field_t
SafeBitField< unique_index, word_t > field_t
Corresponding field type.
Definition: SafeBits.h:154
Loki::FunctionStorage::SetCallBackFunction
void SetCallBackFunction(const FunctorType &functor)
Definition: SPCachedFactory.h:102
Loki::SafeBitField
Forward declaration of the field type.
Definition: SafeBits.h:123
Loki::SingleThreaded::Lock
Definition: Threads.h:366
Loki::LevelMutexInfo::PostLock
void PostLock(void) volatile
Definition: LevelMutex.cpp:653
Loki::SmallObjAllocator::Allocate
void * Allocate(std::size_t size, bool doThrow)
Definition: SmallObj.cpp:1109
Loki::SpinLevelMutex::SpinLevelMutex
SpinLevelMutex(unsigned int level)
Constructs a spin-level mutex.
Definition: LevelMutex.cpp:783
Loki::LokiAllocator::allocate
pointer allocate(size_type count, const void *hint=0)
Definition: Allocator.h:87
Loki::HeapStorage
Definition: SmartPtr.h:72
Loki::MutexLocker::Lock
bool Lock(void)
Definition: LevelMutex.cpp:1045
Loki::DefaultLifetime
Definition: Singleton.h:353
Loki::LockingPtr::operator->
ConstOrNotType * operator->()
Point-operator returns pointer to object.
Definition: LockingPtr.h:83
Loki::FixedAllocator::FixedAllocator
FixedAllocator()
Create a FixedAllocator which manages blocks of 'blockSize' size.
Definition: SmallObj.cpp:546
Loki::ClassLevelLockable::Lock::Lock
Lock()
Lock class.
Definition: Threads.h:554
Loki::LokiAllocator::max_size
size_type max_size(void) const
Calculate max # of elements allocator can handle.
Definition: Allocator.h:101
Loki::RegisterOnCreateSet
Definition: Register.h:84
Loki::LevelMutex::LevelMutex
LevelMutex(unsigned int level=DefaultLevel)
Definition: LevelMutex.h:759
Loki::CountMutexesInCurrentThread
unsigned int CountMutexesInCurrentThread(void)
Definition: LevelMutex.cpp:137
Loki::RejectNullStrict
Definition: SmartPtr.h:1023
Loki::SmallObjectBase
Definition: SmallObj.h:437
Loki::CreateUsingMalloc
Definition: Singleton.h:278
Loki::LevelMutexInfo::GetCurrentMutex
static const volatile LevelMutexInfo * GetCurrentMutex(void)
Definition: LevelMutex.cpp:267
Loki::LevelMutexInfo::Unlock
virtual MutexErrors::Type Unlock(void) volatile=0
Loki::SafeBitField::const_t
SafeBitConst< unique_index, word_t > const_t
Corresponding field type.
Definition: SafeBits.h:300
Loki::TwoRefCounts::~TwoRefCounts
~TwoRefCounts(void)
Definition: StrongPtr.h:571
Loki::LockingPtr::operator*
ConstOrNotType & operator*()
Star-operator dereferences pointer.
Definition: LockingPtr.h:77
Loki::ObjectLevelLockable::Lock::~Lock
~Lock()
Unlock object.
Definition: Threads.h:488
Loki::NoStatisticPolicy
Do nothing.
Definition: CachedFactory.h:542
Loki::AssertAnyMutexError
Definition: LevelMutex.h:429
Loki::BinderFirst
Definition: Functor.h:1489
Loki::LevelMutexInfo::PreUnlock
void PreUnlock(void) volatile
Gets called just before an attempt to unlock a mutex.
Definition: LevelMutex.cpp:669
Loki::StrongPtr::Unlock
void Unlock(void)
Definition: StrongPtr.h:1135
Loki::CachedFactory::displayCacheType
void displayCacheType()
display the cache configuration
Definition: CachedFactory.h:1152
Loki::LevelMutex::TryLock
virtual MutexErrors::Type TryLock(void) volatile
Definition: LevelMutex.h:783
Loki::ScopeGuardImpl5
Definition: ScopeGuard.h:356
Loki::ObjectLevelLockable::Lock::Lock
Lock(const ObjectLevelLockable *host)
Lock object.
Definition: Threads.h:482
Loki::BindFirst
Private::BinderFirstTraits< Fctor >::BoundFunctorType BindFirst(const Fctor &fun, typename Fctor::Parm1 bound)
Definition: Functor.h:1612
Loki::DeleteNothing
Definition: StrongPtr.h:159
Loki::DeepCopy
Definition: SmartPtr.h:616
Loki::LongevityLifetime::DieFirst
Shortest possible SingletonWithLongevity lifetime: 0
Definition: Singleton.h:584
Loki::LevelMutexInfo::~LevelMutexInfo
virtual ~LevelMutexInfo(void)
The destructor only gets called by the derived class.
Definition: LevelMutex.cpp:536
Loki::LevelMutexInfo::Lock
virtual MutexErrors::Type Lock(unsigned int milliSeconds) volatile=0
Loki::MultiMutexLocker::Lock
bool Lock(void)
Definition: LevelMutex.cpp:1124
Loki::MutexSleepWaits
Definition: LevelMutex.h:498
Loki::FixedAllocator::BlockSize
std::size_t BlockSize() const
Returns block size with which the FixedAllocator was initialized.
Definition: SmallObj.cpp:256
Loki::TwoRefLinks::Merge
bool Merge(TwoRefLinks &rhs)
Definition: StrongPtr.cpp:455
Loki::SmallObjAllocator::IsCorrupt
bool IsCorrupt(void) const
Definition: SmallObj.cpp:1199