Re: SDL-News: Object oriented SDL


Subject: Re: SDL-News: Object oriented SDL
From: Dagbjørn Nogva (dagbjorn#telox.no)
Date: Fri Apr 16 1999 - 13:12:55 GMT


Hello Hendrik,

> I am no SDL expert, and I was wondering if this is possible to do in SDL96:
>
> A process (Process1) is to communicate with another process.(Not to difficult :) ). Process1 will be instantiated at startup.
> The other process (Process2) is created and destroyed dynamically. There will be three different types that this process can be instantiated from, and which of these types it will be, will be decided upon at runtime.
>
> Is there any way to define a virtual Process2 type and define signal routes between Process1 and the virtual Process2. Then define three different process types that inherits the virtual process type and instantiate processes from any of these three types.

No, signal routes can only be connected to process instance sets, not
to types.

In order to be able to dynamically instantiate from the three different subtypes
of Process2, you need to define three different process instance sets, one for
each subtype of Process2. All three process sets must be contained in the same
block as Process1. This means that you need one create line as well as one
signal route from Process1 to each of the three process sets. As you probably
have noticed, a litte bit more complicted then you have suggested above.

If I understand your system correctly, the Process2 supertype does not need to
be virtual. Defining a type as virtual is only necessary if you plan to redefine
that particular type when you are subtyping the surrounding type, ie not
the type itself. Confused? Certainly not!

Have a nice weekend,
Dagbjørn Nogva <dagbjorn#telox.no>
Telox AS

Hello Hendrik,

I am no SDL expert, and I was wondering if this is possible to do in SDL96:

A process (Process1) is to communicate with another process.(Not to difficult :) ). Process1  will be instantiated at startup.
The other process (Process2) is created and destroyed dynamically. There will be three different types that this process can be instantiated from, and which of these types it will be, will be decided upon at runtime.

Is there any way to define a virtual Process2 type and define signal routes between Process1 and the virtual Process2.  Then define three different process types that inherits the virtual process type and instantiate processes from any of these three types.

No, signal routes can only be connected to process instance sets, not
to types.

In order to be able to dynamically instantiate from the three different subtypes
of Process2, you need to define three different process instance sets, one for
each subtype of Process2. All three process sets must be contained in the same
block as Process1. This means that you need one create line as well as one
signal route from Process1 to each of the three process sets. As you probably
have noticed, a litte bit more complicted then you have suggested above.

If I understand your system correctly, the Process2 supertype does not need to
be virtual. Defining a type as virtual is only necessary if you plan to redefine
that particular type when you are subtyping the surrounding type, ie not
the type itself. Confused? Certainly not!

Have a nice weekend,
Dagbjørn Nogva <dagbjorn#telox.no>
Telox AS
  -----End text from =?iso-8859-1?Q?Dagbj=F8rn?= Nogva to sdlnews ----- For help, email "majordomo#sdl-forum.org" with the body of your email as: help or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org



This archive was generated by hypermail 2a23 : Sun Jun 16 2013 - 10:41:40 GMT