From 2f54a02cb74949486522b3d5376e35008d9c5226 Mon Sep 17 00:00:00 2001 From: Rajan Date: Mon, 21 Oct 2024 02:35:59 -0400 Subject: [PATCH] document classes --- samples/apps/cap/py/autogencap/actor_runtime.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/samples/apps/cap/py/autogencap/actor_runtime.py b/samples/apps/cap/py/autogencap/actor_runtime.py index ee81c8695102..f83c61701a2c 100644 --- a/samples/apps/cap/py/autogencap/actor_runtime.py +++ b/samples/apps/cap/py/autogencap/actor_runtime.py @@ -5,6 +5,8 @@ class IMsgActor(ABC): + """Abstract base class for message based actors.""" + @abstractmethod def on_connect(self, runtime: "IRuntime"): """Called when the actor connects to the runtime.""" @@ -36,8 +38,9 @@ def dispatch_message(self, message): pass -# Abstract base class for message receivers class IMessageReceiver(ABC): + """Abstract base class for message receivers. Implementations are runtime specific.""" + @abstractmethod def init(self, actor_name: str): """Initialize the message receiver.""" @@ -61,6 +64,8 @@ def stop(self): # Abstract base class for the runtime environment class IRuntime(ABC): + """Abstract base class for the actor runtime environment.""" + @abstractmethod def register(self, actor: IMsgActor): """Register an actor with the runtime."""