概念 | |
| concept | ResultConstConversion |
True when From may convert into To only by adding const. | |
类型定义 | |
| using | UuidBytes = std::array< std::uint8_t, 16 > |
| Byte representation shared by every tagged 128-bit identity. | |
| template<class T > | |
| using | ResultReturn = std::invoke_result_t< T > |
函数 | |
| std::optional< UuidBytes > | parseUuidText (std::string_view text) noexcept |
| Parses canonical UUID text without knowing the domain tag. | |
| std::string | formatUuidBytes (const UuidBytes &bytes) |
| Formats UUID bytes as lower-case canonical 8-4-4-4-12 text. | |
| UuidBytes | childUuidBytes (const UuidBytes &parent, std::string_view role) noexcept |
| Derives a deterministic child UUID from a parent and a role. | |
| void | checkResultInvariant (bool condition, const char *expression, const char *file, unsigned line, const char *message) |
| Check one Result invariant without instantiating the assertion backend in its caller. | |
| void | failResultExpectation (const Status &status, std::string_view message, const char *file, unsigned line, bool assertionsEnabled) |
| Report a failed expect operation with its Status and caller context. | |
| template<class T , class U > | |
| void | moveAssignOptional (std::optional< T > &destination, std::optional< U > &&source) |
Replace destination with source even when T is not assignable. | |
| eve::Result< void > | validateRegistryNextSequence (EventSequence nextEventSequence) |
| Validates the next-event-sequence floor of a restored registry image. | |
| eve::Result< Generation > | nextRegistryGeneration (Generation current, bool present) |
Next generation of one slot; present false means the slot is new. | |
| eve::Result< EventSequence > | nextRegistryEventSequence (EventSequence current) |
| Next event sequence, or a Failed diagnostic when it is exhausted. | |
类型定义说明
◆ ResultReturn
| using eve::detail::ResultReturn = typedef std::invoke_result_t<T> |
◆ UuidBytes
| using eve::detail::UuidBytes = typedef std::array<std::uint8_t, 16> |
Byte representation shared by every tagged 128-bit identity.
在文件 Identity.h 第 53 行定义.
函数说明
◆ checkResultInvariant()
| EVENGINE_API_FOUNDATION void eve::detail::checkResultInvariant | ( | bool | condition, |
| const char * | expression, | ||
| const char * | file, | ||
| unsigned | line, | ||
| const char * | message | ||
| ) |
Check one Result invariant without instantiating the assertion backend in its caller.
- 参数
-
condition Invariant evaluated once by the caller. expression Original expression spelling. file Static-lifetime source file name containing the check. line Source line containing the check. message Synchronous failure context, borrowed only for this call.
- 异常
-
zeroerr::AssertionData if the invariant fails.
- 注解
- Runs on the calling thread; the exception borrows the static file name; invokes no callbacks.
在文件 Result.cpp 第 6 行定义.
引用了 condition, file, info, line , 以及 message.
被这些函数引用 eve::detail::ResultObservation::assertCanBeOverwritten(), failResultExpectation() , 以及 eve::editing::detail::makeFailureStatus().
◆ childUuidBytes()
Derives a deterministic child UUID from a parent and a role.
在文件 Identity.cpp 第 173 行定义.
被这些函数引用 eve::detail::Id128< Tag >::child().
◆ failResultExpectation()
| EVENGINE_API_FOUNDATION void eve::detail::failResultExpectation | ( | const Status & | status, |
| std::string_view | message, | ||
| const char * | file, | ||
| unsigned | line, | ||
| bool | assertionsEnabled | ||
| ) |
Report a failed expect operation with its Status and caller context.
- 参数
-
status Failed outcome, borrowed during this call. message Caller context, borrowed during this call. file Static-lifetime source file name containing the check. line Source line containing the check. assertionsEnabled Assertion policy selected by the calling translation unit.
- 异常
-
zeroerr::AssertionData; terminates if assertions are disabled by the caller.
- 注解
- Runs synchronously; the exception borrows the static file name; invokes no callbacks.
在文件 Result.cpp 第 20 行定义.
引用了 checkResultInvariant(), context, description, file, line, message, status , 以及 text.
◆ formatUuidBytes()
| std::string eve::detail::formatUuidBytes | ( | const UuidBytes & | bytes | ) |
Formats UUID bytes as lower-case canonical 8-4-4-4-12 text.
在文件 Identity.cpp 第 161 行定义.
被这些函数引用 eve::detail::UuidIdState::assign(), eve::UuidIdAdapter< Tag >::canonicalFormat() , 以及 eve::detail::Id128< Tag >::format().
◆ moveAssignOptional()
| void eve::detail::moveAssignOptional | ( | std::optional< T > & | destination, |
| std::optional< U > && | source | ||
| ) |
◆ nextRegistryEventSequence()
| eve::Result< EventSequence > eve::detail::nextRegistryEventSequence | ( | EventSequence | current | ) |
Next event sequence, or a Failed diagnostic when it is exhausted.
在文件 VersionedRegistry.cpp 第 24 行定义.
引用了 current, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure() , 以及 eve::Result< T >::success().
◆ nextRegistryGeneration()
| eve::Result< Generation > eve::detail::nextRegistryGeneration | ( | Generation | current, |
| bool | present | ||
| ) |
Next generation of one slot; present false means the slot is new.
在文件 VersionedRegistry.cpp 第 15 行定义.
引用了 current, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), present , 以及 eve::Result< T >::success().
◆ parseUuidText()
|
noexcept |
Parses canonical UUID text without knowing the domain tag.
The tagged Id128<Tag> methods below only forward here. Keeping parse, format and derivation non-template means one machine-code copy each instead of one per domain tag, while the tag set stays open: adding a domain tag no longer duplicates any of them.
- 参数
-
text A 36-character UUID with 8-4-4-4-12 hexadecimal groups.
- 返回
- The bytes, or empty when the text is malformed.
在文件 Identity.cpp 第 135 行定义.
被这些函数引用 eve::detail::UuidIdState::assign() , 以及 eve::detail::Id128< Tag >::parse().
◆ validateRegistryNextSequence()
| eve::Result< void > eve::detail::validateRegistryNextSequence | ( | EventSequence | nextEventSequence | ) |
Validates the next-event-sequence floor of a restored registry image.
The versioning rules below hold for every VersionedRegistry<Key, Value, ...> instantiation, so they are defined once in VersionedRegistry.cpp instead of being emitted per key/value pair.
在文件 VersionedRegistry.cpp 第 10 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::detail::StrongUint64< Tag >::isZero(), eve::ParseError , 以及 eve::Result< T >::success().
被这些函数引用 eve::VersionedRegistry< Key, Value, EventData, Compare >::restoreState().