ORBit-2.0-cpp problem with mulitple interface inheritance



Hi,

I am having some difficulty with ORBit cpp (orbitcpp-1.3.4, ORBit2-2.6.0) and multiple inheritance of interfaces. I have the following file mi.idl:

module foo {

       interface Symbol {
               string name();
       };

       interface Hash {
               long hash();
       };

       interface Variable : Symbol, Hash {
       };
};

Compiling the idl and then the stubs file causes problems with multiple definition of Hash::hash() where the second definition should probably be Variable::hash().

[owe043 phi bug]$ orbit-idl-2 mi.idl ; orbit-idl-2 -l cpp mi.idl ; g++ -c mi-cpp.cc `pkg-config ORBit-2.0-cpp --cflags`
orbit-idl-2 2.6.0 compiling
mode, show preprocessor errors, passes: stubs skels common headers skel_impl imodule

orbit-idl-2 2.6.0 compiling
mode, show preprocessor errors, passes: stubs skels common headers skel_impl imodule


** (process:4194): WARNING **: orbit_idl_backend_func

In file included from mi-cpp.cc:7:
mi-cpp-stubs.cc:60: redefinition of `Long _orbitcpp::stub::foo::Hash::hash()'
mi-cpp-stubs.cc:36: `Long _orbitcpp::stub::foo::Hash::hash()' previously
  defined here
mi-cpp-stubs.cc:60: no `Long _orbitcpp::stub::foo::Hash::hash()' member
  function declared in class `_orbitcpp::stub::foo::Hash'
mi-cpp-stubs.cc:63: confused by earlier errors, bailing out


I have attached mi-cpp-stubs.cc (and mi-cpp-stubs.h) and listed below some of the relevant configuration details (I have been using GARNOME to build GNOME 2.2).

[owe043 phi bug]$ orbit-idl-2 --version
orbit-idl-2 2.6.0 - serial 19

[owe043 phi bug]$ pkg-config ORBit-2.0-cpp --cflags
-DORBIT2=1 -pthread -I/local_scratch/owe043/garnome/include/orbitcpp-2.0 -I/local_scratch/owe043/garnome/include/orbit-2.0 -I/local_scratch/owe043/garnome/include/linc-1.0 -I/local_scratch/owe043/garnome/include/glib-2.0 -I/local_scratch/owe043/garnome/lib/glib-2.0/include


--
Bowie Owens

CSIRO Mathematical & Information Sciences
phone  : +61 3 9545 8055
fax    : +61 3 9545 8080
mobile : 0425 729 875
email  : Bowie Owens csiro au


// -----------------------------------------------------
// generated by orbitcpp, do not edit
// -----------------------------------------------------


#include "mi-cpp-stubs.h"


// Stub code -------------------------------------------

	char * _orbitcpp::stub::foo::Symbol::name ()
{

	::_orbitcpp::CEnvironment _ev;
	char *_retval = foo_Symbol_name (_orbitcpp_cobj (),  _ev._orbitcpp_cobj ());
	_ev.propagate_sysex ();
		if (_ev->_major == ::CORBA_USER_EXCEPTION)
	{
		throw CORBA::UnknownUserException();
	}


	return _retval;
}

_orbitcpp::stub::foo::Symbol::Symbol (foo_Symbol cobject, bool take_copy /*= false */):
CORBA::Object(cobject, take_copy)
{}

	::_orbitcpp::stub::foo::Symbol * _orbitcpp::stub::foo::Symbol::_orbitcpp_wrap (foo_Symbol cobject, bool take_copy /* = false */)
{
	return new ::_orbitcpp::stub::foo::Symbol (cobject, take_copy);
}

	CORBA::Long _orbitcpp::stub::foo::Hash::hash ()
{

	::_orbitcpp::CEnvironment _ev;
	CORBA::Long _retval = foo_Hash_hash (_orbitcpp_cobj (),  _ev._orbitcpp_cobj ());
	_ev.propagate_sysex ();
		if (_ev->_major == ::CORBA_USER_EXCEPTION)
	{
		throw CORBA::UnknownUserException();
	}


	return _retval;
}

_orbitcpp::stub::foo::Hash::Hash (foo_Hash cobject, bool take_copy /*= false */):
CORBA::Object(cobject, take_copy)
{}

	::_orbitcpp::stub::foo::Hash * _orbitcpp::stub::foo::Hash::_orbitcpp_wrap (foo_Hash cobject, bool take_copy /* = false */)
{
	return new ::_orbitcpp::stub::foo::Hash (cobject, take_copy);
}

	CORBA::Long _orbitcpp::stub::foo::Hash::hash ()
{

	::_orbitcpp::CEnvironment _ev;
	CORBA::Long _retval = foo_Hash_hash (_orbitcpp_cobj (),  _ev._orbitcpp_cobj ());
	_ev.propagate_sysex ();
		if (_ev->_major == ::CORBA_USER_EXCEPTION)
	{
		throw CORBA::UnknownUserException();
	}


	return _retval;
}

_orbitcpp::stub::foo::Variable::Variable (foo_Variable cobject, bool take_copy /*= false */):
::_orbitcpp::stub::foo::Symbol(cobject, take_copy)
{}

	::_orbitcpp::stub::foo::Variable * _orbitcpp::stub::foo::Variable::_orbitcpp_wrap (foo_Variable cobject, bool take_copy /* = false */)
{
	return new ::_orbitcpp::stub::foo::Variable (cobject, take_copy);
}

// -----------------------------------------------------
// generated by orbitcpp, do not edit
// -----------------------------------------------------


#ifndef __ORBITCPP_IDL_MI_STUBS
#define __ORBITCPP_IDL_MI_STUBS


#include <string.h>
#include "mi-cpp-common.h"


// Stub declaration ------------------------------------

namespace _orbitcpp { namespace stub { 

namespace foo
{


class Symbol: public CORBA::Object, public ::foo::Symbol
{
	// These should really be private, but we make them protected
	//  to stop the compiler from generating warnings
protected:
	Symbol ();
	Symbol (Symbol const &src);
	Symbol (foo_Symbol cobject, bool take_copy = false); //orbitcpp-specific

public:
	static Symbol* _orbitcpp_wrap (foo_Symbol cobject, bool take_copy = false);

	char * name ();
};

} //namespace foo

}} //namespaces

namespace _orbitcpp { namespace stub { 

namespace foo
{


class Hash: public CORBA::Object, public ::foo::Hash
{
	// These should really be private, but we make them protected
	//  to stop the compiler from generating warnings
protected:
	Hash ();
	Hash (Hash const &src);
	Hash (foo_Hash cobject, bool take_copy = false); //orbitcpp-specific

public:
	static Hash* _orbitcpp_wrap (foo_Hash cobject, bool take_copy = false);

	CORBA::Long hash ();
};

} //namespace foo

}} //namespaces

namespace _orbitcpp { namespace stub { 

namespace foo
{


class Variable: public ::_orbitcpp::stub::foo::Symbol, public ::foo::Variable
{
	// These should really be private, but we make them protected
	//  to stop the compiler from generating warnings
protected:
	Variable ();
	Variable (Variable const &src);
	Variable (foo_Variable cobject, bool take_copy = false); //orbitcpp-specific

public:
	static Variable* _orbitcpp_wrap (foo_Variable cobject, bool take_copy = false);

	CORBA::Long hash ();
};

} //namespace foo

}} //namespaces


#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]