test_i.cpp
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 47 行
CPP
47 行
// -*- C++ -*-
// test_i.cpp,v 1.3 2002/01/29 20:20:55 okellogg Exp
#include "test_i.h"
ACE_RCSID(Application_Test, test_i, "test_i.cpp,v 1.3 2002/01/29 20:20:55 okellogg Exp")
CORBA::Boolean
inventory_i::getCDinfo (const char * artist,
char *& title,
CORBA::Float_out price
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::Boolean in_stock = 0;
price = 0.0f;
ACE_CString name_key ("Beatles");
ACE_CString name (artist);
if (name.strstr (name_key) != -1)
{
ACE_CString title_key ("Sgt. Pepper");
ACE_CString working_title (title);
if (working_title.strstr (title_key) != -1)
{
title =
CORBA::string_dup ("Sgt. Pepper's Lonely Hearts Club Band");
price = 13.49f;
in_stock = 1;
}
else
{
title = CORBA::string_dup ("not found");
}
}
else
{
title = CORBA::string_dup ("not found");
}
return in_stock;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?