[omniORB] Sequence of Sequence causes client compiler errors!!!
David Morgenlender
dmorgen@alum.mit.edu
Thu, 28 Jan 1999 18:49:00 GMT
I've defined a method with an output parameter which is a sequence of =
sequences.
Everything builds ok, until I try a call from a client, written in Visual=
C++
5.0. This gets a compiler error indicating the parameter has a =
mismatched data
type. I have similar code, which has a sequence of longs; this works =
ok.
Here are some excerpts from the code (simplified to only use the relevant
calling parameter):
.IDL
----
typedef sequence<long> SingleTestResultsList;
typedef sequence<SingleTestResultsList> TestResultsList;
void Test(out TestResultsList listTestResults);
=09
.HH
---
typedef _CORBA_Unbounded_Sequence_w_FixSizeElement<CORBA::Long,4,4>=20
SingleTestResultsList;
typedef _CORBA_Sequence_Var<SingleTestResultsList, CORBA::Long >=20
SingleTestResultsList_var;
typedef _CORBA_Unbounded_Sequence<
_CORBA_Unbounded_Sequence_w_FixSizeElement<CORBA::Long,4,4> >=20
TestResultsList;
typedef _CORBA_Sequence_Var<TestResultsList,=20
_CORBA_Unbounded_Sequence_w_FixSizeElement<CORBA::Long,4,4> >=20
TestResultsList_var;
virtual void _0RL__Test ( TestResultsList *& listTestResults ) =3D 0;
void Test ( _CORBA_Sequence_OUT_arg<
TestResultsList,TestResultsList_var >
listTestResults )
{
_0RL__Test ( listTestResults._data );
}
class Tests : public virtual omniObject, public virtual CORBA::Object {
public:
typedef _CORBA_Unbounded_Sequence_w_FixSizeElement<CORBA::Long,4,4>=20
SingleTestResultsList;
typedef _CORBA_Sequence_Var<SingleTestResultsList, CORBA::Long >=20
SingleTestResultsList_var;
typedef _CORBA_Unbounded_Sequence<
_CORBA_Unbounded_Sequence_w_FixSizeElement<CORBA::Long,4,4> >=20
TestResultsList;
typedef _CORBA_Sequence_Var<TestResultsList,=20
_CORBA_Unbounded_Sequence_w_FixSizeElement<CORBA::Long,4,4> >=20
TestResultsList_var;
virtual void _0RL__Test ( TestResultsList *& listTestResults ) =3D 0;
void Test ( =
_CORBA_Sequence_OUT_arg<TestResultsList,TestResultsList_var > =20
listTestResults )
{
_0RL__Test ( listTestResults._data );
}
Calling code in client
----------------------
Tests::TestResultsList seqResults;
=09
INTERFACE_TESTS->Test(&seqResults); // also tried without the "&"
=20
COMPILER ERROR
-------------- =20
error C2664: 'Test' : cannot convert parameter 1 from=20
'class _CORBA_Unbounded_Sequence<
class _CORBA_Unbounded_Sequence_w_FixSizeElement<long,4,4>> *'=20
to 'class _CORBA_Sequence_OUT_arg<class _CORBA_Unbounded_Sequence<
class _CORBA_Unbounded_Sequence_w_FixSizeElement<long,4,4>>,
class _CORBA_Sequence_Var<class _CORBA_Unbounded_Sequence<
class _CORBA_Unbounded_Sequence_w_FixSizeElement<long,4,4>>,
class _CORBA_Unbounded_Sequence_w_FixSizeElement<long,4,4>>>'
Any idea what's going on???
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Dave Morgenlender
e-mail: dmorgen@alum.mit.edu
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D