Library of Assembled Shared Sources
|
collection of smart pointers as ScopedPtr, SharedPtr, ...
Storage polices control how the pointees are stored in the smart pointer and how they should be deallocated. Two default storage policies are provided for objects allocated by new
and arrays allocated by new
[], but it should be possible to write special storage policies to embed other smart pointers in our lass::util smart pointer classes.
All storage policies should implement the following interface. Some functions like at(size_t)
should only be implemented for array-like pointees. So they can safely be ommited if pointee does not act like an array.
new
.new
[].Counter policies control how reference counting should be done. In contrary to the storage policies, this is only used by the SharedPtr.
All counter policies should implement the following interface. The template parameter TStorage
is of the same type as TStorage
in the used storage policy. It will useually be a pointer to the pointee.
Data Structures | |
class | lass::util::SmartI< I > |
smart pointer to COM interfaces More... | |
class | lass::util::ObjectStorage< T, Cascade > |
Default storage policy for single objects, implementation of StoragePolicy concept. More... | |
class | lass::util::ArrayStorage< T, Cascade > |
Default storage policy for arrays, implementation of StoragePolicy concept. More... | |
class | lass::util::DefaultCounter |
The default counter for the shared pointers, implementation of CounterPolicy concept. More... | |
class | lass::util::IntrusiveCounter< T, CounterType, referenceCounter > |
implementation of CounterPolicy concept, using a counter in the managed object itself. More... | |