载入中...
搜索中...
未找到
eve::animation::AnimClipRegistry类 参考

Weak path→clip registry for animation hot reload. 更多...

#include <AnimClipRegistry.h>

类

struct  ReloadEvent
 Owning event value emitted after an EVA path reload attempt. 更多...
 

Public 类型

using ReloadCallback = std::function< void(const ReloadEvent &)>
 

静态 Public 成员函数

static void registerPath (const std::string &path, AnimClip *clip)
 Track a clip under a source path (keys are normalized).
 
static void unregister (AnimClip *clip)
 Forget a clip everywhere (called from ~AnimClip).
 
static std::vector< AnimClip * > findByPath (const std::string &path)
 Clips registered under a path; may be empty.
 
static bool hasPath (const std::string &path)
 Whether any clip is registered under this path.
 
static eve::Result< int > reloadPath (const std::string &path)
 Reload a path and report a structured import failure.
 
static eve::Subscription subscribeReload (ReloadCallback callback)
 Subscribe to reload attempts; token disposal is owner-thread-affine.
 
static std::uint64_t reloadCallbackFailureCount ()
 Number of reload listener exceptions contained so far.
 
static int count ()
 Total registered clips (tests).
 
static void clear ()
 Drop all entries (tests).
 
static std::string normalizePath (const std::string &path)
 Normalize a path to the registry key form.
 

详细描述

Weak path→clip registry for animation hot reload.

Animation::newClipFromAnimationFixtureText registers every clip it creates under its source path. When that *.anim.txt fixture changes, the "animclip" IAssetReloader re-imports the source and adopts the fresh content into the registered instances (AnimClip::adopt), so existing holders — state machines, scripts — keep valid pointers and see updated content without re-binding.

Entries hold raw pointers and are removed automatically by ~AnimClip; registrations must not outlive the clip (the engine's script bindings keep clips alive for the process lifetime, and tests use owning pointers).

在文件 AnimClipRegistry.h 第 30 行定义.

成员类型定义说明

◆ ReloadCallback

在文件 AnimClipRegistry.h 第 38 行定义.

成员函数说明

◆ clear()

void eve::animation::AnimClipRegistry::clear ( )
static

Drop all entries (tests).

在文件 AnimClipRegistry.cpp 第 149 行定义.

引用了 entries.

◆ count()

int eve::animation::AnimClipRegistry::count ( )
static

Total registered clips (tests).

在文件 AnimClipRegistry.cpp 第 143 行定义.

引用了 entries , 以及 n.

◆ findByPath()

std::vector< AnimClip * > eve::animation::AnimClipRegistry::findByPath ( const std::string &  path)
static

Clips registered under a path; may be empty.

在文件 AnimClipRegistry.cpp 第 97 行定义.

引用了 entries, normalizePath() , 以及 path.

被这些函数引用 eve::editor::AnimationRootMotionPreviewSource::sampleRootMotion().

◆ hasPath()

bool eve::animation::AnimClipRegistry::hasPath ( const std::string &  path)
static

Whether any clip is registered under this path.

在文件 AnimClipRegistry.cpp 第 102 行定义.

引用了 entries, normalizePath() , 以及 path.

◆ normalizePath()

std::string eve::animation::AnimClipRegistry::normalizePath ( const std::string &  path)
static

Normalize a path to the registry key form.

在文件 AnimClipRegistry.cpp 第 72 行定义.

引用了 c , 以及 path.

被这些函数引用 findByPath(), hasPath(), registerPath() , 以及 reloadPath().

◆ registerPath()

void eve::animation::AnimClipRegistry::registerPath ( const std::string &  path,
AnimClip *  clip 
)
static

Track a clip under a source path (keys are normalized).

在文件 AnimClipRegistry.cpp 第 79 行定义.

引用了 clip, entries, normalizePath() , 以及 path.

被这些函数引用 eve::animation::Animation::newClipFromAnimationFixtureText().

◆ reloadCallbackFailureCount()

std::uint64_t eve::animation::AnimClipRegistry::reloadCallbackFailureCount ( )
static

Number of reload listener exceptions contained so far.

在文件 AnimClipRegistry.cpp 第 141 行定义.

◆ reloadPath()

eve::Result< int > eve::animation::AnimClipRegistry::reloadPath ( const std::string &  path)
static

Reload a path and report a structured import failure.

返回
Refreshed clip count; an unknown path is a successful NoOp.
备注
The reload mutation is completed before listeners run. Listener exceptions are contained and counted, never used to roll back adopted clips.

在文件 AnimClipRegistry.cpp 第 104 行定义.

引用了 eve::Applied, clip, end, entries, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::animation::AnimImporter::importAnimationFixtureTextFile(), eve::NoOp, normalizePath(), path, eve::Status::success() , 以及 eve::Result< T >::success().

◆ subscribeReload()

eve::Subscription eve::animation::AnimClipRegistry::subscribeReload ( ReloadCallback  callback)
static

Subscribe to reload attempts; token disposal is owner-thread-affine.

在文件 AnimClipRegistry.cpp 第 137 行定义.

引用了 callback.

◆ unregister()

void eve::animation::AnimClipRegistry::unregister ( AnimClip *  clip)
static

Forget a clip everywhere (called from ~AnimClip).

在文件 AnimClipRegistry.cpp 第 85 行定义.

引用了 begin, clip , 以及 entries.

被这些函数引用 eve::animation::AnimClip::~AnimClip().


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