📄 bank_skel.cpp
字号:
// **************************************************************************
//
// This File Is Automatically Generated by the InterBusIDL-to-C++ Compiler !
//
// Copyright (c) 2000
// Intervision Software Co., Ltd.
// Haidian District, Beijing.
//
// All Rights Reserved
//
// *************************************************************************
// Version: 4.0.0
#include "StdAfx.h"
#include <STAR/CORBAServer.h>
#include <bank_skel.h>
//
// ProtectedOperation declare log
//
void
POA_BankAccount::_STAR_op_log(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
STAR::StrForStruct _star_a0;
CORBA::Boolean _star_r;
STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
_star_a0 = _star_in -> read_string();
_STAR_postRemoveHeader(_star_up);
POA_BankAccount * objImpl=dynamic_cast< POA_BankAccount*>( serv );
if(objImpl!=NULL)
{
_star_r = objImpl ->log(_star_a0);
}
STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
_star_out -> write_boolean(_star_r);
_STAR_postPrepareHeader(_star_up);
}
//
// ProtectedOperation declare authentificate
//
void
POA_BankAccount::_STAR_op_authentificate(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
STAR::StrForStruct _star_a0;
CORBA::Boolean _star_r;
STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
_star_a0 = _star_in -> read_string();
_STAR_postRemoveHeader(_star_up);
POA_BankAccount * objImpl=dynamic_cast< POA_BankAccount*>( serv );
if(objImpl!=NULL)
{
_star_r = objImpl ->authentificate(_star_a0);
}
STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
_star_out -> write_boolean(_star_r);
_STAR_postPrepareHeader(_star_up);
}
//
// ProtectedOperation declare requery
//
void
POA_BankAccount::_STAR_op_requery(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
CORBA::Double _star_r;
_STAR_preRemoveHeader(_star_up);
_STAR_postRemoveHeader(_star_up);
POA_BankAccount * objImpl=dynamic_cast< POA_BankAccount*>( serv );
if(objImpl!=NULL)
{
_star_r = objImpl ->requery();
}
STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
_star_out -> write_double(_star_r);
_STAR_postPrepareHeader(_star_up);
}
//
// ProtectedOperation declare withdraw
//
void
POA_BankAccount::_STAR_op_withdraw(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
CORBA::Short _star_a0;
CORBA::Boolean _star_r;
STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
_star_a0 = _star_in -> read_short();
_STAR_postRemoveHeader(_star_up);
POA_BankAccount * objImpl=dynamic_cast< POA_BankAccount*>( serv );
if(objImpl!=NULL)
{
_star_r = objImpl ->withdraw(_star_a0);
}
STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
_star_out -> write_boolean(_star_r);
_STAR_postPrepareHeader(_star_up);
}
//
// ProtectedOperation declare deposit
//
void
POA_BankAccount::_STAR_op_deposit(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
CORBA::Short _star_a0;
CORBA::Boolean _star_r;
STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
_star_a0 = _star_in -> read_short();
_STAR_postRemoveHeader(_star_up);
POA_BankAccount * objImpl=dynamic_cast< POA_BankAccount*>( serv );
if(objImpl!=NULL)
{
_star_r = objImpl ->deposit(_star_a0);
}
STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
_star_out -> write_boolean(_star_r);
_STAR_postPrepareHeader(_star_up);
}
//
// ProtectedOperation declare alterPAW
//
void
POA_BankAccount::_STAR_op_alterPAW(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
STAR::StrForStruct _star_a0;
CORBA::Boolean _star_r;
STAR::InputStreamImpl* _star_in = _STAR_preRemoveHeader(_star_up);
_star_a0 = _star_in -> read_string();
_STAR_postRemoveHeader(_star_up);
POA_BankAccount * objImpl=dynamic_cast< POA_BankAccount*>( serv );
if(objImpl!=NULL)
{
_star_r = objImpl ->alterPAW(_star_a0);
}
STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
_star_out -> write_boolean(_star_r);
_STAR_postPrepareHeader(_star_up);
}
//
// ProtectedOperation declare leave
//
void
POA_BankAccount::_STAR_op_leave(PortableServer::ServantBase * serv,STAR::Upcall_ptr _star_up)
{
CORBA::Boolean _star_r;
_STAR_preRemoveHeader(_star_up);
_STAR_postRemoveHeader(_star_up);
POA_BankAccount * objImpl=dynamic_cast< POA_BankAccount*>( serv );
if(objImpl!=NULL)
{
_star_r = objImpl ->leave();
}
STAR::OutputStreamImpl* _star_out = _STAR_prePrepareHeader(_star_up);
_star_out -> write_boolean(_star_r);
_STAR_postPrepareHeader(_star_up);
}
//
// Interface declare ::BankAccount
//
CORBA::Boolean
POA_BankAccount::_is_a(const char* type)
throw(CORBA::SystemException)
{
const char** _star_ids = BankAccount::_STAR_staticIds();
for(CORBA::ULong _star_i = 0 ; _star_ids[_star_i] != 0 ; _star_i++)
if(strcmp(type, _star_ids[_star_i]) == 0)
return true;
return false;
}
CORBA::RepositoryId
POA_BankAccount::_primary_interface(const PortableServer::ObjectId&,
PortableServer::POA_ptr)
{
return CORBA::string_dup(BankAccount::_STAR_staticIds()[0]);
}
BankAccount_ptr
POA_BankAccount::_this()
{
CORBA::Object_var obj = _STAR_buildReference();
BankAccount_var result = BankAccount::_narrow(obj);
return result._retn();
}
void
POA_BankAccount::_STAR_dispatch(STAR::Upcall_ptr _star_up)
{
static const PortableServer::OperationTableEntry BankAccount_Optable_fixed[] =
{
{"_interface",PortableServer::ServantBase::_STAR_op_get_interface},
{"_is_a",PortableServer::ServantBase::_STAR_op_is_a},
{"_non_existent",PortableServer::ServantBase::_STAR_op_non_existent}
};
static const PortableServer::OperationTableEntry BankAccount_Optable_unfixed[] =
{
{"alterPAW",POA_BankAccount::_STAR_op_alterPAW},
{"authentificate",POA_BankAccount::_STAR_op_authentificate},
{"deposit",POA_BankAccount::_STAR_op_deposit},
{"leave",POA_BankAccount::_STAR_op_leave},
{"log",POA_BankAccount::_STAR_op_log},
{"requery",POA_BankAccount::_STAR_op_requery},
{"withdraw",POA_BankAccount::_STAR_op_withdraw}
};
static const CORBA::ULong _star_methodCount = 7;
PortableServer::operationSkel operation;
if(_STAR_locateOperation(_star_up,BankAccount_Optable_unfixed,_star_methodCount, operation))
{
(*operation)(this,_star_up);
return;
}
else
if(_STAR_locateOperation(_star_up,BankAccount_Optable_fixed,3, operation))
{
(*operation)(this,_star_up);
return;
}
throw CORBA::BAD_OPERATION(0, CORBA::COMPLETED_NO);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -