[omniORB] function and sequence

Ronald Andrae wir04fge at studserv.uni-leipzig.de
Wed Jan 30 15:44:02 GMT 2008


Hello,

thanks for your help. But my problem is that the typ Feld_var can not be 
convert to Feld*.

Thanks.

renny.koshy at rubixinfotech.com schrieb:
> I believe you should be doing a CORBA::string_dup() on each string you are
> storing into a CORBA 'data structure'...  I personally find CORBA's memory
> management semantics a bit strange sometimes..
>
>         temp[0] = CORBA::string_dup("klaus at uni.de");
>         temp[1] = CORBA::string_dup("gustav at uni.de");
>         temp[2] = CORBA::string_dup("dieter at uni.de");
>
>
> Renny Koshy
>
>
>
>                                                                            
>              Ronald Andrae                                                 
>              <wir04fge at studser                                             
>              v.uni-leipzig.de>                                          To 
>              Sent by:                  omniorb-list at omniorb-support.com    
>              omniorb-list-boun                                          cc 
>              ces at omniorb-suppo                                             
>              rt.com                                                Subject 
>                                        [omniORB] function and sequence     
>                                                                            
>              01/30/2008 09:15                                              
>              AM                                                            
>                                                                            
>                                                                            
>                                                                            
>
>
>
>
> Hello,
>
> I have function, which returns a variable array (sequence).
>
> My IDL:
>
> typedef sequence<string> Feld;
>
> interface Student{
>     Feld getEmails();
> };
>
> My implementation:
>
> class Student_impl :  public POA_Student
> {
> public:
>
>     Feld * getEmails() {
>         Feld_var temp = new Feld;
>         temp->length(3);
>         temp[0] = "klaus at uni.de";
>         temp[1] = "gustav at uni.de";
>         temp[2] = "dieter at uni.de";
>         return temp;
>     }
> };
>
> There is a problem with the types Feld and Feld_var. Have anyone an
> idea, how i can fix this problem, so that I can use the array at the
> client side?
>
> Thanks
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
>
>   



More information about the omniORB-list mailing list