|
libbio
|
Typedefs | |
| typedef uintptr_t | IndexValue |
Functions | |
| IndexValue | LookupPerspectiveName (const void *perspective, const ::std::string &key) |
| void | StorePerspectiveName (const void *perspective, const ::std::string &key, IndexValue value) |
| void | ErasePerspectiveEntries (const void *perspective) |
Process-wide side-table backing the Perspective<DIMENSION> name->Id fast path. Defined OUT OF LINE in NameIndex.cpp so that Perspective<DIMENSION>'s class layout never grows when the index gains features — consumers (libeons, elder, downstream services) need not be recompiled when the implementation changes here.
Storage is Meyers-singleton-style (function-local static) inside NameIndex.cpp. Lookup, store, and erase serialize through a single recursive_mutex; the typical perspective workload (a few singletons, mostly read-after-write) does not contend on this.
Values are type-erased to ::std::uintptr_t. Perspective casts back to its DIMENSION (an unsigned integer type that fits within uintptr_t on every platform bio supports).
Returns 0 (the InvalidId() sentinel for every Perspective<DIMENSION> instantiation) when the (perspective, key) pair is not present.
Drop every entry the registry holds for the given perspective.
Called by ~Perspective so that an instance constructed at the same address later doesn't inherit stale entries.
| IndexValue bio::physical::detail::LookupPerspectiveName | ( | const void * | perspective, |
| const ::std::string & | key | ||
| ) |
| void bio::physical::detail::StorePerspectiveName | ( | const void * | perspective, |
| const ::std::string & | key, | ||
| IndexValue | value | ||
| ) |