📄 datarecovery.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 <DataRecovery.h>//// Interface declare ::DataRecovery//const char* DataRecovery::ids_[] ={ "IDL:DataRecovery:1.0", 0};voidSTARDuplicate(DataRecovery_ptr p){ if(p) p -> _STAR_incRef();}voidSTARRelease(DataRecovery_ptr p){ if(p) p -> _STAR_decRef();}DataRecovery_ptrDataRecovery::_narrow(CORBA::Object_ptr p){ if(!CORBA::is_nil(p)) { DataRecovery_ptr v = dynamic_cast<DataRecovery_ptr>(p); if(v) return _duplicate(v); if(p -> _is_a(ids_[0])) { DataRecovery_ptr val = new DataRecovery; val -> _STAR_copyFrom(p); return val; } } return _nil();}DataRecovery_ptrDataRecovery::_narrow(CORBA::AbstractBase_ptr p){ if(!CORBA::is_nil(p)) { CORBA::Object_var obj = p -> _to_object(); return _narrow(obj); } return _nil();}const char**DataRecovery::_STAR_ids() const{ return ids_;}const char**DataRecovery::_STAR_staticIds(){ return ids_;}voidSTARMarshal(DataRecovery_ptr _star_v, STAR::OutputStreamImpl* _star_out){ _star_out -> write_Object(_star_v);}voidSTARUnmarshal(DataRecovery_ptr& _star_v, STAR::InputStreamImpl* _star_in){ DataRecovery_var old = _star_v; CORBA::Object_var p = _star_in -> read_Object(); if(!CORBA::is_nil(p)) { _star_v = new DataRecovery; _star_v -> _STAR_copyFrom(p); } else _star_v = DataRecovery::_nil();}//// Operation declare ::DataRecovery::loseData//CORBA::ShortDataRecovery::loseData(const char* _star_a0, const char* _star_a1, const char* _star_a2, const char* _star_a3, const char* _star_a4){ 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("loseData", true); try { STAR::OutputStreamImpl* _star_out = _star_stub->_STAR_prePrepareHeader(_star_down); try { _star_out -> write_string(_star_a0); _star_out -> write_string(_star_a1); _star_out -> write_string(_star_a2); _star_out -> write_string(_star_a3); _star_out -> write_string(_star_a4); } 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 ::DataRecovery::nBeginGetData//CORBA::ShortDataRecovery::nBeginGetData(const char* _star_a0, const char* _star_a1, const char* _star_a2, const char* _star_a3, const char* _star_a4, const char* _star_a5, const char* _star_a6, CORBA::Short _star_a7, CORBA::Short _star_a8, CORBA::Short _star_a9, CORBA::Long_out _star_a10, CORBA::Short_out _star_a11){ 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("nBeginGetData", true); try { STAR::OutputStreamImpl* _star_out = _star_stub->_STAR_prePrepareHeader(_star_down); try { _star_out -> write_string(_star_a0); _star_out -> write_string(_star_a1); _star_out -> write_string(_star_a2); _star_out -> write_string(_star_a3); _star_out -> write_string(_star_a4); _star_out -> write_string(_star_a5); _star_out -> write_string(_star_a6); _star_out -> write_short(_star_a7); _star_out -> write_short(_star_a8); _star_out -> write_short(_star_a9); } 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(); _star_a10 = _star_in -> read_long(); _star_a11 = _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 ::DataRecovery::nGetNextData//CORBA::ShortDataRecovery::nGetNextData(::Records_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("nGetNextData", 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 Records; CORBA::ULong _star_len0 = _star_in -> read_ulong(); _star_a0 -> length(_star_len0); Record * _star_buf0 = _star_a0 -> get_buffer(); for(CORBA::ULong _star_i0 = 0 ; _star_i0 < _star_len0 ; _star_i0++) { CORBA::ULong _star_len1 = _star_in -> read_ulong(); _star_buf0[_star_i0].length(_star_len1); char* * _star_buf1 = _star_buf0[_star_i0].get_buffer(); for(CORBA::ULong _star_i1 = 0 ; _star_i1 < _star_len1 ; _star_i1++) { CORBA::string_free(_star_buf1[_star_i1]); _star_buf1[_star_i1] = 0; _star_buf1[_star_i1] = _star_in -> read_string(); } } } catch(const CORBA::SystemException& _star_ex)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -