Component factory
component_factory
¶
Classes¶
ComponentFactory
¶
Bases: BaseFactory
BaseComponent factory to create a component from a name or a class.
Attributes¶
SEP
class-attribute
instance-attribute
¶
SEP = '_'
The character used to separate the BaseComponent name from the loadcase.
Methods:¶
create
¶
create(base_class_name: str, **options: Any) -> Any
Return an instance of a class.
Parameters:
-
base_class_name(str) –The name of the family class of component to create.
-
**options(Any, default:{}) –The arguments to be passed to the class constructor.
Returns:
-
Any–The instance of the class.
Raises:
-
TypeError–If the class cannot be instantiated.
Source code in src\vimseo\core\components\component_factory.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |