[omniORB] Mutual inclusion
Aaron Van Couwenberghe
vanco@sonic.net
Sun, 28 Mar 1999 10:23:06 -0800
Hi all
I've got some problems with omniorb 2.7.1 and mutual inclusion.
omniidl does not complain about the situation at all (like it did in 2.5
when two interfaces depended on each other) but the stubs won't compile.
I have two interfaces, Traversal and Graphic, in separate files. Here is the
main body of each:
interface Traversal
{
enum order {up, down};
Region allocation();
Transform transformation();
boolean bounds(out Vertex lower, out Vertex upper, out Vertex origin);
boolean intersects();
// Traversal trail();
void traverseChild (in GraphicOffset o, in Region r, in Transform t);
void visit(in Graphic g);
order direction();
boolean ok();
};
interface Graphic : Cloneable
{
struct Requirement
{
boolean defined;
Coord natural, maximum, minimum;
Alignment align;
};
struct Requisition
{
Requirement x, y, z;
boolean preserve_aspect;
};
struct AllocationInfo
{
Region allocation;
Transform transformation;
Damage damaged;
};
// typedef sequence<AllocationInfo> AllocationInfoSeq;
typedef sequence<GraphicOffset> OffsetSeq;
typedef sequence<Graphic> GraphicSeq;
=20
Graphic cloneGraphic();
attribute Graphic body;
void append(in Graphic g);
void prepend(in Graphic g);
void addParent(in GraphicOffset g);
void removeParent(in GraphicOffset g);
GraphicOffset firstOffset();
GraphicOffset lastOffset();
void parentOffsets(inout OffsetSeq o);
Transform transformation();
void request(out Requisition r);
void extension(in AllocationInfo a, in Region r);
void shape(in Region r);
void traverse(in Traversal t);
void draw(in DrawTraversal t);
void pick(in PickTraversal t);
void allocations(in Collector d);
// void damages(inout DamageInfoSeq d);
void needRedraw();
void needRedrawRegion(in Region r);
void needResize();
// boolean restore_trail(in Traversal t);
};
All other interfaces required are forward declared, and some are included
from other files. Specifically, Traversal.idl includes Graphic.idl, and
Graphic.idl includes Traversal.idl.
Now, upon compiling GraphicSK.cc, here are the errors I recieve:
In file included from Graphic.hh:60,
from GraphicSK.cc:1:
Traversal.hh:124: =07raphicOffset_ptr' was not declared in this scope
Traversal.hh:124: parse error before ,'
Traversal.hh:125: =07raphic_ptr' was not declared in this scope
Traversal.hh:125: parse error before )'
Traversal.hh:192: =07raphicOffset_ptr' was not declared in this scope
Traversal.hh:192: parse error before ,'
Traversal.hh:193: =07raphic_ptr' was not declared in this scope
Traversal.hh:193: parse error before )'
Traversal.hh:219: =07raphicOffset_ptr' was not declared in this scope
Traversal.hh:219: parse error before ,'
Traversal.hh:220: =07raphic_ptr' was not declared in this scope
Traversal.hh:220: parse error before )'
Traversal.hh:277: =07raphicOffset_ptr' was not declared in this scope
Traversal.hh:277: parse error before ,'
Traversal.hh:285: =07raphic_ptr' was not declared in this scope
Traversal.hh:285: parse error before )'
Traversal.hh:338: =07raphicOffset_ptr' was not declared in this scope
Traversal.hh:338: parse error before ,'
Traversal.hh:339: =07raphic_ptr' was not declared in this scope
Traversal.hh:339: parse error before )'
Traversal.hh:395: =07raphicOffset_ptr' was not declared in this scope
Traversal.hh:395: parse error before ,'
Traversal.hh:403: =07raphic_ptr' was not declared in this scope
Traversal.hh:403: parse error before )'
Traversal.hh:474: =07raphicOffset_ptr' was not declared in this scope
Traversal.hh:474: parse error before ,'
Traversal.hh:478: =07raphic_ptr' was not declared in this scope
Traversal.hh:478: parse error before )'
Traversal.hh: In method =16oid _wrap_home_Traversal::traverseChild(...)':
Traversal.hh:475: undeclared (first use this function)
Traversal.hh:475: (Each undeclared identifier is reported only once
Traversal.hh:475: for each function it appears in.)
Traversal.hh:475: =12' undeclared (first use this function)
Traversal.hh:475: =14' undeclared (first use this function)
Traversal.hh: In method =16oid _wrap_home_Traversal::visit(...)':
Traversal.hh:479: =07' undeclared (first use this function)
Traversal.hh: At top level:
Traversal.hh:515: confused by earlier errors, bailing out
make: *** [GraphicSK.o] Error 1
Other undeclared identifiers came from Graphic.idl.
Now, having looked through the sources in GraphicSK.cc and TraversalSK.cc, I
know that all of these identifiers *are* declared. Is this a shortcoming of
g++ or a bug in omniidl?
Thanks in advance!
--=20
=2E.Aaron Van Couwenberghe... ..vanco@sonic.net.. ..aaronv@debian.org....
Berlin: http://www.berlin-consortium.org
Debian GNU/Linux: http://www.debian.org
"...Nothing astonishes men so much as common sense and plain dealing..."
-- Ralph Waldo Emerson