|
from abc import ABC, abstractmethod |
|
|
|
|
|
class ModelVisitor(ABC): |
|
""" |
|
Abstract base class for model visitors. |
|
|
|
This class defines the interface for visiting a model generator. |
|
Subclasses must implement the visit method to define |
|
specific behaviors for different types of model generators. |
|
|
|
Methods: |
|
visit(generator, *args, **kwargs): |
|
Abstract method to visit the model generator. Subclasses |
|
must override this method to provide specific functionality. |
|
|
|
Example: |
|
class IbmTextGenerator(ModelVisitor): |
|
def visit(self, model_generator, *args, **kwargs): |
|
# Implement specific behavior here |
|
pass |
|
""" |
|
|
|
@abstractmethod |
|
def visit(self, generator, *args, **kwargs): |
|
pass |
|
|