use a sequence of Long. I have no problem handling 'in', 'inout', and
return type parameters... but I
am not able to use the 'out' type parameter.
On the client side everything works fine, instead on the SERVER side I
get some errors.
Environment:
Compiler: Tornado 2.0.2
Visibroker for C++ for Tornado v4.1c (CORBA 2.3 ORB)
Windows 2000
IDL:
----
module InterOpTest {
typedef sequence<long> LongSeq;
interface Itf1 {
LongSeq op16(in LongSeq argin, out LongSeq argout, inout LongSeq
arginout);
}
}
CLIENT SIDE: (everything compiles correctly)
------------
[...]
InterOpTest::LongSeq_var LongSeqIn, LongSeqOut, LongSeqInOut,
LongSeqRet;
LongSeqIn = new InterOpTest::LongSeq;
LongSeqIn->length((CORBA::ULong) 10); // set sequence length
CORBA::ULong i;
for (i=0; i<LongSeqIn->length(); ++i) {
LongSeqIn[i] = i+10;
}
LongSeqInOut = new InterOpTest::LongSeq;
LongSeqInOut->length((CORBA::ULong) 10);
for (i=0; i<LongSeqInOut->length(); ++i) {
LongSeqInOut[i] = i+20;
}
cout << "Calling: op16()" << endl;
LongSeqRet = manager->op16(LongSeqIn, LongSeqOut.out(),
LongSeqInOut.inout());
[...]
SERVER SIDE:
------------
InterOpTest::LongSeq* op16(const InterOpTest::LongSeq& _argin,
InterOpTest::LongSeq_out _argout,
InterOpTest::LongSeq& _arginout) {
cout << "Calling: op16()" << endl;
cout << "Parameters (LongSeq): in=" << _argin << ", inout=" <<
_arginout << endl;
CORBA::ULong i;
_argout = new InterOpTest::LongSeq;
_argout->length((CORBA::ULong) 10); //ERROR!!!
for (i=0; i<_argout->length(); ++i) {
_argout[i] = i+30;
}
_arginout.length((CORBA::ULong) 10); // OK
for (i=0; i<_arginout.length(); ++i) {
_arginout[i] = i+40;
}
InterOpTest::LongSeq_var LongSeqRet;
LongSeqRet = new InterOpTest::LongSeq;
LongSeqRet->length((CORBA::ULong) 10); // OK
for (i=0; i<LongSeqRet->length(); ++i) {
LongSeqRet[i] = i+50;
}
return (LongSeqRet._retn());
}
if I use the syntax:
_argout->length((CORBA::ULong) 10);
I get the error message:
"base operand of `->' is not a pointer"
If I use:
_argout.length((CORBA::ULong) 10);
I get the error message:
"no matching function for call to `InterOpTest::LongSeq_out::length
(long unsigned int)'"
Please answer also by mail... I read the newsgroup via web and I
wouldn't like to miss any answer.
Thanks in avance for your help!