AdaCL.Pointer.Shared
AdaCL: Ada Class Library — smart pointer.
More...Entities
Access types
Record types
Subprograms
Generic instantiations
Description
Smart pointer with which can share an access. The referenced element is deleted when the last reference is removed.
Simplified version which only need the element type
Element_Type the element which are handled by the pointer
38 | type Pointer is access Element_Type; |
---|
Create (renaming) [source]
Creates a new unique smart pointer from normal pointer.
- Referent of type AdaCL.Pointer.Shared.Pointer
Pointer to reference counted object
Exist (renaming) [source]
58 | function Exist (This : in Object) return Boolean renames Delegate.Exist; |
---|
Checks if a pointers is set
- This of type AdaCL.Pointer.Shared.Object
Object itself.
1 | true when pointer is not null |
---|
gets pointer to element to perform operations on. Do not save the pointer.
- This of type AdaCL.Pointer.Shared.Object
Object itself.
Reset (renaming) [source]
Replaces the managed object.
- This of type AdaCL.Pointer.Shared.Object
Object itself.
- Referent of type AdaCL.Pointer.Shared.Pointer
new pointer to manage
swaps the managed objects
- This of type AdaCL.Pointer.Shared.Object
Object itself.
- Other of type AdaCL.Pointer.Shared.Object
Object to swap Referents with
Delegate (generic instantiation) [source]
42 | package Delegate is new AdaCL.Pointer.Shared_With_Delete (Element_Type => Element_Type, Pointer => Pointer); |
---|
Instantiation of AdaCL.Pointer.Shared_With_Delete
Deleter (generic instantiation) [source]
40 | procedure Deleter is new Ada.Unchecked_Deallocation (Object => Element_Type, Name => Pointer); |
---|