# Path: l2tscaffolder/definitions/interface.py
# class ScaffolderDefinition:
#   NAME = definitions.DEFINITION_UNDEFINED
#   def ValidatePath(self, root_path: str) -> bool:


from typing import Iterator
from typing import Type
from l2tscaffolder.definitions import interface

class DefinitionManager:
  """The definition manager."""

  _definition_classes = {}

  @classmethod
  def DeregisterDefinition(
      cls, definition_class: Type[interface.ScaffolderDefinition]):
    """Deregisters a definition class.

    Definition classes are identified by their NAME attribute.

    Args:
      definition_class (type): definition class (subclass of
          ScaffolderDefinition).

    Raises:
      KeyError: if definition class is not set for the corresponding name.
    """
    definition_name = definition_class.NAME

    if definition_name not in cls._definition_classes:
      raise KeyError('Definition class not set for name: {0:s}.'.format(
          definition_name))

    del cls._definition_classes[definition_name]

  @classmethod
  def GetDefinitionByName(

# Path: l2tscaffolder/definitions/interface.py
# class ScaffolderDefinition:
#   NAME = definitions.DEFINITION_UNDEFINED
#   def ValidatePath(self, root_path: str) -> bool:


# Path: l2tscaffolder/definitions/manager.py
from typing import Iterator
from typing import Type
from l2tscaffolder.definitions import interface


class DefinitionManager:
  """The definition manager."""

  _definition_classes = {}

  @classmethod
  def DeregisterDefinition(
      cls, definition_class: Type[interface.ScaffolderDefinition]):
    """Deregisters a definition class.

    Definition classes are identified by their NAME attribute.

    Args:
      definition_class (type): definition class (subclass of
          ScaffolderDefinition).

    Raises:
      KeyError: if definition class is not set for the corresponding name.
    """
    definition_name = definition_class.NAME

    if definition_name not in cls._definition_classes:
      raise KeyError('Definition class not set for name: {0:s}.'.format(
          definition_name))

    del cls._definition_classes[definition_name]

  @classmethod
  def GetDefinitionByName(

      cls, name: str) -> Type[interface.ScaffolderDefinition]: