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

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

#include <AnimClipRegistry.h>

静态 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 int reloadPath (const std::string &path)
 Re-import the source and adopt into every registered clip.
 
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::newClipFromEvaFile registers every clip it creates under its source path. When that .eva file 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.h23 行定义.

成员函数说明

◆ clear()

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

Drop all entries (tests).

在文件 AnimClipRegistry.cpp114 行定义.

◆ count()

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

Total registered clips (tests).

在文件 AnimClipRegistry.cpp108 行定义.

引用了 n.

◆ findByPath()

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

Clips registered under a path; may be empty.

在文件 AnimClipRegistry.cpp77 行定义.

引用了 normalizePath().

◆ hasPath()

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

Whether any clip is registered under this path.

在文件 AnimClipRegistry.cpp82 行定义.

引用了 normalizePath().

◆ normalizePath()

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

Normalize a path to the registry key form.

在文件 AnimClipRegistry.cpp52 行定义.

引用了 c.

被这些函数引用 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.cpp59 行定义.

引用了 normalizePath().

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

◆ reloadPath()

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

Re-import the source and adopt into every registered clip.

返回
number of clips refreshed (0 when the path is unknown or the source cannot be re-imported).

在文件 AnimClipRegistry.cpp84 行定义.

引用了 eve::animation::AnimImporter::importEvaFile() , 以及 normalizePath().

◆ unregister()

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

Forget a clip everywhere (called from ~AnimClip).

在文件 AnimClipRegistry.cpp65 行定义.

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


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