exosim.utils.klass_factory#
Functions#
|
It finds in the indicated python file a class that is a sublcass of the given one. |
|
It returns a class that is a subclass of the given base class. |
|
It looks for a class that is a subclass of the base class indicated. |
|
It looks in the input parameters for a class that is a subclass of the base class indicated, and it initialises it. |
Module Contents#
- find_klass_in_file(python_file, baseclass)[source]#
It finds in the indicated python file a class that is a sublcass of the given one.
- Parameters:
python_file (str) – python file name
baseclass (class) – reference class to search for
- Returns:
class found in the python file.
- Return type:
class
- load_klass(input, baseclass)[source]#
It returns a class that is a subclass of the given base class.
- Parameters:
input (str or class) – if is a string,
find_klass_in_fileis used to return the right class. If is a class, it checks whether it is an eligible class or not.baseclass (class) – reference class to search for
- Returns:
subclass of baseclass
- Return type:
class
- find_task(input, baseclass)[source]#
It looks for a class that is a subclass of the base class indicated.