/* * Copyright 2001 Borland Software Corporation, Inc. * * GENERATED CODE --- DO NOT EDIT * */ #ifndef __laskuri_idl___server #define __laskuri_idl___server #include "vpre.h" #include "laskuri_c.hh" class POA_testi { public: class iCarCounter : public testi::iCarCounter_ops ,public virtual PortableServer_ServantBase { protected: iCarCounter() {} virtual ~iCarCounter() {} public: static const CORBA::TypeInfo _skel_info; virtual const CORBA::TypeInfo *_type_info() const; testi::iCarCounter_ptr _this(); virtual void *_safe_narrow(const CORBA::TypeInfo& ) const; static iCarCounter * _narrow(PortableServer_ServantBase *_obj); // The following operations need to be implemented virtual void Inc() = 0; virtual CORBA::Long Count() = 0; virtual void Clear() = 0; // Skeleton Operations implemented automatically virtual void* _safe_downcast_ops(const VISOps_Info& _info) { if (_info == *testi::iCarCounter_ops::_desc()) return (void*)(testi::iCarCounter_ops*)this; return (void*)NULL; } static void _Inc(void *_obj, CORBA::MarshalInBuffer &_istrm, const char *_oper, VISReplyHandler& handler); static void _Count(void *_obj, CORBA::MarshalInBuffer &_istrm, const char *_oper, VISReplyHandler& handler); static void _Clear(void *_obj, CORBA::MarshalInBuffer &_istrm, const char *_oper, VISReplyHandler& handler); }; }; template class POA_testi_iCarCounter_tie : public POA_testi::iCarCounter { private: CORBA::Boolean _rel; PortableServer::POA_ptr _poa; T *_ptr; POA_testi_iCarCounter_tie(const POA_testi_iCarCounter_tie &) {} void operator=(const POA_testi_iCarCounter_tie &) {} public: POA_testi_iCarCounter_tie (T& t): _ptr(&t), _poa(NULL), _rel((CORBA::Boolean)0) {} POA_testi_iCarCounter_tie (T& t, PortableServer::POA_ptr poa): _ptr(&t), _poa(PortableServer_POA::_duplicate(poa)), _rel((CORBA::Boolean)0) {} POA_testi_iCarCounter_tie (T *p, CORBA::Boolean release= 1) : _ptr(p), _poa(NULL), _rel(release) {} POA_testi_iCarCounter_tie (T *p, PortableServer::POA_ptr poa, CORBA::Boolean release =1) : _ptr(p), _poa(PortableServer_POA::_duplicate(poa)), _rel(release) {} virtual ~POA_testi_iCarCounter_tie() { CORBA::release(_poa); if (_rel) { delete _ptr; } } T* _tied_object() { return _ptr; } void _tied_object(T& t) { if (_rel) { delete _ptr; } _ptr = &t; _rel = 0; } void _tied_object(T *p, CORBA::Boolean release=1) { if (_rel) { delete _ptr; } _ptr = p; _rel = release; } CORBA::Boolean _is_owner() { return _rel; } void _is_owner(CORBA::Boolean b) { _rel = b; } void Inc() { _ptr->Inc(); } CORBA::Long Count() { return _ptr->Count(); } void Clear() { _ptr->Clear(); } PortableServer::POA_ptr _default_POA() { if ( !CORBA::is_nil(_poa) ) { return _poa; } else { return PortableServer_ServantBase::_default_POA(); } } }; class _sk_testi { public: class _sk_iCarCounter : public POA_testi::iCarCounter, public PortableServer_RefCountServantBase, public testi::iCarCounter { protected: _sk_iCarCounter (const char *_obj_name = (const char*)NULL) { PortableServer_ServantBase::_object_name(_obj_name); } _sk_iCarCounter (const char *_service_name, const CORBA::ReferenceData& _data) { PortableServer_ServantBase::_service(_service_name, _data); } public: virtual ~_sk_iCarCounter() {} virtual PortableServer_ServantBase *_get_servant() { return this; } virtual CORBA::Object_ptr _backcompat_object() { return this; } testi::iCarCounter_ptr _this() { POA_testi::iCarCounter *_temp = this; return _temp->_this(); } void _release() { _remove_ref(); } void _ref() { _add_ref(); } const char *_repository_id() const { return PortableServer_ServantBase::_repository_id(); } }; }; template class testi_tie_iCarCounter : public POA_testi_iCarCounter_tie, public virtual CORBA_Object { private: testi_tie_iCarCounter (const testi_tie_iCarCounter &) : POA_testi_iCarCounter_tie((T *)NULL, (CORBA::Boolean)0) {} void operator=(const testi_tie_iCarCounter &) {} public: testi_tie_iCarCounter(T& _t, const char *_obj_name = (char *) NULL, CORBA::Boolean _r_f = 0) : POA_testi_iCarCounter_tie(&_t, _r_f) { PortableServer_ServantBase::_object_name(_obj_name); } testi_tie_iCarCounter(T& _t, const char *_serv_name, const CORBA::ReferenceData& _id, CORBA::Boolean _r_f = 0) : POA_testi_iCarCounter_tie(&_t, _r_f) { PortableServer_ServantBase::_service(_serv_name, _id); } CORBA::Boolean rel_flag() { return _is_owner(); } void rel_flag(CORBA::Boolean flag) { _is_owner(flag); } virtual ~testi_tie_iCarCounter() {} virtual PortableServer_ServantBase *_get_servant() { return this; } const char *repository_id() const { return PortableServer_ServantBase::_repository_id(); } }; #include "vpost.h" #endif // __laskuri_idl___server