Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled
32 lines
790 B
Python
32 lines
790 B
Python
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
from __future__ import annotations
|
|
|
|
from Base.Metadata import export, constmethod
|
|
from PropertyContainer import PropertyContainer
|
|
|
|
|
|
@export(
|
|
Initialization=True,
|
|
Constructor=True,
|
|
)
|
|
class ExtensionContainer(PropertyContainer):
|
|
"""
|
|
Base class for all objects which can be extended
|
|
Author: Stefan Troeger (stefantroeger@gmx.net)
|
|
Licence: LGPL
|
|
"""
|
|
|
|
def addExtension(self, identifier: str, /) -> None:
|
|
"""
|
|
Adds an extension to the object. Requires the string identifier for the python extension as argument
|
|
"""
|
|
...
|
|
|
|
@constmethod
|
|
def hasExtension(self, identifier: str, /) -> bool:
|
|
"""
|
|
Returns if this object has the specified extension
|
|
"""
|
|
...
|