[omniORB] How to compile TypeCode
Tom Gardner
tomg@tomg.com
Wed, 19 Aug 1998 11:20:16 -0700
This is a multi-part message in MIME format.
--------------7DF718B17EEE611D2BE9C2FF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Ok. I get this error using omniORB 2.4.0:
/opt/omniORB/bin/omniidl2 CosPropertyService.idl
/opt/omniORB/bin/omniidl2: "/tmp/idli_0xqZxD.cc", line 42: error in
lookup of symbol: CORBA::TypeCode
/opt/omniORB/bin/omniidl2: "/tmp/idli_0xqZxD.cc", line 92: error in
lookup of symbol: PropertyTypes
/opt/omniORB/bin/omniidl2: "/tmp/idli_0xqZxD.cc", line 105: error in
lookup of symbol: PropertyTypes
/opt/omniORB/bin/omniidl2: "/tmp/idli_0xqZxD.cc", line 176: error in
lookup of symbol: PropertyTypes
/opt/omniORB/bin/omniidl2: CosPropertyService.idl: found 4 errors
On a different machine that has omniORB 2.5 ... the
compilation is successful. Thanks for the quick reply.
I thought I might pass along something else that I've found
that doesn't work on either release. When I redefine the
type "PropertyException" from a struct to an exception (the
ACE guys over at WUSTL have defined it this way for some
reason ... don't know why yet?), the omniidl2 compiler
core dumps on both releases.
I've included the IDL file with a comment around the
offending line.
Thanks again
tomg
Sai-Lai Lo wrote:
>
> Try this:
>
> typedef sequence<CORBA::TypeCode> PropertyTypes;
>
> As you known, TypeCode is conceptually part of the CORBA module, so you
> have to use CORBA::TypeCode. I think it is wrong for a IDL compiler to
> accept typedef sequence<TypeCode> p;
>
> Sai-Lai
>
> >>>>> Tom Gardner writes:
>
> > I'd like to compile the CosPropertyService module.
> > In it, is the declaration:
>
> > typedef sequence<TypeCode> PropertyTypes;
>
> > Does omniORB's IDL compiler have a provision to
> > compile types from the CORBA module? Specifically,
> > how do I resolve the "TypeCode" type above?
>
> > Orbix, for example, has the statement:
>
> > #include "orb.idl"
>
> > that allows these types to be resolved.
>
> --
> Dr. Sai-Lai Lo | Research Scientist
> |
> E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab
> | 24a Trumpington Street
> Tel: +44 223 343000 | Cambridge CB2 1QA
> Fax: +44 223 313542 | ENGLAND
--
--------------------------------------------------------
Tom Gardner e-mail: tomg@iopen.com
21120 Serene Way Phone: (408) 927-6687
San Jose, CA 95120-1217 Fax: (408) 927-6684
--------------------------------------------------------
--------------7DF718B17EEE611D2BE9C2FF
Content-Type: text/plain; charset=us-ascii; name="CosPropertyService.idl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="CosPropertyService.idl"
// Property Service v1.0 described in CORBAservices: Common Object Services Specification,
// chapter 13
// OMG IDL for CosPropertyService Module, p 13-29
module CosPropertyService
{
/*****************************************************/
/* Data Types */
/*****************************************************/
typedef string PropertyName;
struct Property {
PropertyName property_name;
any property_value;
};
enum PropertyModeType {
normal,
read_only,
fixed_normal,
fixed_readonly,
undefined
};
struct PropertyDef {
PropertyName property_name;
any property_value;
PropertyModeType property_mode;
};
struct PropertyMode {
PropertyName property_name;
PropertyModeType property_mode;
};
typedef sequence<PropertyName> PropertyNames;
typedef sequence<Property> Properties;
typedef sequence<PropertyDef> PropertyDefs;
typedef sequence<PropertyMode> PropertyModes;
typedef sequence<CORBA::TypeCode> PropertyTypes;
interface PropertyNamesIterator;
interface PropertiesIterator;
interface PropertySetFactory;
interface PropertySetDef;
interface PropertySet;
/*****************************************************/
/* Exceptions */
/*****************************************************/
exception ConstraintNotSupported{};
exception InvalidPropertyName {};
exception ConflictingProperty {};
exception PropertyNotFound {};
exception UnsupportedTypeCode {};
exception UnsupportedProperty {};
exception UnsupportedMode {};
exception FixedProperty {};
exception ReadOnlyProperty {};
enum ExceptionReason {
invalid_property_name,
conflicting_property,
property_not_found,
unsupported_type_code,
unsupported_property,
unsupported_mode,
fixed_property,
read_only_property
};
//-------------------------------------
// Right here. If this type is
// defined as an exception, omniidl2
// will core dump.
//-------------------------------------
// exception PropertyException {
struct PropertyException {
ExceptionReason reason;
PropertyName failing_property_name;
};
typedef sequence<PropertyException> PropertyExceptions;
exception MultipleExceptions {
PropertyExceptions exceptions;
};
/*****************************************************/
/* Interface Definitions */
/*****************************************************/
interface PropertySetFactory
{
PropertySet create_propertyset();
PropertySet create_constrained_propertyset(
in PropertyTypes allowed_property_types,
in Properties allowed_properties)
raises(ConstraintNotSupported);
PropertySet create_initial_propertyset(
in Properties initial_properties)
raises(MultipleExceptions);
};
/*---------------------------------------------------*/
interface PropertySetDefFactory
{
PropertySetDef create_propertysetdef();
PropertySetDef create_constrained_propertysetdef(
in PropertyTypes allowed_property_types,
in PropertyDefs allowed_property_defs)
raises(ConstraintNotSupported);
PropertySetDef create_initial_propertysetdef(
in PropertyDefs initial_property_defs)
raises(MultipleExceptions);
};
/*---------------------------------------------------*/
interface PropertySet
{
/* Support for defining and modifying properties */
void define_property(
in PropertyName property_name,
in any property_value)
raises(InvalidPropertyName,
ConflictingProperty,
UnsupportedTypeCode,
UnsupportedProperty,
ReadOnlyProperty);
void define_properties(
in Properties nproperties)
raises(MultipleExceptions);
/* Support for Getting Properties and their Names */
unsigned long get_number_of_properties();
void get_all_property_names(
in unsigned long how_many,
out PropertyNames property_names,
out PropertyNamesIterator rest);
any get_property_value(
in PropertyName property_name)
raises(PropertyNotFound,
InvalidPropertyName);
boolean get_properties(
in PropertyNames property_names,
out Properties nproperties);
void get_all_properties(
in unsigned long how_many,
out Properties nproperties,
out PropertiesIterator rest);
/* Support for Deleting Properties */
void delete_property(
in PropertyName property_name)
raises(PropertyNotFound,
InvalidPropertyName,
FixedProperty);
void delete_properties(
in PropertyNames property_names)
raises(MultipleExceptions);
boolean delete_all_properties();
/* Support for Existence Check */
boolean is_property_defined(
in PropertyName property_name)
raises(InvalidPropertyName);
};
/*---------------------------------------------------*/
interface PropertySetDef:PropertySet
{
/* Support for retrieval of PropertySet constraints*/
void get_allowed_property_types(
out PropertyTypes property_types);
void get_allowed_properties(
out PropertyDefs property_defs);
/* Support for defining and modifying properties */
void define_property_with_mode(
in PropertyName property_name,
in any property_value,
in PropertyModeType property_mode)
raises(InvalidPropertyName,
ConflictingProperty,
UnsupportedTypeCode,
UnsupportedProperty,
UnsupportedMode,
ReadOnlyProperty);
void define_properties_with_modes(
in PropertyDefs property_defs)
raises(MultipleExceptions);
/* Support for Getting and Setting Property Modes */
PropertyModeType get_property_mode(
in PropertyName property_name)
raises(PropertyNotFound,
InvalidPropertyName);
boolean get_property_modes(
in PropertyNames property_names,
out PropertyModes property_modes);
void set_property_mode(
in PropertyName property_name,
in PropertyModeType property_mode)
raises(InvalidPropertyName,
PropertyNotFound,
UnsupportedMode);
void set_property_modes(
in PropertyModes property_modes)
raises(MultipleExceptions);
};
/*---------------------------------------------------*/
interface PropertyNamesIterator
{
void reset();
boolean next_one(
out PropertyName property_name);
boolean next_n (
in unsigned long how_many,
out PropertyNames property_names);
void destroy();
};
/*---------------------------------------------------*/
interface PropertiesIterator
{
void reset();
boolean next_one(
out Property aproperty);
boolean next_n(
in unsigned long how_many,
out Properties nproperties);
void destroy();
};
};
--------------7DF718B17EEE611D2BE9C2FF--