[omniORB] Problem with method definitions

Perham, David A. (Mission Systems) david.perham at ngc.com
Mon Mar 26 16:57:17 BST 2007


Howdy: 
I am using Visual C++ .NET Version 7.1 and building IDL using omniOrb
Version 4.1.0. 
In the IDL I decalre an interface with several methods that have as
parameters various combinations of base and complex types. Here is an
example:



boolean RequestCreateEntity( in EntityCreateDataType EntityData, 
out long EntityId ) ; 
The complex types passed as parameter: 
typedef struct EntityCreateData 
{ 
string<100> EntityName ; 
string<8> EntityTag ; 
short EntityClass ; 
ENTITY_CLASSIFICATION_ENUM EntityClassification ; 
ENTITY_TYPE_ENUM EntityType ; 
boolean EntityActivationStatus ; 
ENTITY_CONTROL_FLAG_ENUM EntityControlFlag ; 
short EntityXPosition ; 
short EntityYPosition ; 
short EntityAltitude ; 
float EntityCourse ; 
short EntitySpeed ; 
} EntityCreateDataType ; 
In the Implementation class I define this method: 
bool RequestCreateEntity(EntityCreateData EntityData, 
long EntityId ) 
{ ... } 
When I attempt to build the implementation class I get the following
error on any method which has a structure type (or pointer to such) as a
parameter:
Form1.cpp(270) : error C2259: 'ObjectServerImpl' : cannot instantiate
abstract class 
due to following members: 
'CORBA::Boolean _impl_EntityInterface::RequestCreateEntity(const
EntityCreateDataType &,CORBA::Long &)' : pure virtual function was not
defined
Looking at the omniOrb generated .h and .cpp files, I can find the
_impl_EntityInterface class with the following definition:
virtual CORBA::Boolean RequestCreateEntity(const EntityCreateDataType&
EntityData, CORBA::Long& EntityId) = 0; 
Why does this signature not match the one (I thought) I was creating in
the idl? What am I missing here? Any help would be appreciated.
I have tried changing the parameters and return value of the methods to
CORBA::Long and CORBA::Boolean as well. 
Thanks, 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070326/206f5c30/attachment.htm


More information about the omniORB-list mailing list