Question about self-referential class definition

in Help Center
Hi all,
I'm quite new to ICE and am now working on a server-side Java process which will expose an ICE interface for client app invocation. What I'm doing now is to define an .ice file and use slice2java for code generation. Everything looks pretty good until I want to define a class ABC which needs to contain a member variable with ABC array datatype (or List<ABC>).
I tried both:
Approach 1
=========================
sequence<ABC> MyList;
class ABC {
MyList attr1;
};
=========================
and
Approach 2
=========================
class ABC {
MyList attr1;
};
sequence<ABC> MyList;
=========================
and slice2java complained both.
May I ask the proper way to accomplish what I'm trying to do?
Thanks a lot!
Marco
I'm quite new to ICE and am now working on a server-side Java process which will expose an ICE interface for client app invocation. What I'm doing now is to define an .ice file and use slice2java for code generation. Everything looks pretty good until I want to define a class ABC which needs to contain a member variable with ABC array datatype (or List<ABC>).
I tried both:
Approach 1
=========================
sequence<ABC> MyList;
class ABC {
MyList attr1;
};
=========================
and
Approach 2
=========================
class ABC {
MyList attr1;
};
sequence<ABC> MyList;
=========================
and slice2java complained both.
May I ask the proper way to accomplish what I'm trying to do?
Thanks a lot!
Marco
0
Comments