/* * Copyright 2001 Borland Software Corporation, Inc. * * GENERATED CODE --- DO NOT EDIT * */ #include #pragma hdrstop #include "laskuri_c.hh" testi::iCarCounter_ptr testi::iCarCounter_var::_duplicate(testi::iCarCounter_ptr _p) { return testi::iCarCounter::_duplicate(_p); } void testi::iCarCounter_var::_release(testi::iCarCounter_ptr _p) { CORBA::release((CORBA::Object_ptr)_p); } testi::iCarCounter_var::iCarCounter_var() : _ptr(testi::iCarCounter::_nil()) {} testi::iCarCounter_var::iCarCounter_var(testi::iCarCounter_ptr _p) : _ptr(_p) {} testi::iCarCounter_var::iCarCounter_var(const testi::iCarCounter_var& _var) : _ptr(testi::iCarCounter::_duplicate((testi::iCarCounter_ptr) _var)) {} testi::iCarCounter_var::~iCarCounter_var() { CORBA::release((CORBA::Object_ptr)_ptr); } testi::iCarCounter_var& testi::iCarCounter_var::operator=(const testi::iCarCounter_var& _var) { _release(_ptr); _ptr = _duplicate(_var._ptr); return *this; } testi::iCarCounter_var& testi::iCarCounter_var::operator=(testi::iCarCounter_ptr _p) { CORBA::release((CORBA::Object_ptr)_ptr); _ptr = _p; return *this; } testi::iCarCounter_ptr& testi::iCarCounter_var::out() { _release(_ptr); _ptr = (testi::iCarCounter_ptr)NULL; return _ptr; } testi::iCarCounter_ptr testi::iCarCounter_var::_retn() { testi::iCarCounter_ptr _tmp_ptr = _ptr; _ptr = (testi::iCarCounter_ptr)NULL; return _tmp_ptr; } VISistream& operator>>(VISistream& _strm, testi::iCarCounter_var& _var) { _strm >> _var._ptr; return _strm; } VISostream& operator<<(VISostream& _strm, const testi::iCarCounter_var& _var) { _strm << _var._ptr; return _strm; } Istream& operator>>(Istream& _strm, testi::iCarCounter_var& _var) { VISistream _istrm(_strm); _istrm >> _var._ptr; return _strm; } Ostream& operator<<(Ostream& _strm, const testi::iCarCounter_var& _var) { _strm << (CORBA::Object_ptr)_var._ptr; return _strm; } // If dllimport is specified, you might probably want to // disable these definitions // disable the const definitions const VISOps_Info testi::iCarCounter_ops::_ops_info("testi::iCarCounter_ops"); const VISOps_Info *testi::iCarCounter_ops::_desc() { return &_ops_info; } testi::iCarCounter_ops_ptr testi::iCarCounter_ops::_downcast(PortableServer::ServantBase* _servant) { if (_servant == (PortableServer::ServantBase*)NULL) return testi::iCarCounter_ops::_nil(); return (testi::iCarCounter_ops_ptr)_servant->_safe_downcast_ops(_ops_info); } const CORBA::TypeInfo #ifdef AIXV3 testi::iCarCounter::_class_info("testi::iCarCounter", "IDL:testi/iCarCounter:1.0", NULL, testi::iCarCounter::_factory, NULL, 0, NULL, 0, CORBA::Object::_desc(), 0L); #else testi::iCarCounter::_class_info("testi::iCarCounter", "IDL:testi/iCarCounter:1.0", NULL, testi::iCarCounter::_factory, NULL, 0, NULL, 0, CORBA::Object::_desc(), 0L); #endif const CORBA::TypeInfo *testi::iCarCounter::_desc() { return &_class_info; } const CORBA::TypeInfo *testi::iCarCounter::_type_info() const { return &_class_info; } VISistream& operator>>(VISistream& _strm, testi::iCarCounter_ptr& _obj) { CORBA::Object_var _var_obj(_obj); _var_obj = CORBA::Object::_read(_strm, testi::iCarCounter::_desc()); _obj = testi::iCarCounter::_narrow(_var_obj); return _strm; } VISostream& operator<<(VISostream& _strm, const testi::iCarCounter_ptr _obj) { _strm << (CORBA::Object_ptr)_obj; return _strm; } void* testi::iCarCounter::_safe_narrow(const CORBA::TypeInfo& _info) const { if (_info == _class_info) return (void *)this; return CORBA_Object::_safe_narrow(_info); } CORBA::Object *testi::iCarCounter::_factory() { return new testi::iCarCounter; } testi::iCarCounter_ptr testi::iCarCounter::_this() { return testi::iCarCounter::_duplicate(this); } testi::iCarCounter_ptr testi::iCarCounter::_narrow(CORBA::Object * _obj) { if (_obj == testi::iCarCounter::_nil()) return testi::iCarCounter::_nil(); else return testi::iCarCounter::_duplicate((testi::iCarCounter_ptr)_obj->_safe_narrow(_class_info)); } Ostream& operator<<(Ostream& _strm, const testi::iCarCounter_ptr _obj) { _strm << (CORBA::Object_ptr) _obj; return _strm; } Istream& operator>>(Istream& _strm, testi::iCarCounter_ptr& _obj) { VISistream _istrm(_strm); _istrm >> _obj; return _strm; } testi::iCarCounter *testi::iCarCounter::_bind(const char *_object_name, const char *_host_name, const CORBA::BindOptions *_opt, CORBA::ORB_ptr _orb) { VISCLEAR_EXCEP CORBA::Object_var _obj = CORBA::Object::_bind_to_object( "IDL:testi/iCarCounter:1.0", _object_name, _host_name, _opt, _orb); return iCarCounter::_narrow(_obj); } testi::iCarCounter *testi::iCarCounter::_bind(const char *_poa_name, const CORBA::OctetSequence& _id, const char *_host_name, const CORBA::BindOptions *_opt, CORBA::ORB_ptr _orb) { VISCLEAR_EXCEP CORBA::Object_var _obj = CORBA::Object::_bind_to_object( "IDL:testi/iCarCounter:1.0", _poa_name, _id, _host_name, _opt, _orb); return iCarCounter::_narrow(_obj); } #if defined(__BORLANDC__) #pragma option push #pragma warn -8057 #pragma warn -8004 #endif void testi::iCarCounter::Inc() { CORBA_MarshalInBuffer_var _ibuf; while (1) { VISCLEAR_EXCEP if (_is_local()) { PortableServer::ServantBase_ptr _servant; VISTRY { _servant = _preinvoke("Inc"); } VISCATCH(VISRemarshal, _vis_except) { continue; } VISEND_CATCH testi::iCarCounter_ops* _icarcounter = testi::iCarCounter_ops::_downcast(_servant); if (!_icarcounter) { if ((PortableServer::ServantBase*)_servant) _postinvoke(_servant, "Inc"); VISTHROW(CORBA::BAD_OPERATION()); #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return;) #endif } VISTRY { _icarcounter->Inc(); } VISCATCH_ALL{ _postinvoke(_servant, "Inc"); VISTHROW_LAST; #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return;) #endif } VISEND_CATCH _postinvoke(_servant, "Inc"); return; } CORBA::MarshalOutBuffer_var _obuf; _obuf = _request("Inc", 1); VISIF_EXCEP(return;) VISTRY { _ibuf = _invoke(_obuf); VISIFNOT_EXCEP break; VISEND_IFNOT_EXCEP } VISCATCH(VISRemarshal, _vis_except) { continue; } VISEND_CATCH #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return;) #endif } } #if defined(__BORLANDC__) #pragma option pop #endif #if defined(__BORLANDC__) #pragma option push #pragma warn -8057 #pragma warn -8004 #endif CORBA::Long testi::iCarCounter::Count() { CORBA::Long _ret = (CORBA::Long) 0; CORBA_MarshalInBuffer_var _ibuf; while (1) { VISCLEAR_EXCEP if (_is_local()) { PortableServer::ServantBase_ptr _servant; VISTRY { _servant = _preinvoke("Count"); } VISCATCH(VISRemarshal, _vis_except) { continue; } VISEND_CATCH testi::iCarCounter_ops* _icarcounter = testi::iCarCounter_ops::_downcast(_servant); if (!_icarcounter) { if ((PortableServer::ServantBase*)_servant) _postinvoke(_servant, "Count"); VISTHROW(CORBA::BAD_OPERATION()); #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return _ret;) #endif } VISTRY { _ret = _icarcounter->Count(); } VISCATCH_ALL{ _postinvoke(_servant, "Count"); VISTHROW_LAST; #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return _ret;) #endif } VISEND_CATCH _postinvoke(_servant, "Count"); return _ret; } CORBA::MarshalOutBuffer_var _obuf; _obuf = _request("Count", 1); VISIF_EXCEP(return _ret;) VISTRY { _ibuf = _invoke(_obuf); VISIFNOT_EXCEP break; VISEND_IFNOT_EXCEP } VISCATCH(VISRemarshal, _vis_except) { continue; } VISEND_CATCH #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return _ret;) #endif } VISistream& _istrm = *VISistream::_downcast(_ibuf); _istrm >> _ret; return _ret; } #if defined(__BORLANDC__) #pragma option pop #endif #if defined(__BORLANDC__) #pragma option push #pragma warn -8057 #pragma warn -8004 #endif void testi::iCarCounter::Clear() { CORBA_MarshalInBuffer_var _ibuf; while (1) { VISCLEAR_EXCEP if (_is_local()) { PortableServer::ServantBase_ptr _servant; VISTRY { _servant = _preinvoke("Clear"); } VISCATCH(VISRemarshal, _vis_except) { continue; } VISEND_CATCH testi::iCarCounter_ops* _icarcounter = testi::iCarCounter_ops::_downcast(_servant); if (!_icarcounter) { if ((PortableServer::ServantBase*)_servant) _postinvoke(_servant, "Clear"); VISTHROW(CORBA::BAD_OPERATION()); #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return;) #endif } VISTRY { _icarcounter->Clear(); } VISCATCH_ALL{ _postinvoke(_servant, "Clear"); VISTHROW_LAST; #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return;) #endif } VISEND_CATCH _postinvoke(_servant, "Clear"); return; } CORBA::MarshalOutBuffer_var _obuf; _obuf = _request("Clear", 1); VISIF_EXCEP(return;) VISTRY { _ibuf = _invoke(_obuf); VISIFNOT_EXCEP break; VISEND_IFNOT_EXCEP } VISCATCH(VISRemarshal, _vis_except) { continue; } VISEND_CATCH #if defined(_VIS_NOEXCEPTIONS) VISRETURN(return;) #endif } } #if defined(__BORLANDC__) #pragma option pop #endif