|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Base of every pool-resident handle: the one PoolLocation its arrays resolve against. More...
#include <EBGeometry_Pool.hpp>

Public Member Functions | |
| PoolLocation | location () const noexcept |
| Where this handle's arrays live. | |
| bool | isAttachedTo (const Pool &a_pool) const noexcept |
Check whether this handle's arrays were reserved from a_pool. | |
Protected Member Functions | |
| PoolHandle () noexcept=default | |
| An unset location; the first reservation attaches it. | |
| PoolHandle (const PoolLocation &a_location) noexcept | |
| Adopt a location, as a handle rebuilt from a stored layout does. | |
| PoolHandle (const PoolHandle &) noexcept=default | |
| Copy a handle, as a derived handle's copy does. | |
| PoolHandle (PoolHandle &&) noexcept=default | |
| Move a handle; the same as a copy. | |
| PoolHandle & | operator= (const PoolHandle &) noexcept=default |
| Copy-assign a handle, as a derived handle's assignment does. | |
| PoolHandle & | operator= (PoolHandle &&) noexcept=default |
| Move-assign a handle; the same as a copy. | |
| ~PoolHandle () noexcept=default | |
| Destructor; protected, since a PoolHandle exists only as the base of a handle. | |
| void * | base () noexcept |
| The base address this handle's offsets resolve against; see PoolLocation::base(). | |
| const void * | base () const noexcept |
| The base address this handle's offsets resolve against, for read-only access. | |
| void | attach (const Pool &a_pool, const char *a_who) noexcept |
Follow a_pool, as the first reservation does; see PoolLocation::attach(). | |
| PoolLocation | rebasedLocation (const Pool &a_pool, uint64_t a_endByte, const char *a_who) const noexcept |
| The location of this handle's arrays in another pool of its mirror chain; see PoolLocation::rebasedOnto(). | |
| void | setLocation (const PoolLocation &a_location) noexcept |
| Replace the location, for a view or a copy made by a derived handle. | |
Base of every pool-resident handle: the one PoolLocation its arrays resolve against.
A pool-resident class splits into a layout – its PODVectors and plain values, which are offsets and sizes only – and a handle, which is that layout plus where the pool is. The handle derives from this class, which owns the location and the operations on it; nothing else in the library holds a PoolLocation.
Only top-level objects are handles. A pool-resident object stored inside another object's pool (a TriMeshSDF held by a BVHUnion, a mesh inside a tape) is stored as its layout, and the outer handle rebuilds a temporary inner handle from that layout and its own location when it evaluates it. Mirroring the pool copies the layout's bytes verbatim, which is exact, since a layout holds no address. isPoolHandle lets a container reject a handle where a layout belongs, at compile time.
|
inlineexplicitprotectednoexcept |
Adopt a location, as a handle rebuilt from a stored layout does.
| [in] | a_location | Location to resolve against. |
|
protecteddefaultnoexcept |
Copy a handle, as a derived handle's copy does.
Protected, with the other copy and move operations, so that a derived handle cannot be sliced into a bare PoolHandle. Defaulted, so every derived handle stays trivially copyable.
|
inlineprotectednoexcept |
Follow a_pool, as the first reservation does; see PoolLocation::attach().
| [in] | a_pool | Pool to follow. |
| [in] | a_who | Name of the handle class, for the message. |
|
inlineprotectednoexcept |
The base address this handle's offsets resolve against, for read-only access.
A const handle hands out a const base, so that a PODVector bound against it gives const elements (PODVector::bind and PODVector::at pick their const overload from the base's type).
|
inlineprotectednoexcept |
The base address this handle's offsets resolve against; see PoolLocation::base().
|
inlinenoexcept |
Check whether this handle's arrays were reserved from a_pool.
| [in] | a_pool | Pool to test against. |
a_pool.
|
inlinenoexcept |
Where this handle's arrays live.
|
protecteddefaultnoexcept |
Copy-assign a handle, as a derived handle's assignment does.
|
protecteddefaultnoexcept |
Move-assign a handle; the same as a copy.
|
inlineprotectednoexcept |
The location of this handle's arrays in another pool of its mirror chain; see PoolLocation::rebasedOnto().
| [in] | a_pool | Pool to resolve against. |
| [in] | a_endByte | First byte past the handle's last array. |
| [in] | a_who | Name of the handle class, for the messages. |
|
inlineprotectednoexcept |
Replace the location, for a view or a copy made by a derived handle.
| [in] | a_location | New location. |