[Ace-users] Re: [ciao-users] Using IDL interface as a parameter of a facet method

Gan Deng gan.deng at vanderbilt.edu
Fri Aug 17 11:11:18 CDT 2007

Hi Santos,

> I have an component declared like that:
> *ApplicationBase.idl
> interface CommandBase {
>   start();
> };
> typedef sequence<CommandBase> CommandsBase;
> interface ApplicationFacet {
>   submit (in CommandsBase comms);
> };
> In the *Application.idl i have:
> interface Create:CommandBase;
> interface Remove:CommandBase;
> component Application {
>   provides ApplicationFacet app_fac;
> };
> I need to implement the method start() for the classes Create and Remove 
> that inherit from CommandBase. As shown above, an array of CommandBase 
> sequence type is the argument for the facet method. I understand that as 
> Create and Remove are CORBA objects they will passed as reference to the 
> facet, is that correct? 

Yes, that's correct.

> Do I need to implement the Create and Remove 
> interfaces as ordinary CORBA objects? 

Sure you can.

> Do you think it would be better to 
> make CommandBase a supported type of a component like that:
> interface ICommandBaseFacet {
>   start();
> };
> component CreateCommand supports ICommandBaseFacet { }

I don't know the motivation of this. What is the logic behind of 
treating a CreateCommand as a CCM component?

> Or that would be better to use a valuetype?

In your case, I think ordinary CORBA interface should be fine, unless 
you have some other reasons.

> Sorry to ask all these questions but since I don't have much experience 
> with CORBA programming I would appreciatte if you can help me with an 
> advice of the best way to program that.

No problem! Please let us know if you have any other questions.

Take care,

More information about the Ace-users mailing list