[omniORB] About the TypeCode

zhang ji zsfunl@yahoo.com
Thu, 28 Feb 2002 11:45:14 -0800 (PST)


Hi all,

OpenGIS(http://www.opengis.org) issued one idl file
for CORBA which make different geo-data(vector data)
have a unify interface. The advantage is  the clients
can access different geo-data format based on the open
standard interfaces from the idl file.

What I do is that I want to implement the idl file
under omniORB environment. The idl file consists of
one module where includes all the interfaces inside.
Some of the content like below:
"
module OGIS {
// Forward declarations of interfaces
interface Geometry; // forward declarations
interface FeaturePropertySetIterator;
.....
// Common structures
typedef sequence<FeatureType> FeatureTypeSeq;
struct PropertyDef {
Istring name;
TypeCode type;      /*?omniidl can not recognise?*/
boolean required;
};
enum ValueType { /*?conflict with omni keywords?*
TypeBoolean, TypeChar, TypeOctet, TypeShort,
.....
TypeNumeric, TypeWKSGeometry
};
............
" 

The questions I met is
after i compile it with omniidl -bcxx ogis.idl
There are two errors like below(the error lines
indicated above with /*??*/):
"
ogis.idl:38: Error in look-up of `TypeCode':
`TypeCode' not found
ogis.idl:406: Identifier `ValueType' clashes with
keyword `valuetype'
"

My solutions are 
1.I made the module OGIS contained by module CORBA
like below,The omniidl can recognise the TypeCode:
module CORBA
{
    module OGIS {...}
}

2.i renamed the ValueType as another name(ValueTypes,
e.g.).

But both above changed the idl file from OpenGIS
issued original idl file. So I do not think the
solution is good for me. 
Any advices and comments on the problems are welcomed!

Thanks,
shifeng


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com