载入中...
搜索中...
未找到

Move-only operation result for actions with no value payload. 更多...

#include <Result.h>

类 eve::Result< void > 继承关系图:
eve::detail::ResultObservation

Public 成员函数

 Result (const Result &)=delete
 
Result & operator= (const Result &)=delete
 
 Result (Result &&other)
 Move a result and transfer its debug observation responsibility.
 
Result & operator= (Result &&other)
 Move-assign after checking the destination's old result.
 
bool ok () const noexcept
 Whether this result represents a non-failure outcome.
 
const Status & status () const noexcept
 Inspect the structured operation status.
 
StatusCode code () const noexcept
 Inspect the stable operation code.
 
const std::vector< Diagnostic > & diagnostics () const noexcept
 Inspect all diagnostics; this counts as checking the Result.
 
const Diagnostic * error () const noexcept
 Inspect the first diagnostic, or null when none was supplied.
 
 operator bool () const noexcept
 Explicit boolean conversion for control-flow checks.
 
void value () const
 Mark a successful void operation as checked.
 
void ignore (std::string_view reason={}) const noexcept
 Explicitly discard this result after documenting the reason.
 
void expect (std::string_view message) const
 Require success for a void operation.
 

静态 Public 成员函数

static Result success ()
 Construct a successful void result.
 
static Result success (Status status)
 Construct a successful void result with an explicit status.
 
static Result failure (Status status)
 Construct a failed void result from a structured status.
 
static Result failure (Diagnostic diagnostic)
 Construct a failed void result from one structured diagnostic.
 

详细描述

Move-only operation result for actions with no value payload.

Result public API.

在文件 Result.h 第 433 行定义.

构造及析构函数说明

◆ Result() [1/2]

eve::Result< void >::Result ( const Result< void > &  )
delete

◆ Result() [2/2]

eve::Result< void >::Result ( Result< void > &&  other)
inline

Move a result and transfer its debug observation responsibility.

Result observation.

Adopt observation from.

在文件 Result.h 第 461 行定义.

成员函数说明

◆ code()

StatusCode eve::Result< void >::code ( ) const
inlinenoexcept

Inspect the stable operation code.

Observe.

在文件 Result.h 第 494 行定义.

◆ diagnostics()

const std::vector< Diagnostic > & eve::Result< void >::diagnostics ( ) const
inlinenoexcept

Inspect all diagnostics; this counts as checking the Result.

Observe.

在文件 Result.h 第 501 行定义.

被这些函数引用 eve::dnut::compileDnutConversations() , 以及 eve::editor::EditorSession::executeCommand().

◆ error()

const Diagnostic * eve::Result< void >::error ( ) const
inlinenoexcept

Inspect the first diagnostic, or null when none was supplied.

返回
Borrowed pointer into this Result's Status; nullptr when no diagnostic exists. @ownership Borrowed; the Result owns the diagnostic storage. @nullable Yes. @lifetime Valid until this Result is destroyed or move-assigned. @thread Affine to this Result; no synchronization. @reentrancy Does not invoke callbacks.

Observe.

在文件 Result.h 第 516 行定义.

◆ expect()

◆ failure() [1/2]

static Result eve::Result< void >::failure ( Diagnostic  diagnostic)
inlinestatic

Construct a failed void result from one structured diagnostic.

在文件 Result.h 第 455 行定义.

引用了 failure().

被这些函数引用 failure().

◆ failure() [2/2]

static Result eve::Result< void >::failure ( Status  status)
inlinestatic

Construct a failed void result from a structured status.

Ev assert.

Constructs a Result.

在文件 Result.h 第 447 行定义.

引用了 EV_ASSERT , 以及 status.

◆ ignore()

void eve::Result< void >::ignore ( std::string_view  reason = {}) const
inlinenoexcept

Explicitly discard this result after documenting the reason.

参数
reasonHuman-readable reason for intentionally ignoring the result.

Observe.

在文件 Result.h 第 537 行定义.

被这些函数引用 eve::attributes::AttributeSet::addModifier(), eve::particles::ParticleEffect::advanceRegisteredTimelines(), eve::ui::UI::animateItemOpacity(), eve::ui::UI::animateItemPos(), eve::statepatch::StatePatchStateAdapter::apply(), eve::hexmap::HexUnitRegistry::beginTravel(), eve::rts::RTSProductionActionAdapter::cancel(), eve::ui::ObjectRegistry::clear(), eve::ui::ObjectRegistry::clearAll(), eve::hexmap::HexMap::editElevation(), eve::hexmap::HexSphereMap::editElevation(), eve::hexmap::HexMap::editFeatureLevel(), eve::hexmap::HexSphereMap::editFeatureLevel(), eve::hexmap::HexMap::editTerrainType(), eve::hexmap::HexSphereMap::editTerrainType(), eve::hexmap::HexMap::editWaterLevel(), eve::hexmap::generateSphereMap(), eve::hexmap::loadHexMap(), eve::rpg::BattleSystem::registerSkillDamage(), eve::rpg::SettlementPipeline::run(), eve::rpg::Battle::setAction(), eve::procgen::PointSet::setBoolAttribute(), eve::hexmap::HexMap::setElevation(), eve::hexmap::HexSphereMap::setElevation(), eve::procgen::PointSet::setFloatAttribute(), eve::procgen::PointSet::setIntAttribute(), eve::hexmap::HexMap::setSpecialIndex(), eve::hexmap::HexSphereMap::setSpecialIndex(), eve::procgen::PointSet::setStringAttribute(), eve::procgen::PointSet::setVectorAttribute(), eve::particles::ParticleEffect::start(), eve::tactics::Tactics::Tactics(), eve::animation::AnimGraph::update(), eve::animation::AnimLayerMixer::update(), eve::animation::AnimSyncGroup::update(), eve::animation::AnimTrail::update(), eve::animation::ControlAnim::update(), eve::animation::ControlPose::update(), eve::animation::MotionMatcher::update(), eve::animation::PhysicalBalancePose::update(), eve::particles::ParticleEffect::updateTimeline(), eve::sensing::TargetingPipeline::withBuiltins(), eve::climbing::ScriptClimbingRuntime::~ScriptClimbingRuntime() , 以及 eve::sensing::ScriptSensingWorld::~ScriptSensingWorld().

◆ ok()

bool eve::Result< void >::ok ( ) const
inlinenoexcept

Whether this result represents a non-failure outcome.

Observe.

在文件 Result.h 第 480 行定义.

被这些函数引用 eve::graphics::raytracing::VulkanRayTracing::addMesh(), eve::graphics::raytracing::VulkanRayTracing::addTriangleMesh(), eve::dnut::SequenceRuntime::advance(), eve::graphics::raytracing::VulkanRayTracing::applyReflections(), eve::rpg::QuestReward::claim(), eve::rpg::WorldInteraction::collectLoot(), eve::procgen::RuntimeGeneration::deserializeCell(), eve::editor::EditConstraintPipeline::evaluate(), eve::editor::EditorSession::execute(), eve::scene_editor::SceneEditorSession::Impl::Impl(), eve::housegen::HouseGen::instantiate(), eve::animation::SmrNeuralProvider::isReady(), eve::dialogue::DialogueFlow::lintAllChecked(), eve::i18n::I18n::loadFromFile(), eve::i18n::I18n::loadFromJson(), eve::animation_editing::AnimationClipDocumentTarget::loadSnapshot(), eve::definitions_editing::DefinitionDocument::loadSnapshot(), eve::localization_editing::LocalizationDocument::loadSnapshot(), eve::map_editing::MapDocumentTarget::loadSnapshot(), eve::avatar::AvatarInstance::loadVroidModelPath(), eve::housegen_editing::HouseGenDocumentTarget::makeCreateComponent(), eve::graphics::raytracing::VulkanRayTracing::rebuildScene(), eve::rpg::RPGActor::removeStatus(), eve::dnut::SequenceRuntime::resumeStep(), eve::i18n::I18n::setLanguage(), eve::rpg::BattleVictory::settle(), eve::i18n::I18n::update(), eve::graphics::vulkan::Graphics::updateTexture(), eve::procgen_editing::ProcgenScriptDocumentTarget::validate() , 以及 eve::procgen_editing::TextureRecipeTarget::validate().

◆ operator bool()

eve::Result< void >::operator bool ( ) const
inlineexplicitnoexcept

Explicit boolean conversion for control-flow checks.

在文件 Result.h 第 523 行定义.

引用了 ok.

◆ operator=() [1/2]

Result & eve::Result< void >::operator= ( const Result< void > &  )
delete

◆ operator=() [2/2]

Result & eve::Result< void >::operator= ( Result< void > &&  other)
inline

Move-assign after checking the destination's old result.

Assert can be overwritten.

Adopt observation from.

在文件 Result.h 第 469 行定义.

◆ status()

const Status & eve::Result< void >::status ( ) const
inlinenoexcept

Inspect the structured operation status.

Observe.

在文件 Result.h 第 487 行定义.

被这些函数引用 main().

◆ success() [1/2]

static Result eve::Result< void >::success ( )
inlinestatic

Construct a successful void result.

在文件 Result.h 第 436 行定义.

◆ success() [2/2]

static Result eve::Result< void >::success ( Status  status)
inlinestatic

Construct a successful void result with an explicit status.

Ev assert.

Constructs a Result.

在文件 Result.h 第 439 行定义.

引用了 EV_ASSERT , 以及 status.

◆ value()

void eve::Result< void >::value ( ) const
inline

Mark a successful void operation as checked.

Observe.

Ev assert.

在文件 Result.h 第 526 行定义.

引用了 EV_ASSERT.

被这些函数引用 eve::rts::RTSCommandLog::apply(), eve::daynight::PcgLightingAmbientPhotoMode::setAuthority() , 以及 eve::daynight::PcgLightingAmbientPhotoMode::~PcgLightingAmbientPhotoMode().


该类的文档由以下文件生成: