Skip to content

ludus::foundation::geometry::ProjectionScratch

Ludus Wiki · API overview · Browse API

Class

Caller-owned, reusable search storage, so a projection never allocates.
Reserve it once with TryReserve; queries only use reserved capacity. Its contents are unspecified after any query, successful or not. Move-only.

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

#include <ludus/foundation/geometry/query.hpp>
class ludus::foundation::geometry::ProjectionScratch final

Members

internal::ProjectionAccess

friend struct internal::ProjectionAccess
Lets the projection search use the reserved storage; an implementation detail, not a public API.

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

Methods

ProjectionScratch

ludus::foundation::geometry::ProjectionScratch::ProjectionScratch() noexcept=default
Construct scratch with no reserved capacity.

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

ProjectionScratch

ludus::foundation::geometry::ProjectionScratch::ProjectionScratch(ProjectionScratch &&other) noexcept=default
Transfer the reserved storage; the source becomes empty.

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

operator=

ProjectionScratch & ludus::foundation::geometry::ProjectionScratch::operator=(ProjectionScratch &&other) noexcept=default
Release this storage and take the other's; the source becomes empty.

Related types: ProjectionScratch

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

ProjectionScratch

ludus::foundation::geometry::ProjectionScratch::ProjectionScratch(const ProjectionScratch &)=delete
Copying is disabled: one owner holds the storage.

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

operator=

ProjectionScratch & ludus::foundation::geometry::ProjectionScratch::operator=(const ProjectionScratch &)=delete
Copy assignment is disabled: one owner holds the storage.

Related types: ProjectionScratch

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

~ProjectionScratch

ludus::foundation::geometry::ProjectionScratch::~ProjectionScratch()=default
Release the storage.

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

TryReserve

GeometryStatus ludus::foundation::geometry::ProjectionScratch::TryReserve(usize capacity) noexcept
Reserve room for capacity intervals and capacity candidates.
ParameterDescription
capacity
Entries of each kind; see ComputeProjectionScratchCapacity.

Returns

Success, or OutOfMemory with the previous reservation kept.

Related types: usize · GeometryStatus

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp

GetCapacity

usize ludus::foundation::geometry::ProjectionScratch::GetCapacity() const noexcept
Entries of each kind that a query may use without allocating.

Related types: usize

Declared in modules/foundation/geometry/include/ludus/foundation/geometry/query.hpp