Skip to content

EntropyCanvas::USDService

Service for USD plugin registration. More…

#include <USDService.h>

Inherits from EntropyEngine::Core::EntropyService, EntropyEngine::Core::EntropyObject

Name
~USDService() override =default
virtual voidunload() override
virtual EntropyEngine::Core::TypeSystem::TypeIDtypeId() const override
virtual voidstop() override
virtual voidstart() override
virtual const char *name() const override
virtual voidload() override
virtual const char *id() const override
virtual std::vector< EntropyEngine::Core::TypeSystem::TypeID >dependsOnTypes() const override
const std::string &appName() const
Get the application name used for plugin directory.
USDService(const std::string & appName)
Construct USDService with auto-derived plugin directory.
USDService(const std::string & appName, const std::string & pluginDirectory)
Construct USDService with explicit plugin directory.

Public Functions inherited from EntropyEngine::Core::EntropyService

Name
~EntropyService() override =default
virtual const char *version() const
ServiceStatestate() const
virtual std::vector< std::string >dependsOn() const
virtual const char *className() const override
Runtime class name for diagnostics and reflection.

Protected Functions inherited from EntropyEngine::Core::EntropyService

Name
voidsetState(ServiceState s)

Friends inherited from EntropyEngine::Core::EntropyService

Name
classEntropyServiceRegistry

Protected Classes inherited from EntropyEngine::Core::EntropyObject

Name
structHandleCore
Optional handle identity stamped by an owner/registry.

Public Functions inherited from EntropyEngine::Core::EntropyObject

Name
virtual~EntropyObject() =default
virtual const TypeSystem::TypeInfo *typeInfo() const
Optional richer type information; may be null.
booltryRetain() const
Attempts to retain only if the object is still alive.
virtual std::stringtoString() const
Human-readable short string (class@ptr by default).
voidretain() const
Increments the reference count.
voidrelease() const
Decrements the reference count and deletes when it reaches zero.
uint32_trefCount() const
Current reference count (approximate under contention).
EntropyObject &operator=(const EntropyObject & ) =delete
EntropyObject &operator=(EntropyObject && ) =delete
boolhasHandle() const
template <class OwnerT >
OwnerT *
handleOwnerAs() const
Returns the stamped owner pointer cast to the requested type.
const void *handleOwner() const
uint32_thandleIndex() const
uint64_thandleId() const
uint32_thandleGeneration() const
WeakControlBlock *getWeakControlBlock() const
Lazily retrieves or creates the weak control block.
virtual std::stringdescription() const
Long-form description; defaults to toString().
virtual std::stringdebugString() const
Debug-oriented string including refcount and handle when present.
virtual const char *className() const
Runtime class name for diagnostics and reflection.
virtual uint64_tclassHash() const
Stable type hash for cross-language identification.
EntropyObject() =default
EntropyObject(EntropyObject && ) =delete
EntropyObject(const EntropyObject & ) =delete

Protected Functions inherited from EntropyEngine::Core::EntropyObject

Name
void_setHandleIdentity(void * owner, uint32_t index, uint32_t generation)
void_clearHandleIdentity()

Protected Attributes inherited from EntropyEngine::Core::EntropyObject

Name
std::atomic< WeakControlBlock * >_weakBlock
Lazily allocated control block for weak refs.
std::atomic< uint32_t >_refCount
Thread-safe retain/release counter.
struct EntropyEngine::Core::EntropyObject::HandleCore_handle

Friends inherited from EntropyEngine::Core::EntropyObject

Name
structHandleAccess
class EntropyCanvas::USDService;

Service for USD plugin registration.

USDService handles:

  • USD plugin registration (file format handlers, asset resolvers)
  • Writes embedded plugInfo.json files to specified directory at runtime

Usage (simple - auto-derived path): USDService usdService(“MyApp”); usdService.load(); usdService.start();

Usage (explicit path): USDService usdService(“MyApp”, “/path/to/usd/plugins”); usdService.load(); usdService.start();

~USDService() override =default
virtual void unload() override

Reimplements: EntropyEngine::Core::EntropyService::unload

virtual EntropyEngine::Core::TypeSystem::TypeID typeId() const override

Reimplements: EntropyEngine::Core::EntropyService::typeId

virtual void stop() override

Reimplements: EntropyEngine::Core::EntropyService::stop

virtual void start() override

Reimplements: EntropyEngine::Core::EntropyService::start

inline virtual const char * name() const override

Reimplements: EntropyEngine::Core::EntropyService::name

virtual void load() override

Reimplements: EntropyEngine::Core::EntropyService::load

inline virtual const char * id() const override

Reimplements: EntropyEngine::Core::EntropyService::id

inline virtual std::vector< EntropyEngine::Core::TypeSystem::TypeID > dependsOnTypes() const override

Reimplements: EntropyEngine::Core::EntropyService::dependsOnTypes

inline const std::string & appName() const

Get the application name used for plugin directory.

explicit USDService(
const std::string & appName
)

Construct USDService with auto-derived plugin directory.

Parameters:

  • appName Application name (used for cache subdirectory)

Uses platform-appropriate cache directory:

  • macOS: ~/Library/Caches/{appName}/USD/
  • Linux: ~/.cache/{appName}/USD/
  • Windows: LOCALAPPDATAappName}\USD\
USDService(
const std::string & appName,
const std::string & pluginDirectory
)

Construct USDService with explicit plugin directory.

Parameters:

  • appName Application name for logging
  • pluginDirectory Directory where USD plugin files will be written

Updated on 2026-01-26 at 17:14:35 -0500