本文整理汇总了C++中corba::ORB_ptr::orb_core方法的典型用法代码示例。如果您正苦于以下问题:C++ ORB_ptr::orb_core方法的具体用法?C++ ORB_ptr::orb_core怎么用?C++ ORB_ptr::orb_core使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类corba::ORB_ptr
的用法示例。
在下文中一共展示了ORB_ptr::orb_core方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
CORBA::Object_ptr
TAO_DLL_Parser::parse_string (const char *ior,
CORBA::ORB_ptr orb)
{
// Skip the prefix, we know it is there because this method in only
// called if <match_prefix> returns 1.
const char *name =
ior + sizeof (::dll_prefix) - 1;
TAO_ORB_Core *oc = orb->orb_core ();
TAO_Object_Loader *loader =
ACE_Dynamic_Service<TAO_Object_Loader>::instance
(oc->configuration(), name);
if (loader == 0)
{
throw
CORBA::INV_OBJREF
(CORBA::SystemException::_tao_minor_code (
0,
EINVAL),
CORBA::COMPLETED_NO);
}
return loader->create_object (orb, 0, 0);
}
示例2:
void
LiveCheck::init (CORBA::ORB_ptr orb,
const ACE_Time_Value &pi)
{
this->ping_interval_ = pi;
ACE_Reactor *r = orb->orb_core()->reactor();
this->reactor (r);
CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA");
this->poa_ = PortableServer::POA::_narrow (obj.in());
this->running_ = true;
}
示例3:
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
CORBA::Object_ptr
TAO_CodecFactory_Loader::create_object (CORBA::ORB_ptr orb, int, ACE_TCHAR *[])
{
CORBA::Object_ptr obj = CORBA::Object_ptr ();
ACE_NEW_RETURN (obj,
TAO_CodecFactory (orb->orb_core ()),
CORBA::Object::_nil ());
return obj;
}
示例4:
AMH_Servant::AMH_Servant (CORBA::ORB_ptr orb)
: sleep_time_ (0)
{
// @@ Mayur, why do you obtain the reactor each time this method is
// called? Why not just cache it once in the constructor.
// Furthermore, you don't appear to need the ORB pseudo-reference
// anything other than to obtain the Reactor. Why not just
// remove the cached ORB pseudo-reference altogether?
//
// Mayur: Good point. Never crossed my mind :)
this->reactor_ = orb->orb_core ()->reactor ();
}
示例5:
TAO_Log_i::TAO_Log_i (CORBA::ORB_ptr orb,
TAO_LogMgr_i &logmgr_i,
DsLogAdmin::LogMgr_ptr factory,
DsLogAdmin::LogId logid,
TAO_LogNotification *log_notifier)
: logmgr_i_(logmgr_i),
factory_ (DsLogAdmin::LogMgr::_duplicate (factory)),
logid_ (logid),
op_state_ (DsLogAdmin::disabled),
reactor_ (orb->orb_core()->reactor()),
notifier_ (log_notifier),
log_compaction_handler_ (reactor_, this, log_compaction_interval_),
log_flush_handler_ (reactor_, this, log_flush_interval_)
{
// TODO: get log parameters from (persistent?) store.
avail_status_.off_duty = 0;
avail_status_.log_full = 0;
}
示例6: setprio
/* static */
int
TAO_RT_ORB::modify_thread_scheduling_policy (CORBA::ORB_ptr orb)
{
// This method changes the scheduling policy of the calling thread
// to match the scheduling policy specified in the svc.conf file.
// The priority of the calling thread will be set to the minimum
// priority supported by that scheduling policy.
//
// This method make sense on those platform (e.g., Linux) where
// PTHREAD_SCOPE_SYSTEM is the only scheduling scope supported. On
// other platforms, this method is a no-op since the only way to get
// the real-time threading behavior is to setup the
// PTHREAD_SCOPE_SYSTEM scheduling scope when a thread is being
// created. On such platforms, one can set the correct scheduling
// scope and policy when creating the thread, thus not needing to
// use this method.
#if !defined (ACE_LACKS_THREAD_PROCESS_SCOPING) && defined (ACE_LACKS_PTHREAD_SCOPE_PROCESS)
int const sched_policy = orb->orb_core ()->orb_params ()->ace_sched_policy ();
int const minimum_priority = ACE_Sched_Params::priority_min (sched_policy);
ACE_hthread_t thread_id;
ACE_Thread::self (thread_id);
return ACE_Thread::setprio (thread_id, minimum_priority, sched_policy);
#else /* !ACE_LACKS_THREAD_PROCESS_SCOPING && ACE_LACKS_PTHREAD_SCOPE_PROCESS */
ACE_UNUSED_ARG (orb);
ACE_NOTSUP_RETURN (-1);
#endif /* linux */
}
示例7: directory
//.........这里部分代码省略.........
#endif /* CORBA_E_MICRO */
// Set the ior of the root Naming Context.
this->naming_service_ior_=
orb->object_to_string (this->naming_context_.in ());
CORBA::Object_var table_object =
orb->resolve_initial_references ("IORTable");
IORTable::Table_var adapter =
IORTable::Table::_narrow (table_object.in ());
if (CORBA::is_nil (adapter.in ()))
{
ORBSVCS_ERROR ((LM_ERROR, "Nil IORTable\n"));
}
else
{
CORBA::String_var ior =
orb->object_to_string (this->naming_context_.in ());
adapter->bind ("NameService", ior.in ());
}
#if defined (ACE_HAS_IP_MULTICAST)
if (enable_multicast)
{
// @@ Marina: is there anyway to implement this stuff
// without using ORB_Core_instance()? For example can you
// pass the ORB as an argument?
//
// Install ior multicast handler.
//
// Get reactor instance from TAO.
ACE_Reactor *reactor = orb->orb_core()->reactor ();
// See if the -ORBMulticastDiscoveryEndpoint option was specified.
ACE_CString mde (orb->orb_core ()->orb_params ()->mcast_discovery_endpoint ());
// First, see if the user has given us a multicast port number
// on the command-line;
u_short port =
orb->orb_core ()->orb_params ()->service_port (TAO::MCAST_NAMESERVICE);
if (port == 0)
{
// Check environment var. for multicast port.
const char *port_number =
ACE_OS::getenv ("NameServicePort");
if (port_number != 0)
port = static_cast<u_short> (ACE_OS::atoi (port_number));
}
// Port wasn't specified on the command-line or in environment -
// use the default.
if (port == 0)
port = TAO_DEFAULT_NAME_SERVER_REQUEST_PORT;
// Instantiate a handler which will handle client requests for
// the root Naming Context ior, received on the multicast port.
ACE_NEW_RETURN (this->ior_multicast_,
TAO_IOR_Multicast (),
-1);
if (mde.length () != 0)
{
示例8: if
Worker::Worker (CORBA::ORB_ptr orb,
RTCORBA::RTORB_ptr rtorb,
CORBA::PolicyManager_ptr policy_manager,
Protocols::test_ptr test,
::CORBA::ULong iterations,
::CORBA::ULong invocation_rate,
::CORBA::Boolean count_missed_end_deadlines,
::CORBA::Boolean do_dump_history,
::CORBA::Boolean print_missed_invocations,
::CORBA::ULong message_size,
::CORBA::ULong test_protocol_tag,
::CORBA::ULong number_of_connection_attempts,
::CORBA::Boolean enable_diffserv_code_points,
::Protocols::Sender_Controller::Test_Type test_type)
: rtorb_ (RTCORBA::RTORB::_duplicate (rtorb)),
policy_manager_ (CORBA::PolicyManager::_duplicate (policy_manager)),
test_ (Protocols::test::_duplicate (test)),
history_ (iterations),
interval_between_calls_ (),
missed_start_deadlines_ (0),
missed_end_deadlines_ (0),
missed_start_invocations_ (iterations),
missed_end_invocations_ (iterations),
iterations_ (iterations),
invocation_rate_ (invocation_rate),
count_missed_end_deadlines_ (count_missed_end_deadlines),
do_dump_history_ (do_dump_history),
print_missed_invocations_ (print_missed_invocations),
message_size_ (message_size),
test_protocol_tag_ (test_protocol_tag),
number_of_connection_attempts_ (number_of_connection_attempts),
enable_diffserv_code_points_ (enable_diffserv_code_points),
test_type_ (test_type)
{
// Each sender will have a random session id. This helps in
// identifying late packets arriving at the server.
ACE_OS::srand ((unsigned) ACE_OS::time (0));
this->session_id_ = ACE_OS::rand ();
// Interval is inverse of rate.
this->interval_between_calls_ =
to_hrtime (1 / double (this->invocation_rate_), gsf);
// Base protocol is used for setting up and tearing down the test.
this->base_protocol_policy_.length (1);
// Test protocol is the one being tested.
this->test_protocol_policy_.length (1);
RTCORBA::ProtocolProperties_var base_transport_protocol_properties =
TAO_Protocol_Properties_Factory::create_transport_protocol_property (IOP::TAG_INTERNET_IOP,
orb->orb_core ());
RTCORBA::TCPProtocolProperties_var tcp_base_transport_protocol_properties =
RTCORBA::TCPProtocolProperties::_narrow (base_transport_protocol_properties.in ());
tcp_base_transport_protocol_properties->enable_network_priority (this->enable_diffserv_code_points_);
RTCORBA::ProtocolList protocols;
protocols.length (1);
protocols[0].transport_protocol_properties =
base_transport_protocol_properties;
protocols[0].orb_protocol_properties =
RTCORBA::ProtocolProperties::_nil ();
// IIOP is always used for the base protocol.
protocols[0].protocol_type = IOP::TAG_INTERNET_IOP;
this->base_protocol_policy_[0] =
this->rtorb_->create_client_protocol_policy (protocols);
// User decides the test protocol.
protocols[0].protocol_type = test_protocol_tag;
RTCORBA::ProtocolProperties_var test_transport_protocol_properties =
TAO_Protocol_Properties_Factory::create_transport_protocol_property (protocols[0].protocol_type,
orb->orb_core ());
if (protocols[0].protocol_type == TAO_TAG_DIOP_PROFILE)
{
RTCORBA::UserDatagramProtocolProperties_var udp_test_transport_protocol_properties =
RTCORBA::UserDatagramProtocolProperties::_narrow (test_transport_protocol_properties.in ());
udp_test_transport_protocol_properties->enable_network_priority (enable_diffserv_code_points);
}
else if (protocols[0].protocol_type == TAO_TAG_SCIOP_PROFILE)
{
RTCORBA::StreamControlProtocolProperties_var sctp_test_transport_protocol_properties =
RTCORBA::StreamControlProtocolProperties::_narrow (test_transport_protocol_properties.in ());
sctp_test_transport_protocol_properties->enable_network_priority (enable_diffserv_code_points);
}
else if (protocols[0].protocol_type == IOP::TAG_INTERNET_IOP)
{
RTCORBA::TCPProtocolProperties_var tcp_test_transport_protocol_properties =
RTCORBA::TCPProtocolProperties::_narrow (test_transport_protocol_properties.in ());
tcp_test_transport_protocol_properties->enable_network_priority (enable_diffserv_code_points);
}
//.........这里部分代码省略.........
示例9: execute
inline static void execute(CORBA::ORB_ptr orb) {
static_cast<Interceptor_Destoryer*> (orb->orb_core())->do_it();
}