I have the following CORBA IDL 3.2, which tries to declare a mutually recursive structure:
Module SE {Interface SE {typedef unsigned mini MenuItemID; // A small integer representing a unique menu item enum menusection (collector, collectstrol); Structure menu action; // Further declaration union menusepenition parametric switches (menusubection) {case collecttract: menuitem sub-structure; // & lt; & Lt; & Lt; & Lt; & Lt; & Lt; & Lt; & Lt; & Lt; Use the next}; Structure MenuItemAction {Menu Membership Menu _subtion; Menuspace Permatator Menu_subaction_metmeter; }; }; // interface}; // module me from Sun JDK 1.7 idlj . SE Idl (line XX): Illegal reference menuItemAction for incomplete notification of type : This is not a "forwarded interface" announcement.
What is an "incomplete future announcement"? (If you have successfully declared it as a declaration, then I would not think that further announcement is incomplete, has not been defined yet, perhaps it is easy to misinterpret only).
More importantly, how do I manage to define my recursive structure?
I'm new to Korba, so I'm not really: -} Know what I'm doing. I do not know that Corba can not define such recurring structures; One transmits a special example that will not be recursive, in particular, it creates a tree, which should be "easy" to send the Korba.
Edit: Brian's correct answer was that I need to change the direct reference of further reference,
menu action sub-structure with
sequence & lt; MenuItemAction & gt; Sub_structure & gt; You can declare structs, but there are many restrictions.
P> Edit: I do not know which version of the costback you are using In it, it says in section 3.10.2.3 (Zor Khan):
IDL syntax allows generation of recursive structures and unions whose sequence types are Through this. and later:
IDL supports recursive types with structural and forwarding declarations for unions (as well as for the value case) .
and later:
An incomplete type can only appear in the form of element type of the sequence definition, with the incomplete element type a sequence one Incomplete sequence type is called.
An incomplete sequence type can only appear in the form of element of another sequence, or as a member of a structure or union definition
example :
struct foo; // Further declaration; Foo incomplete typedf sequence & lt; Foo & gt; FooSeq; // incomplete sequence type structure Foo {long value; Fusac series; // Used as imperfect CEC type structure member; Fine }; More information can be found in this link, including this example, which can be close to what you want to do:
union bar; // Forward Announcement Typing Sequence & lt; Bars & gt; BarSeq; Union Bar Switch (Long) {// Defined Incomplete Union Case 0: Long time l_mem; Case 1: Structure Fu {double d_mem; Bresack Nested; // OK, recurse} shutdown when shutting down // incomplete type; s_mem; };
No comments:
Post a Comment