[omniORB] String sequence

Matej Kenda matejken at gmail.com
Fri Aug 22 20:15:45 BST 2008


Hi,

I usually use the features of _var helper classes to help with memory
management.

The function would look like this:

MyModule::MyClass::SeqStr* listContents(const char* locator)
 {
   std::cout << "Locator is " << locator << std::endl;

   MyModule::MyClass::SeqStr_var ret(new MyModule::MyClass::SeqStr);

   ret->length(5);
   ret[0] = "Please";
   ret[1] = "buy";
   ret[2] = "a book";
   ret[3] = "about";
   ret[4] = "CORBA!";
   return ret._retn();
 }

HTH,

Matej

On Thu, Aug 14, 2008 at 9:38 PM, Michael <omniorb at bindone.de> wrote:
> No guru questions, trivial. Until you get the book, you can download the
> c++ mapping spec for free from www.omg.org.
>



More information about the omniORB-list mailing list