factory module¶
A factory to instantiate a derived class of BaseGrammar
.
- class gemseo.core.grammars.factory.GrammarFactory[source]¶
Bases:
object
A factory of
BaseGrammar
.- Return type
None
- create(class_name, name, **options)[source]¶
Create a grammar.
- Parameters
class_name (str) – The name of a class deriving from
BaseGrammar
.name (str) – The name to be given to the grammar.
**options (Any) – The options to be passed to the initialization.
- Return type
- is_available(class_name)[source]¶
Return whether a grammar class exists.
- Parameters
class_name (str) – The name of a class deriving from
BaseGrammar
.- Returns
Whether the grammar class exists.
- Return type