rolypoly_i.cpp
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 72 行
CPP
72 行
// file : RolyPoly/RolyPoly_i.cpp
// author : Boris Kolpackov <boris@dre.vanderbilt.edu>
// cvs-id : RolyPoly_i.cpp,v 1.2 2003/12/22 01:44:37 wilson_d Exp
#include "RolyPoly_i.h"
#include "StateUpdate.h"
RolyPoly_i::RolyPoly_i (CORBA::ORB_ptr orb)
: number_ (0)
, orb_ (CORBA::ORB::_duplicate (orb))
{
}
RolyPoly_i::~RolyPoly_i (void)
{
}
CORBA::Any* RolyPoly_i::
get_state ()
{
/*
CORBA::Any_var state (new CORBA::Any);
*state <<= this->number_;
return state._retn ();
*/
return 0;
}
void RolyPoly_i::
set_state (CORBA::Any const& state)
{
state >>= this->number_;
}
CORBA::Short
RolyPoly_i::number (char *&str
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::string_free (str);
str = CORBA::string_dup ("Greetings from RolyPoly.");
++this->number_;
// Preppare state update.
//
CORBA::Any a;
a <<= this->number_;
associate_state (orb_.in (), a);
return this->number_;
}
void
RolyPoly_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG, "Server is shutting down.\n"));
this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?