2020-09-10 15:03:57 +02:00
|
|
|
from .AFactory import AFactory
|
2020-05-08 15:07:10 +02:00
|
|
|
from .Entry import Entry
|
2020-04-21 10:29:02 +02:00
|
|
|
from .IRadiant import IRadiant
|
2020-09-10 15:03:57 +02:00
|
|
|
from abc import abstractmethod
|
2020-04-21 10:29:02 +02:00
|
|
|
|
|
|
|
|
2020-09-10 15:03:57 +02:00
|
|
|
class RadiantFactory(AFactory):
|
2020-04-21 10:29:02 +02:00
|
|
|
"""
|
|
|
|
A Factory creating objects of the type IRadiant
|
|
|
|
"""
|
|
|
|
|
2020-09-10 15:03:57 +02:00
|
|
|
@abstractmethod
|
|
|
|
def __init__(self, common_conf: Entry):
|
2020-04-21 10:29:02 +02:00
|
|
|
"""
|
|
|
|
Instantiate a new factory object
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
----------
|
2020-09-10 15:03:57 +02:00
|
|
|
common_conf : Entry
|
|
|
|
The common configuration of the configuration file
|
2020-04-21 10:29:02 +02:00
|
|
|
"""
|
2020-09-10 15:03:57 +02:00
|
|
|
super().__init__(common_conf)
|
2020-04-21 10:29:02 +02:00
|
|
|
|
2020-09-10 15:03:57 +02:00
|
|
|
@abstractmethod
|
2020-04-21 10:29:02 +02:00
|
|
|
def create(self, options: Entry, parent: IRadiant = None) -> IRadiant:
|
|
|
|
"""
|
|
|
|
Create a new object of the type IRadiant
|
|
|
|
|
|
|
|
Parameters
|
|
|
|
----------
|
|
|
|
options : Entry
|
|
|
|
The options to be used as parameters for the instantiation of the new object.
|
|
|
|
parent : IRadiant
|
|
|
|
The optional parent element of the object (necessary for subclasses of AOpticalComponent).
|
|
|
|
Returns
|
|
|
|
-------
|
|
|
|
obj : IRadiant
|
|
|
|
The created object
|
|
|
|
"""
|
2020-09-10 15:03:57 +02:00
|
|
|
pass
|