load overloads

Synopses

Declared in <bslma_managedptr.h>

Take ownership of *ptr using the default allocator as deleter.

template<class MANAGED_TYPE>
void
load(MANAGED_TYPE* ptr);

Take ownership of *ptr destroyed via factory.

template<
    class MANAGED_TYPE,
    class FACTORY_TYPE>
void
load(
    MANAGED_TYPE* ptr,
    FACTORY_TYPE* factory);

Reset this managed pointer to empty.

void
load(
    bsl::nullptr_t nullPointerLiteral = 0,
    void* cookie = 0,
    DeleterFunc deleter = 0);

Take ownership of *ptr with the specified deleter.

template<class MANAGED_TYPE>
void
load(
    MANAGED_TYPE* ptr,
    void* cookie,
    DeleterFunc deleter);

Take ownership of *ptr with the specified deleter.

template<
    class MANAGED_TYPE,
    class COOKIE_TYPE>
void
load(
    MANAGED_TYPE* ptr,
    COOKIE_TYPE* cookie,
    DeleterFunc deleter);

Take ownership of *ptr with the specified deleter.

template<
    class MANAGED_TYPE,
    class MANAGED_BASE>
void
load(
    MANAGED_TYPE* ptr,
    void* cookie,
    void(* deleter)(MANAGED_BASE*, void*));

Take ownership of *ptr with the specified deleter.

template<
    class MANAGED_TYPE,
    class MANAGED_BASE,
    class COOKIE_TYPE,
    class COOKIE_BASE>
void
load(
    MANAGED_TYPE* ptr,
    COOKIE_TYPE* cookie,
    void(* deleter)(MANAGED_BASE*, COOKIE_BASE*));

Parameters

Name

Description

ptr

pointer to the object to manage, or null

factory

factory used to destroy the managed object

nullPointerLiteral

null‐pointer literal (unused; selects this overload)

cookie

unused cookie pointer

deleter

unused deleter function

Created with MrDocs