No subject

Stephane Ruffieux Stephane.Ruffieux@blw.admin.ch
Thu, 23 Nov 2000 13:13:12 +0100



I have a cross reference in the C++ code generated. I Have two IDL file=
s with
following code:

-----------------------------------------------------------------------=
------
File Role.idl
...
#ifndef USERPROFILE_ROLE
#define USERPROFILE_ROLE
// forward declarations
interface Role;
interface Permission;

// definitions
/** Sequence of role IORs */
typedef sequence<Role> RoleList;

// includes
#include "Permission.idl"
#include "UserSession.idl"

// remote interface for entity 'Role'
....
-----------------------------------------------------------------------=
---------
File Permission.idl
...
#ifndef USERPROFILE_PERMISSION
#define USERPROFILE_PERMISSION
// include
#include "../../Generic/idl/Home.idl"

// forwards
interface Permission;

// definitions
/** Sequence of permission IORs */
typedef sequence<Permission> PermissionList;

// includes
#include "Role.idl"
#include "UserSession.idl"
...
-----------------------------------------------------------------------=
----------
In the files role.hh and permission.hh generated, all the "includes" ar=
e set at
the beginning of the files.
It gives a compiler error when I compile a file with an include of role=
.hh,
because in role.hh we make an include of permission.hh and in Permissio=
n.hh
RoleList is not defined.
With orbix it gives no error because the include is done after the code=

generated by the sequence declaration.

Does an IDL compilation option exist to resolve this problem?
Have you a solution to this problem?

Thanks for an answer.

St=E9phane Ruffieux
=