[omniORB] RE: Build omniEvents 2.6 error on Irix 6.5

caoy guaguo at vip.sina.com
Mon May 23 16:49:02 BST 2005


>Hi Alex Tingle: 
>
>I'm sorry to report bugs of omniEvents on Irix 6.5 again. This >times the MPISpro compiler's version is 7.2.1,a little lower. 
>
>Errors is in Servant.h line 60 : template parameter "T" is not >used in declaring the parameter types of function template. 
>
>00060 template<class T> 
>00061 typename T::_ptr_type 
>00062 createNarrowedReference(PortableServer::POA_ptr poa, const char* repositoryId) 

==================================================================
Hello Alex Tingle, I had changed this template function to macro,now omniEvents can be compiled successfully in SGI.

I added codes in Servant.h,Servant.cc.

////////////////////////
////    Servant.h
////////////////////////
...
#include "CosEventChannelAdmin.hh"
...

namespace OmniEvents {

#define DECL_CREATENARROWEDREF(type) \
        type::_ptr_type createNarrowedReference(PortableServer::POA_ptr poa, const char* repositoryId, type* dumb) \

DECL_CREATENARROWEDREF(CosEventChannelAdmin::ProxyPullConsumer);
DECL_CREATENARROWEDREF(CosEventChannelAdmin::ProxyPullSupplier);
DECL_CREATENARROWEDREF(CosEventChannelAdmin::ProxyPushConsumer);
DECL_CREATENARROWEDREF(CosEventChannelAdmin::ProxyPushSupplier);

}

///////////////////////
///   Servant.cc
///////////////////////

namespace OmniEvents {

#ifdef HAVE_OMNIORB4
    #define HELPER_NARROW(type) type::_unchecked_narrow(obj.in())
#else
    #define HELPER_NARROW(type) type::_narrow(obj.in())
#endif

#define IMPL_CREATENARROWEDREF(type) \
        DECL_CREATENARROWEDREF(type) \
        { \
           CORBA::Object_var obj = createReference(poa,repositoryId); \
           return HELPER_NARROW(type); \
        }

IMPL_CREATENARROWEDREF(CosEventChannelAdmin::ProxyPullConsumer);
IMPL_CREATENARROWEDREF(CosEventChannelAdmin::ProxyPullSupplier);
IMPL_CREATENARROWEDREF(CosEventChannelAdmin::ProxyPushConsumer);
IMPL_CREATENARROWEDREF(CosEventChannelAdmin::ProxyPushSupplier);

}

////////////////////////////////////////////////////
/// Calling that function in ProxyPullConsumer.cc
////////////////////////////////////////////////////

return createNarrowedReference(_managedPoa.in(), CosEventChannelAdmin::_tc_ProxyPullConsumer->id(), 
                             (CosEventChannelAdmin::ProxyPullConsumer*)0); 

That's all.

CaoY



______________________________________

===================================================================



More information about the omniORB-list mailing list