⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 store.c

📁 mico_example_siegel c源代码
💻 C
📖 第 1 页 / 共 3 页
字号:
    _a.struct_get_end() );}// Stub interface StoreAStore::Store::~Store(){}AStore::Store_ptr AStore::Store::_duplicate( Store_ptr _obj ){  if( !CORBA::is_nil( _obj ) )    _obj->_ref();  return _obj;}void *AStore::Store::_narrow_helper( const char *_repoid ){  if( strcmp( _repoid, "IDL:AStore/Store:1.0" ) == 0 )    return (void *)this;  return NULL;}bool AStore::Store::_narrow_helper2( CORBA::Object_ptr _obj ){  if( strcmp( _obj->_repoid(), "IDL:AStore/Store:1.0" ) == 0) {    return true;  }  for( vector<CORBA::Narrow_proto>::size_type _i = 0;       _narrow_helpers && _i < _narrow_helpers->size(); _i++ ) {    bool _res = (*(*_narrow_helpers)[ _i ])( _obj );    if( _res )      return true;  }  return false;}AStore::Store_ptr AStore::Store::_narrow( CORBA::Object_ptr _obj ){  AStore::Store_ptr _o;  if( !CORBA::is_nil( _obj ) ) {    void *_p;    if( (_p = _obj->_narrow_helper( "IDL:AStore/Store:1.0" )))      return _duplicate( (AStore::Store_ptr) _p );    if( _narrow_helper2( _obj ) ) {      _o = new AStore::Store_stub;      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );      return _o;    }  }  return _nil();}AStore::Store_ptr AStore::Store::_nil(){  return NULL;}AStore::AStoreId AStore::Store_stub::StoreId(){  CORBA::Request_var _req = this->_request( "_get_StoreId" );  _req->result()->value()->type( AStore::_tc_AStoreId );  _req->invoke();  #ifdef HAVE_EXCEPTIONS  if( _req->env()->exception() ) {    CORBA::Exception *_ex = _req->env()->exception();    CORBA::UnknownUserException *_uuex = CORBA::UnknownUserException::_narrow( _ex );    if( _uuex ) {      mico_throw( CORBA::UNKNOWN() );    } else {      mico_throw( *_ex );    }  }  #else  {    CORBA::Exception *_ex;    if( (_ex = _req->env()->exception()) )      CORBA::Exception::_throw_failed( _ex );  }  #endif  AStore::AStoreId _res;  *_req->result()->value() >>= _res;  return _res;}AStore::Store::StoreTotals AStore::Store_stub::Totals(){  CORBA::Request_var _req = this->_request( "_get_Totals" );  _req->result()->value()->type( AStore::Store::_tc_StoreTotals );  _req->invoke();  #ifdef HAVE_EXCEPTIONS  if( _req->env()->exception() ) {    CORBA::Exception *_ex = _req->env()->exception();    CORBA::UnknownUserException *_uuex = CORBA::UnknownUserException::_narrow( _ex );    if( _uuex ) {      mico_throw( CORBA::UNKNOWN() );    } else {      mico_throw( *_ex );    }  }  #else  {    CORBA::Exception *_ex;    if( (_ex = _req->env()->exception()) )      CORBA::Exception::_throw_failed( _ex );  }  #endif  AStore::Store::StoreTotals _res;  *_req->result()->value() >>= _res;  return _res;}AStore::Store_stub::~Store_stub(){}AStore::StoreAccess_ptr AStore::Store_stub::Login( POS::POSId Id ){  CORBA::Request_var _req = this->_request( "Login" );  _req->add_in_arg( "Id" ) <<= Id;  _req->result()->value()->type( AStore::_tc_StoreAccess );  _req->invoke();  #ifdef HAVE_EXCEPTIONS  if( _req->env()->exception() ) {    CORBA::Exception *_ex = _req->env()->exception();    CORBA::UnknownUserException *_uuex = CORBA::UnknownUserException::_narrow( _ex );    if( _uuex ) {      mico_throw( CORBA::UNKNOWN() );    } else {      mico_throw( *_ex );    }  }  #else  {    CORBA::Exception *_ex;    if( (_ex = _req->env()->exception()) )      CORBA::Exception::_throw_failed( _ex );  }  #endif  AStore::StoreAccess_ptr _res;  *_req->result()->value() >>= (AStore::StoreAccess_ptr&) _res;  return _res;}void AStore::Store_stub::GetPOSTotals( AStore::POSList*& POSData ){  CORBA::Request_var _req = this->_request( "GetPOSTotals" );  _req->add_out_arg( "POSData" );  _req->arguments()->item( 0 )->value()->type( AStore::_tc_POSList );  _req->result()->value()->type( CORBA::_tc_void );  _req->invoke();  #ifdef HAVE_EXCEPTIONS  if( _req->env()->exception() ) {    CORBA::Exception *_ex = _req->env()->exception();    CORBA::UnknownUserException *_uuex = CORBA::UnknownUserException::_narrow( _ex );    if( _uuex ) {      mico_throw( CORBA::UNKNOWN() );    } else {      mico_throw( *_ex );    }  }  #else  {    CORBA::Exception *_ex;    if( (_ex = _req->env()->exception()) )      CORBA::Exception::_throw_failed( _ex );  }  #endif  POSData = new ::AStore::POSList;  *_req->arguments()->item( 0 )->value() >>= *POSData;}void AStore::Store_stub::UpdateStoreTotals( POS::POSId Id, CORBA::Float Price, CORBA::Float Taxes ){  CORBA::Request_var _req = this->_request( "UpdateStoreTotals" );  _req->add_in_arg( "Id" ) <<= Id;  _req->add_in_arg( "Price" ) <<= Price;  _req->add_in_arg( "Taxes" ) <<= Taxes;  _req->result()->value()->type( CORBA::_tc_void );  _req->invoke();  #ifdef HAVE_EXCEPTIONS  if( _req->env()->exception() ) {    CORBA::Exception *_ex = _req->env()->exception();    CORBA::UnknownUserException *_uuex = CORBA::UnknownUserException::_narrow( _ex );    if( _uuex ) {      mico_throw( CORBA::UNKNOWN() );    } else {      mico_throw( *_ex );    }  }  #else  {    CORBA::Exception *_ex;    if( (_ex = _req->env()->exception()) )      CORBA::Exception::_throw_failed( _ex );  }  #endif}#ifdef HAVE_NAMESPACEnamespace AStore { vector<CORBA::Narrow_proto> * Store::_narrow_helpers; };#elsevector<CORBA::Narrow_proto> * AStore::Store::_narrow_helpers;#endif#ifdef HAVE_NAMESPACEnamespace AStore { CORBA::TypeCodeConst _tc_Store; };#elseCORBA::TypeCodeConst AStore::_tc_Store;#endifCORBA::Booleanoperator<<=( CORBA::Any &_a, const AStore::Store_ptr _obj ){  return (_a <<= CORBA::Any::from_object( _obj, "Store" ));}CORBA::Booleanoperator>>=( const CORBA::Any &_a, AStore::Store_ptr &_obj ){  CORBA::Object_ptr _o;  if( !(_a >>= CORBA::Any::to_object( _o )) )    return FALSE;  if( CORBA::is_nil( _o ) ) {    _obj = ::AStore::Store::_nil();    return TRUE;  }  _obj = ::AStore::Store::_narrow( _o );  CORBA::release( _o );  return TRUE;}// Stub interface StoreAccessAStore::StoreAccess::~StoreAccess(){}AStore::StoreAccess_ptr AStore::StoreAccess::_duplicate( StoreAccess_ptr _obj ){  if( !CORBA::is_nil( _obj ) )    _obj->_ref();  return _obj;}void *AStore::StoreAccess::_narrow_helper( const char *_repoid ){  if( strcmp( _repoid, "IDL:AStore/StoreAccess:1.0" ) == 0 )    return (void *)this;  return NULL;}bool AStore::StoreAccess::_narrow_helper2( CORBA::Object_ptr _obj ){  if( strcmp( _obj->_repoid(), "IDL:AStore/StoreAccess:1.0" ) == 0) {    return true;  }  for( vector<CORBA::Narrow_proto>::size_type _i = 0;       _narrow_helpers && _i < _narrow_helpers->size(); _i++ ) {    bool _res = (*(*_narrow_helpers)[ _i ])( _obj );    if( _res )      return true;  }  return false;}AStore::StoreAccess_ptr AStore::StoreAccess::_narrow( CORBA::Object_ptr _obj ){  AStore::StoreAccess_ptr _o;  if( !CORBA::is_nil( _obj ) ) {    void *_p;    if( (_p = _obj->_narrow_helper( "IDL:AStore/StoreAccess:1.0" )))      return _duplicate( (AStore::StoreAccess_ptr) _p );    if( _narrow_helper2( _obj ) ) {      _o = new AStore::StoreAccess_stub;      _o->MICO_SCOPE(CORBA,Object::operator=)( *_obj );      return _o;    }  }  return _nil();}AStore::StoreAccess_ptr AStore::StoreAccess::_nil(){  return NULL;}AStore::StoreAccess_stub::~StoreAccess_stub(){}void AStore::StoreAccess_stub::FindPrice( const char* Item, CORBA::Long Quantity, CORBA::Float& ItemPrice, CORBA::Float& ItemTaxPrice, AStore::ItemInfo*& IInfo ){  CORBA::Request_var _req = this->_request( "FindPrice" );  _req->add_in_arg( "Item" ) <<= CORBA::Any::from_string( (char *) Item, 0 );  _req->add_in_arg( "Quantity" ) <<= Quantity;  _req->add_out_arg( "ItemPrice" );  _req->arguments()->item( 2 )->value()->type( CORBA::_tc_float );  _req->add_out_arg( "ItemTaxPrice" );  _req->arguments()->item( 3 )->value()->type( CORBA::_tc_float );  _req->add_out_arg( "IInfo" );  _req->arguments()->item( 4 )->value()->type( AStore::_tc_ItemInfo );  _req->result()->value()->type( CORBA::_tc_void );  _req->invoke();  #ifdef HAVE_EXCEPTIONS  if( _req->env()->exception() ) {    CORBA::Exception *_ex = _req->env()->exception();    CORBA::UnknownUserException *_uuex = CORBA::UnknownUserException::_narrow( _ex );    if( _uuex ) {      if( !strcmp( _uuex->_except_repoid(), "IDL:AStore/BarcodeNotFound:1.0" ) ) {        CORBA::Any &_a = _uuex->exception( ::AStore::_tc_BarcodeNotFound );        ::AStore::BarcodeNotFound _user_ex;        _a >>= _user_ex;        mico_throw( _user_ex );      }      mico_throw( CORBA::UNKNOWN() );    } else {      mico_throw( *_ex );    }  }  #else  {    CORBA::Exception *_ex;    if( (_ex = _req->env()->exception()) )      CORBA::Exception::_throw_failed( _ex );  }  #endif  *_req->arguments()->item( 2 )->value() >>= ItemPrice;  *_req->arguments()->item( 3 )->value() >>= ItemTaxPrice;  IInfo = new ::AStore::ItemInfo;  *_req->arguments()->item( 4 )->value() >>= *IInfo;}#ifdef HAVE_NAMESPACEnamespace AStore { vector<CORBA::Narrow_proto> * StoreAccess::_narrow_helpers; };#elsevector<CORBA::Narrow_proto> * AStore::StoreAccess::_narrow_helpers;#endif#ifdef HAVE_NAMESPACEnamespace AStore { CORBA::TypeCodeConst _tc_StoreAccess; };#elseCORBA::TypeCodeConst AStore::_tc_StoreAccess;#endifCORBA::Booleanoperator<<=( CORBA::Any &_a, const AStore::StoreAccess_ptr _obj ){  return (_a <<= CORBA::Any::from_object( _obj, "StoreAccess" ));}CORBA::Booleanoperator>>=( const CORBA::Any &_a, AStore::StoreAccess_ptr &_obj ){  CORBA::Object_ptr _o;  if( !(_a >>= CORBA::Any::to_object( _o )) )    return FALSE;  if( CORBA::is_nil( _o ) ) {    _obj = ::AStore::StoreAccess::_nil();    return TRUE;  }  _obj = ::AStore::StoreAccess::_narrow( _o );  CORBA::release( _o );  return TRUE;}CORBA::Boolean operator<<=( CORBA::Any &_a, const SequenceTmpl<AStore::POSInfo> &_s ){  static CORBA::TypeCodeConst _tc =    "0000000000000013000000fc000000000000000f000000ec000000000000"    "001749444c3a4153746f72652f504f53496e666f3a312e30000000000008"    "504f53496e666f00000000040000000349640000000000150000002c0000"    "00000000001249444c3a504f532f504f5349643a312e3000000000000006"    "504f534964000000000000030000001553746f7265416363657373526566"    "6572656e6365000000000000000e00000034000000000000001b49444c3a"    "4153746f72652f53746f72654163636573733a312e3000000000000c5374"    "6f7265416363657373000000000b546f74616c53616c6573000000000006"    "0000000b546f74616c546178657300000000000600000000";  _a.type( _tc );  if( !_a.seq_put_begin( _s.length() ) )    return FALSE;  for( CORBA::ULong _i = 0; _i < _s.length(); _i++ )    if( !(_a <<= ((SequenceTmpl<AStore::POSInfo>&)_s)[ _i ]) )      return FALSE;  return _a.seq_put_end();}CORBA::Boolean operator>>=( const CORBA::Any &_a, SequenceTmpl<AStore::POSInfo> &_s ){  CORBA::ULong _len;  if( !_a.seq_get_begin( _len ) )    return FALSE;  _s.length( _len );  for( CORBA::ULong _i = 0; _i < _len; _i++ )    if( !(_a >>= _s[ _i ]) )      return FALSE;  return _a.seq_get_end();}struct __tc_init_STORE {  __tc_init_STORE()  {    AStore::_tc_ItemTypes = "00000000000000110000005a000000000000001949444c3a4153746f7265"    "2f4974656d54797065733a312e30000000000000000a4974656d54797065"    "730000000000000300000005666f6f640000000000000008636c6f746865"    "7300000000066f7468657200";    AStore::_tc_AStoreId = "000000000000001500000034000000000000001849444c3a4153746f7265"    "2f4153746f726549643a312e3000000000094153746f7265496400000000"    "00000003";    AStore::_tc_ItemInfo = "000000000000000f00000128000000000000001849444c3a4153746f7265"    "2f4974656d496e666f3a312e3000000000094974656d496e666f00000000"    "00000005000000054974656d000000000000001500000030000000000000"    "001449444c3a504f532f426172636f64653a312e30000000000842617263"    "6f6465000000001200000000000000094974656d74797065000000000000"    "00110000005a000000000000001949444c3a4153746f72652f4974656d54"    "797065733a312e30000000000000000a4974656d54797065730000000000"    "000300000005666f6f640000000000000008636c6f746865730000000006"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -