btl.autoptr.common

Common code shared with other btl.autoptr modules .

Members

Aliases

ControlTypeDeduction
deprecated alias ControlTypeDeduction = ControlBlockDeduction
Undocumented in source.
DefaultAllocator
alias DefaultAllocator = Mallocator

Default allcoator for SharedPtr.make, RcPtr.make, UniquePtr.make and IntrusivePtr.make.

Evoid
alias Evoid = btl.lifetime.Evoid

Type used as parameter for function pointer returned from DestructorType.

Forward
alias Forward = btl.traits.common.Forward

Type used in forward constructors.

SharedControlBlock
alias SharedControlBlock = ControlBlock!(int, int)

Default ControlBlock for SharedPtr and RcPtr.

SharedControlType
deprecated alias SharedControlType = SharedControlBlock
Undocumented in source.
UniqueControlBlock
alias UniqueControlBlock = ControlBlock!void

Default ControlBlock for UniquePtr.

UniqueControlType
deprecated alias UniqueControlType = UniqueControlBlock
Undocumented in source.
isDestructorType
alias isDestructorType = btl.lifetime.isDtorType

Check if type Type is of type destructor type (is(void function(Evoid* )pure nothrow @safe @nogc : Type))

Functions

dynCastElement
auto dynCastElement(From from)
Undocumented in source. Be warned that the author may not have intended to support it.
emplaceIntrusive
void emplaceIntrusive(T chunk, Vptr* vptr, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
intrusivControlBlock
auto intrusivControlBlock(Type elm)
Undocumented in source. Be warned that the author may not have intended to support it.
intrusivControlBlockOffset
size_t intrusivControlBlockOffset()
Undocumented in source. Be warned that the author may not have intended to support it.
mutablePtr
auto mutablePtr(P ptr)
Undocumented in source. Be warned that the author may not have intended to support it.
shared_static_this
void shared_static_this()
Undocumented in source. Be warned that the author may not have intended to support it.
smart_ptr_allocate
void smart_ptr_allocate(void[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
smart_ptr_construct
void smart_ptr_construct()
Undocumented in source. Be warned that the author may not have intended to support it.
smart_ptr_deallocate
void smart_ptr_deallocate(void[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
smart_ptr_destruct
void smart_ptr_destruct()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

lockSmartPtr
auto lockSmartPtr(Ptr ptr, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_conter_allocations
int _conter_allocations;
Undocumented in source.
_conter_constructs
int _conter_constructs;
Undocumented in source.

Structs

SmartPtr
struct SmartPtr

Templates

ControlBlock
template ControlBlock(_Shared, _Weak = void)

Control block for SharedPtr, RcPtr, UniquePtr and IntrusivePtr.

ControlBlockDeduction
template ControlBlockDeduction(Type, ControlType)

This template deduce ControlType shared qualifier in SharedPtr, RcPtr and UniquePtr.

DestructorAllocatorType
template DestructorAllocatorType(Allocator)

Similiar to DestructorType but returns destructor attributes of type Allocator and attributes of methods void[] allocate(size_t) and void deallocate(void[]).

DestructorDeleterType
template DestructorDeleterType(T, Deleter)

Similiar to DestructorType but returns destructor attributes of type Deleter and attributes necessary to call variable of type Deleter with parameter of type T.

DestructorType
template DestructorType(Types...)

Destructor type of destructors of types Types ( void function(Evoid*)@destructor_attributes ).

ElementPointerTypeImpl
template ElementPointerTypeImpl(T)
Undocumented in source.
ElementReferenceTypeImpl
template ElementReferenceTypeImpl(T)
Undocumented in source.
GetControlType
template GetControlType(Ptr)
Undocumented in source.
GetElementReferenceType
template GetElementReferenceType(Ptr)
Undocumented in source.
GetElementType
template GetElementType(Ptr)
Undocumented in source.
IntrusiveControlBlock
template IntrusiveControlBlock(Type, bool mutable = false)

Alias to ControlBlock including qualifiers contained by Type.

MakeDeleter
template MakeDeleter(_Type, _DestructorType, _ControlType, DeleterType, _AllocatorType, bool supportGC)
Undocumented in source.
MakeDynamicArray
template MakeDynamicArray(_Type, _DestructorType, _ControlType, _AllocatorType, bool supportGC)
Undocumented in source.
MakeEmplace
template MakeEmplace(_Type, _DestructorType, _ControlType, _AllocatorType, bool supportGC)
Undocumented in source.
MakeIntrusive
template MakeIntrusive(_Type, _AllocatorType, bool supportGC)
Undocumented in source.
UnqualSmartPtr
template UnqualSmartPtr(Ptr)
Undocumented in source.
apply
template apply(alias fn)

Sefly dereference all args of types btl.autoptr.shared_ptr.SharedPtr, btl.autoptr.rc_ptr.RcPtr and btl.autoptr.intrusive_ptr.IntrusivePtr and forward them to callable alias fn.

isControlBlock
template isControlBlock(T...)

Check if type T is of type ControlBlock!(...).

isIntrusive
template isIntrusive(Type)

Return number of ControlBlocks in type Type.

isMoveCtor
template isMoveCtor(T, alias arg)
Undocumented in source.
isSmartPtr
template isSmartPtr(T)

Check if T is smart pointer of type btl.autoptr.shared_ptr.SharedPtr, btl.autoptr.rc_ptr.RcPtr or btl.autoptr.intrusive_ptr.IntrusivePtr.

weakLock
template weakLock(From, To)
Undocumented in source.

Variables

BTL_AUTOPTR_COUNT
enum bool BTL_AUTOPTR_COUNT;
Undocumented in source.
BTL_AUTOPTR_COUNT
enum bool BTL_AUTOPTR_COUNT;
Undocumented in source.
BTL_AUTOPTR_COUNT
enum bool BTL_AUTOPTR_COUNT;
Undocumented in source.

Meta

Authors

Adam Búš