RegistrationHelper#

class omni.kit.manipulator.tool.snap.RegistrationHelper(module_name: str, base_class: Type)#

Bases: object

A helper class for registering provider classes.

This class is responsible for discovering and registering all provider classes that inherit from a specified base class within a given module. It ensures that all providers are registered upon initialization and unregistered when destroyed.

Parameters:
  • module_name – str Name of the module where provider classes are located.

  • base_class – Type The base class type that all providers should inherit from.

Methods

__init__(module_name, base_class)

Initializes the RegistrationHelper and registers all provider classes that inherit from the specified base class within the given module.

destroy()

Unregisters all previously registered provider classes and marks the helper as not registered.

__init__(
module_name: str,
base_class: Type,
)#

Initializes the RegistrationHelper and registers all provider classes that inherit from the specified base class within the given module.

Parameters:
  • module_name (str) – The name of the module where provider classes are located.

  • base_class (Type) – The base class type that all providers should inherit from.

destroy()#

Unregisters all previously registered provider classes and marks the helper as not registered.