📄 queryserver.cpp
字号:
// *************************************************************************//// This File Is Automatically Generated by the StarBusIDL-to-C++ Compiler !//// Copyright (c) 2000// Network Information Security Institute,Computer College,NUDT.// ChangSha,Hunan,PRC//// All Rights Reserved//// *************************************************************************// Version: 3.0.2#include <STAR/CORBAClient.h>#include <STAR/CORBAServer.h>#include <queryserver.h>//// Interface declare ::IResult//const char* IResult::ids_[] ={ "IDL:IResult:1.0", 0};voidSTARDuplicate(IResult_ptr p){ if(p) p -> _STAR_incRef();}voidSTARRelease(IResult_ptr p){ if(p) p -> _STAR_decRef();}IResult_ptrIResult::_narrow(CORBA::Object_ptr p){ if(!CORBA::is_nil(p)) { IResult_ptr v = dynamic_cast<IResult_ptr>(p); if(v) return _duplicate(v); if(p -> _is_a(ids_[0])) { IResult_ptr val = new IResult; val -> _STAR_copyFrom(p); return val; } } return _nil();}IResult_ptrIResult::_narrow(CORBA::AbstractBase_ptr p){ if(!CORBA::is_nil(p)) { CORBA::Object_var obj = p -> _to_object(); return _narrow(obj); } return _nil();}const char**IResult::_STAR_ids() const{ return ids_;}const char**IResult::_STAR_staticIds(){ return ids_;}voidSTARMarshal(IResult_ptr _star_v, STAR::OutputStreamImpl* _star_out){ _star_out -> write_Object(_star_v);}voidSTARUnmarshal(IResult_ptr& _star_v, STAR::InputStreamImpl* _star_in){ IResult_var old = _star_v; CORBA::Object_var p = _star_in -> read_Object(); if(!CORBA::is_nil(p)) { _star_v = new IResult; _star_v -> _STAR_copyFrom(p); } else _star_v = IResult::_nil();}//// Operation declare ::IResult::nBegin//CORBA::ShortIResult::nBegin(CORBA::Short _star_a0){ bool _star_retry = true; while(true) { STAR::StubBase_var _star_stubBase = _STAR_getStub(); try { STAR::MarshalStub_ptr _star_stub = dynamic_cast<STAR::MarshalStub_ptr>(_star_stubBase.in()); if (_star_stub!=NULL) { for(;;) { STAR::Downcall_var _star_down = _star_stub->_STAR_createDowncall("nBegin", true); try { STAR::OutputStreamImpl* _star_out = _star_stub->_STAR_prePrepareHeader(_star_down); try { _star_out -> write_short(_star_a0); } catch(const CORBA::SystemException& _star_ex) { _star_stub->_STAR_marshalEx(_star_down, _star_ex); } _star_stub->_STAR_postPrepareHeader(_star_down); _star_stub->_STAR_request(_star_down); bool _star_uex; STAR::InputStreamImpl* _star_in = _star_stub->_STAR_preRemoveHeader(_star_down, _star_uex); if(_star_uex) { _star_stub->_STAR_postRemoveHeader(_star_down); } else { CORBA::Short _star_r; try { _star_r = _star_in -> read_short(); } catch(const CORBA::SystemException& _star_ex) { _star_stub->_STAR_unmarshalEx(_star_down, _star_ex); } _star_stub->_STAR_postRemoveHeader(_star_down); return _star_r; } } catch(const STAR::FailureException& _star_ex) { _star_stub->_STAR_handleNetworkFailureException(_star_down, _star_ex); } } } else { throw CORBA::INV_OBJREF(); } } catch(const STAR::ExceptionBase& _star_ex) { _STAR_handleException(_star_ex, _star_retry); } }}//// Operation declare ::IResult::nCommit//CORBA::ShortIResult::nCommit(CORBA::Short _star_a0){ bool _star_retry = true; while(true) { STAR::StubBase_var _star_stubBase = _STAR_getStub(); try { STAR::MarshalStub_ptr _star_stub = dynamic_cast<STAR::MarshalStub_ptr>(_star_stubBase.in()); if (_star_stub!=NULL) { for(;;) { STAR::Downcall_var _star_down = _star_stub->_STAR_createDowncall("nCommit", true); try { STAR::OutputStreamImpl* _star_out = _star_stub->_STAR_prePrepareHeader(_star_down); try { _star_out -> write_short(_star_a0); } catch(const CORBA::SystemException& _star_ex) { _star_stub->_STAR_marshalEx(_star_down, _star_ex); } _star_stub->_STAR_postPrepareHeader(_star_down); _star_stub->_STAR_request(_star_down); bool _star_uex; STAR::InputStreamImpl* _star_in = _star_stub->_STAR_preRemoveHeader(_star_down, _star_uex); if(_star_uex) { _star_stub->_STAR_postRemoveHeader(_star_down); } else { CORBA::Short _star_r; try { _star_r = _star_in -> read_short(); } catch(const CORBA::SystemException& _star_ex) { _star_stub->_STAR_unmarshalEx(_star_down, _star_ex); } _star_stub->_STAR_postRemoveHeader(_star_down); return _star_r; } } catch(const STAR::FailureException& _star_ex) { _star_stub->_STAR_handleNetworkFailureException(_star_down, _star_ex); } } } else { throw CORBA::INV_OBJREF(); } } catch(const STAR::ExceptionBase& _star_ex) { _STAR_handleException(_star_ex, _star_retry); } }}//// Operation declare ::IResult::nRollBack//CORBA::ShortIResult::nRollBack(CORBA::Short _star_a0){ bool _star_retry = true; while(true) { STAR::StubBase_var _star_stubBase = _STAR_getStub(); try { STAR::MarshalStub_ptr _star_stub = dynamic_cast<STAR::MarshalStub_ptr>(_star_stubBase.in()); if (_star_stub!=NULL) { for(;;) { STAR::Downcall_var _star_down = _star_stub->_STAR_createDowncall("nRollBack", true); try { STAR::OutputStreamImpl* _star_out = _star_stub->_STAR_prePrepareHeader(_star_down); try { _star_out -> write_short(_star_a0); } catch(const CORBA::SystemException& _star_ex) { _star_stub->_STAR_marshalEx(_star_down, _star_ex); } _star_stub->_STAR_postPrepareHeader(_star_down); _star_stub->_STAR_request(_star_down); bool _star_uex; STAR::InputStreamImpl* _star_in = _star_stub->_STAR_preRemoveHeader(_star_down, _star_uex); if(_star_uex) { _star_stub->_STAR_postRemoveHeader(_star_down); } else { CORBA::Short _star_r; try { _star_r = _star_in -> read_short(); } catch(const CORBA::SystemException& _star_ex) { _star_stub->_STAR_unmarshalEx(_star_down, _star_ex); } _star_stub->_STAR_postRemoveHeader(_star_down); return _star_r; } } catch(const STAR::FailureException& _star_ex) { _star_stub->_STAR_handleNetworkFailureException(_star_down, _star_ex); } } } else { throw CORBA::INV_OBJREF(); } } catch(const STAR::ExceptionBase& _star_ex) { _STAR_handleException(_star_ex, _star_retry); } }}//// Operation declare ::IResult::nGetRecord//CORBA::ShortIResult::nGetRecord(::Record_out _star_a0){ bool _star_retry = true; while(true) { STAR::StubBase_var _star_stubBase = _STAR_getStub(); try { STAR::MarshalStub_ptr _star_stub = dynamic_cast<STAR::MarshalStub_ptr>(_star_stubBase.in()); if (_star_stub!=NULL) { for(;;) { STAR::Downcall_var _star_down = _star_stub->_STAR_createDowncall("nGetRecord", true); try { _star_stub->_STAR_prePrepareHeader(_star_down); _star_stub->_STAR_postPrepareHeader(_star_down); _star_stub->_STAR_request(_star_down); bool _star_uex; STAR::InputStreamImpl* _star_in = _star_stub->_STAR_preRemoveHeader(_star_down, _star_uex); if(_star_uex) { _star_stub->_STAR_postRemoveHeader(_star_down); } else { CORBA::Short _star_r; try { _star_r = _star_in -> read_short(); _star_a0 = new Record; CORBA::ULong _star_len0 = _star_in -> read_ulong(); _star_a0 -> length(_star_len0); char* * _star_buf0 = _star_a0 -> get_buffer(); for(CORBA::ULong _star_i0 = 0 ; _star_i0 < _star_len0 ; _star_i0++) { CORBA::string_free(_star_buf0[_star_i0]); _star_buf0[_star_i0] = 0; _star_buf0[_star_i0] = _star_in -> read_string(); } } catch(const CORBA::SystemException& _star_ex) { _star_stub->_STAR_unmarshalEx(_star_down, _star_ex); } _star_stub->_STAR_postRemoveHeader(_star_down); return _star_r; } } catch(const STAR::FailureException& _star_ex)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -