ADTF
Loading...
Searching...
No Matches
adtf::ucom::vision Namespace Reference

Namespace for all functionality of the ADTF UCOM SDK provided since v3.21. More...

Classes

class  IPluginLogging
 
class  IRuntimeArguments
 

Functions

template<typename Implementation, bool Fuse, typename Allocator, typename... Args>
object_ptr< Implementation > allocate_object_ptr (Allocator &&allocator, Args &&... args)
 Create an instance of type object_ptr with Implementation as the shared resource.
 

Detailed Description

Namespace for all functionality of the ADTF UCOM SDK provided since v3.21.

Function Documentation

◆ allocate_object_ptr()

template<typename Implementation, bool Fuse, typename Allocator, typename... Args>
object_ptr< Implementation > adtf::ucom::vision::allocate_object_ptr ( Allocator && allocator,
Args &&... args )
inline

Create an instance of type object_ptr with Implementation as the shared resource.

allocate_object_ptr can be used in complete analogy to std::allocate_shared - to create an object of type object_ptr without the need to explicitly call new to allocate the shared resource. In fact, this function is the only valid way to create an object_ptr with a new shared resource.

Template Parameters
ImplementationType of the shared resource which is created using the specified allocator.
FuseEnable fused allocations of control block and shared resource.
AllocatorType of the allocator to be used for both control block and the shared resource.
ArgsParameter pack forwarded to the constructor of Implementation during instantiation.
Parameters
[in]allocatorReference to an instance of Allocator that will be rebound as needed.
[in]argsParameters forwared to the constructor of Implementation during instantiation.
Note
Due to the provided aliasing constructor in object_ptr, any created object_ptr with a concrete implementation of IObject can be implicitly converted to an object_ptr managing a pointer to an interface of this concrete implementation.
Return values
Onsuccess, the instance contains a newly allocated, reference counted object of type Implementation
Exceptions
...On failure, the original exception is thrown.
See also
ssection_ucom_reference_counting_creation