[omniORB] about examples with sort of sequence
Patrizio Ferlito
pferlito@yahoo.com
Tue, 15 May 2001 23:50:51 -0700 (PDT)
Hi,
I thank you for your example but I would ask you a question about the sort of a sequence.
Do I have to write my sort procedure or the C++ mapping of sequence provides some usefull features
about the sort of a sequence ?
I thank you in advance.
Kind regards
Patrizio Ferlito
--- edward_lin <edward_lin@EGPALM.com.tw> wrote:
> Howdy,
> Hope the following sample helps you.
>
> IDL:
> interface MyInterface
> {
> typedef sequence<octet> randSeq;
> void getRandSeq( out randSeq tx );
> }
>
> Object Implementation:
> void MyInterface_i::getRandSeq( randSeq_out tx )
> {
> MyInterface::randSeq*& ptx = tx.ptr();
> //....
> CORBA::Octet* p = new CORBA::Octet[ len ];
> //....
> ptx = new MyInterface::randSeq(len,len,p);
> }
>
> Client:
> void hello( MyInterface_ptr e )
> {
> MyInterface::randSeq_var tx;
> e->getRandSeq( tx.out() );
> long len = tx.length();
> for ( i = 0; i < len; i++ )
> {
> cout << tx[i] << endl; // access
> }
> }
>
> Cheers and good luck,
>
> Edward Lin
>
>
> -----Original Message-----
> From: Thomas Amsler [mailto:tpamsler@ucdavis.edu]
> Sent: Tuesday, May 15, 2001 5:05 AM
> To: omniorb-list@uk.research.att.com
> Subject: [omniORB] Sequence examples
>
>
> Are there any examples on how to use sequences with omniORB?
> Thank you.
>
> --
> Thomas Amsler
> tpamsler@ucdavis.edu
> amsler@cs.ucdavis.edu
> http://einstein.dyndns.org
>
> "Imagination is more important than knowledge."
> --Albert Einstein
>
>
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/