[Ace-users] [tao-users] Verify tao_idl client output

Sowayan, Abdullah (N-DUA) abdullah.sowayan at lmco.com
Tue Feb 12 15:59:59 CST 2008


Please provide the PROBLEM report form with every question that you post, so we can know which version of ACE/TAO you are using, and the configuration. Sometimes the answer depends on which version of the toolset you're using, and the configuration you have.

>How can this idl be modified such that class PublishedCandies provides 
>public: member access to CandySet and its internal  structure string values
>after getCandies( ) returns a pointer to PublishedCandies?

There is a standard IDL to C++ mapping defined by the OMG. Such mapping is the same for all C++ CORBA ORBs. I highly recommend that you review and understand the mapping. I recommend you get "Advanced CORBA Programming with C++" book.

But to answer your question, here is might how you'd do it in C++

PublishedCandies_var seq = candy_device->getCandies();

for(long i = 0; i < seq.length(); ++i)
  cout << seq[i].CandySetName.in() << endl;

Abdul Sowayan
Lockheed Martin

More information about the Ace-users mailing list