handler_i.cpp
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 83 行
CPP
83 行
//
// Handler_i.cpp,v 1.7 2003/07/23 18:21:59 dhinton Exp
//
#include "Handler_i.h"
#include "ace/streams.h"
Single_Query_Stock_Handler_i::
Single_Query_Stock_Handler_i (int *response_count)
: response_count_ (response_count)
{
}
void
Single_Query_Stock_Handler_i::get_price_and_names (CORBA::Double ami_return_val,
const char *symbol,
const char *full_name)
throw (CORBA::SystemException)
{
cout << "The price of one stock in \""
<< full_name << "\" (" << symbol << ") is "
<< ami_return_val << endl;
(*this->response_count_)++;
}
void
Single_Query_Stock_Handler_i::
get_price_and_names_excep (Quoter::AMI_Single_Query_StockExceptionHolder *)
throw (CORBA::SystemException)
{
// We ignore the exception, but this counts as a reponse, otherwise
// the application would not finish.
cerr << "Exception raised while querying stock price"
<< endl;
(*this->response_count_)++;
}
void
Single_Query_Stock_Handler_i::get_symbol (const char *)
throw (CORBA::SystemException)
{
throw CORBA::NO_IMPLEMENT ();
}
void
Single_Query_Stock_Handler_i::
get_symbol_excep (Quoter::AMI_StockExceptionHolder *)
throw (CORBA::SystemException)
{
throw CORBA::NO_IMPLEMENT ();
}
void
Single_Query_Stock_Handler_i::get_full_name (const char *)
throw (CORBA::SystemException)
{
throw CORBA::NO_IMPLEMENT ();
}
void
Single_Query_Stock_Handler_i::
get_full_name_excep (Quoter::AMI_StockExceptionHolder *)
throw (CORBA::SystemException)
{
throw CORBA::NO_IMPLEMENT ();
}
void
Single_Query_Stock_Handler_i::price (double)
throw (CORBA::SystemException)
{
throw CORBA::NO_IMPLEMENT ();
}
void
Single_Query_Stock_Handler_i::
price_excep (Quoter::AMI_StockExceptionHolder *)
throw (CORBA::SystemException)
{
throw CORBA::NO_IMPLEMENT ();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?