Skip to content

ludus::foundation::filesystem::ProviderHandle

Ludus Wiki · API overview · Browse API

Class

Shared provider ownership; copies retain without allocation. Mutation requires exclusive access to the handle; distinct handles can be used concurrently.

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

#include <ludus/foundation/filesystem/namespace.hpp>
class ludus::foundation::filesystem::ProviderHandle final

Methods

ProviderHandle

ludus::foundation::filesystem::ProviderHandle::ProviderHandle() noexcept=default
Creates an empty handle.

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

ProviderHandle

explicit ludus::foundation::filesystem::ProviderHandle::ProviderHandle(Provider *owned) noexcept
Adopts the initial reference of a newly allocated provider, or an empty null.

Related types: Provider

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

~ProviderHandle

ludus::foundation::filesystem::ProviderHandle::~ProviderHandle() noexcept
Releases one reference.

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

ProviderHandle

ludus::foundation::filesystem::ProviderHandle::ProviderHandle(const ProviderHandle &other) noexcept
Retains the same provider without allocation.

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

operator=

ProviderHandle & ludus::foundation::filesystem::ProviderHandle::operator=(const ProviderHandle &other) noexcept
Replaces ownership with the same provider as other; self-copy is supported.

Related types: ProviderHandle

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

ProviderHandle

ludus::foundation::filesystem::ProviderHandle::ProviderHandle(ProviderHandle &&other) noexcept
Transfers ownership, leaving other empty.

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

operator=

ProviderHandle & ludus::foundation::filesystem::ProviderHandle::operator=(ProviderHandle &&other) noexcept
Releases previous ownership and transfers other; self-move is supported.

Related types: ProviderHandle

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

Get

const Provider * ludus::foundation::filesystem::ProviderHandle::Get() const noexcept
Returns the provider, or null. The pointer is borrowed for this handle's lifetime.

Related types: Provider

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp

Static methods

Share

static ProviderHandle ludus::foundation::filesystem::ProviderHandle::Share(const Provider &provider) noexcept
Retains a live provider whose current owner remains alive during this call.

Related types: Provider · ProviderHandle

Declared in modules/foundation/filesystem/include/ludus/foundation/filesystem/namespace.hpp