[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.dsdp.rtsc] Re: statically inserting an instance handle into another module's mod state

Shreyas Prasad wrote:
Champs--

I'd like to find out whether RTSC permits the following scenario:
ModA's module state contains an array of IModB handles. Statically creating an instance of ModB1 which inherits from IModB should add the instance's handle to ModA's handle array. From ModA.xdc:


   struct Module_State {
       IModB.Handle    handles[];
   };

I'm not sure whether this is permissible because we don't have access to a static handle until we are in ModB1's instance$static$init. By this time, ModA's module$static$init has already been evaluated (per the order of evaluation chart at http://rtsc.eclipse.org/docs-tip/Creating_Configurable_Content). Hence, the module state has been sealed and we cannot insert the handle to the ModB1 instance into ModA's module state.

Thanks,

Shreyas

Hummm, this might be a hole. Have you tried it?

Note that although instance#static$init is not called until very late, the instance object itself already exists. So, it may be possible to statically create an array of all instances of all modules that implement a common interface.