summaryrefslogtreecommitdiff
path: root/TAO/tao/ORB.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/ORB.cpp')
-rw-r--r--TAO/tao/ORB.cpp140
1 files changed, 70 insertions, 70 deletions
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index 9b930da8c0d..70f9681685e 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -45,14 +45,14 @@ static const char ior_prefix[] = "IOR:";
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-CORBA::ORB::InvalidName::InvalidName (void)
+CORBA::ORB::InvalidName::InvalidName ()
: CORBA::UserException ("IDL:omg.org/CORBA/ORB/InvalidName:1.0",
"InvalidName")
{
}
// Destructor - all members are of self managing types.
-CORBA::ORB::InvalidName::~InvalidName (void)
+CORBA::ORB::InvalidName::~InvalidName ()
{
}
@@ -77,25 +77,25 @@ CORBA::ORB::InvalidName::_downcast (CORBA::Exception *exc)
return dynamic_cast<InvalidName *> (exc);
}
-CORBA::Exception *CORBA::ORB::InvalidName::_alloc (void)
+CORBA::Exception *CORBA::ORB::InvalidName::_alloc ()
{
- CORBA::Exception *retval = 0;
- ACE_NEW_RETURN (retval, ::CORBA::ORB::InvalidName, 0);
+ CORBA::Exception *retval = nullptr;
+ ACE_NEW_RETURN (retval, ::CORBA::ORB::InvalidName, nullptr);
return retval;
}
CORBA::Exception *
-CORBA::ORB::InvalidName::_tao_duplicate (void) const
+CORBA::ORB::InvalidName::_tao_duplicate () const
{
- CORBA::Exception *result = 0;
+ CORBA::Exception *result = nullptr;
ACE_NEW_RETURN (
result,
::CORBA::ORB::InvalidName (*this),
- 0);
+ nullptr);
return result;
}
-void CORBA::ORB::InvalidName::_raise (void) const
+void CORBA::ORB::InvalidName::_raise () const
{
throw *this;
}
@@ -116,11 +116,11 @@ CORBA::ORB::ORB (TAO_ORB_Core *orb_core)
: refcount_ (1)
, orb_core_ (orb_core)
, use_omg_ior_format_ (1)
- , timeout_ (0)
+ , timeout_ (nullptr)
{
}
-CORBA::ORB::~ORB (void)
+CORBA::ORB::~ORB ()
{
// This destructor is only invoked when the last ORB reference (not
// instance) is being destroyed.
@@ -138,9 +138,9 @@ CORBA::ORB::shutdown (CORBA::Boolean wait_for_completion)
}
void
-CORBA::ORB::destroy (void)
+CORBA::ORB::destroy ()
{
- if (this->orb_core () == 0)
+ if (this->orb_core () == nullptr)
{
// If the ORB_Core pointer is zero, assume that the ORB_Core has
// been destroyed.
@@ -163,13 +163,13 @@ CORBA::ORB::destroy (void)
// Now invalidate the pointer to the ORB_Core that created this
// ORB.
- this->orb_core_ = 0;
+ this->orb_core_ = nullptr;
}
void
-CORBA::ORB::run (void)
+CORBA::ORB::run ()
{
- this->run (0);
+ this->run (nullptr);
}
void
@@ -187,9 +187,9 @@ CORBA::ORB::run (ACE_Time_Value *tv)
}
void
-CORBA::ORB::perform_work (void)
+CORBA::ORB::perform_work ()
{
- this->perform_work (0);
+ this->perform_work (nullptr);
}
void
@@ -224,7 +224,7 @@ CORBA::ORB::work_pending (ACE_Time_Value &tv)
}
CORBA::Boolean
-CORBA::ORB::work_pending (void)
+CORBA::ORB::work_pending ()
{
// This method should not be called if the ORB has been shutdown.
this->check_shutdown ();
@@ -247,7 +247,7 @@ CORBA::ORB::create_list (CORBA::Long count, CORBA::NVList_ptr &new_list)
TAO_NVList_Adapter *adapter =
ACE_Dynamic_Service<TAO_NVList_Adapter>::instance ("TAO_NVList_Adapter");
- if (adapter == 0)
+ if (adapter == nullptr)
{
TAOLIB_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
@@ -277,7 +277,7 @@ CORBA::ORB::create_operation_list (CORBA::OperationDef_ptr opDef,
ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
TAO_ORB_Core::ifr_client_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTF_REPOS ();
}
@@ -305,7 +305,7 @@ CORBA::ORB::create_named_value (CORBA::NamedValue_ptr &nv)
ACE_Dynamic_Service<TAO_NVList_Adapter>::instance (
"TAO_NVList_Adapter");
- if (adapter == 0)
+ if (adapter == nullptr)
{
TAOLIB_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
@@ -384,7 +384,7 @@ CORBA::ORB::get_next_response (CORBA::Request_ptr &)
}
CORBA::Boolean
-CORBA::ORB::poll_next_response (void)
+CORBA::ORB::poll_next_response ()
{
throw ::CORBA::NO_IMPLEMENT (
CORBA::SystemException::_tao_minor_code (
@@ -405,7 +405,7 @@ CORBA::ORB::create_struct_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -424,7 +424,7 @@ CORBA::ORB::create_union_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -445,7 +445,7 @@ CORBA::ORB::create_enum_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -463,7 +463,7 @@ CORBA::ORB::create_alias_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -481,7 +481,7 @@ CORBA::ORB::create_exception_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -498,7 +498,7 @@ CORBA::ORB::create_interface_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -514,7 +514,7 @@ CORBA::ORB::create_string_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -530,7 +530,7 @@ CORBA::ORB::create_wstring_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -547,7 +547,7 @@ CORBA::ORB::create_fixed_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -564,7 +564,7 @@ CORBA::ORB::create_sequence_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -581,7 +581,7 @@ CORBA::ORB::create_array_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -601,7 +601,7 @@ CORBA::ORB::create_value_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -622,7 +622,7 @@ CORBA::ORB::create_value_box_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -637,7 +637,7 @@ CORBA::ORB::create_native_tc (const char *id, const char *name)
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -652,7 +652,7 @@ CORBA::ORB::create_recursive_tc (const char *id)
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -667,7 +667,7 @@ CORBA::ORB::create_abstract_interface_tc (const char *id, const char *name)
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -682,7 +682,7 @@ CORBA::ORB::create_local_interface_tc (const char *id, const char *name)
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -697,7 +697,7 @@ CORBA::ORB::create_component_tc (const char *id, const char *name)
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -712,7 +712,7 @@ CORBA::ORB::create_home_tc (const char *id, const char *name)
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -732,7 +732,7 @@ CORBA::ORB::create_event_tc (
ACE_Dynamic_Service<TAO_TypeCodeFactory_Adapter>::instance (
TAO_ORB_Core::typecodefactory_adapter_name ());
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -749,13 +749,13 @@ CORBA::ORB::create_event_tc (
#endif /* TAO_HAS_MINIMUM_CORBA */
CORBA::Object_ptr
-CORBA::ORB::resolve_policy_manager (void)
+CORBA::ORB::resolve_policy_manager ()
{
#if (TAO_HAS_CORBA_MESSAGING == 1)
TAO_Policy_Manager *policy_manager = this->orb_core_->policy_manager ();
- if (policy_manager == 0)
+ if (policy_manager == nullptr)
{
return CORBA::Object::_nil ();
}
@@ -770,7 +770,7 @@ CORBA::ORB::resolve_policy_manager (void)
}
CORBA::Object_ptr
-CORBA::ORB::resolve_policy_current (void)
+CORBA::ORB::resolve_policy_current ()
{
#if (TAO_HAS_CORBA_MESSAGING == 1)
@@ -827,7 +827,7 @@ CORBA::ORB::resolve_service (TAO::MCAST_SERVICEID mcast_service_id)
char const * const port_number =
ACE_OS::getenv (env_service_port[mcast_service_id]);
- if (port_number != 0)
+ if (port_number != nullptr)
port = static_cast<unsigned short> (ACE_OS::atoi (port_number));
else
port = default_service_port[mcast_service_id];
@@ -1005,7 +1005,7 @@ CORBA::ORB::resolve_initial_references (const char *name,
void
CORBA::ORB::register_initial_reference (const char * id, CORBA::Object_ptr obj)
{
- if (id == 0 || ACE_OS::strlen (id) == 0)
+ if (id == nullptr || ACE_OS::strlen (id) == 0)
throw ::CORBA::ORB::InvalidName ();
if (CORBA::is_nil (obj))
@@ -1020,7 +1020,7 @@ CORBA::ORB::register_initial_reference (const char * id, CORBA::Object_ptr obj)
CORBA::Object_ptr
CORBA::ORB::unregister_initial_reference (const char * id)
{
- if (id == 0 || ACE_OS::strlen (id) == 0)
+ if (id == nullptr || ACE_OS::strlen (id) == 0)
throw ::CORBA::ORB::InvalidName ();
TAO_Object_Ref_Table &table = this->orb_core_->object_ref_table ();
@@ -1034,7 +1034,7 @@ CORBA::ORB::unregister_initial_reference (const char * id)
#endif
CORBA::ORB::ObjectIdList_ptr
-CORBA::ORB::list_initial_services (void)
+CORBA::ORB::list_initial_services ()
{
this->check_shutdown ();
@@ -1042,9 +1042,9 @@ CORBA::ORB::list_initial_services (void)
}
void
-CORBA::ORB::check_shutdown (void)
+CORBA::ORB::check_shutdown ()
{
- if (this->orb_core () != 0)
+ if (this->orb_core () != nullptr)
{
this->orb_core ()->check_shutdown ();
}
@@ -1134,7 +1134,7 @@ namespace TAO
// big as the default repository
if (ACE_OS::strcasecmp (arg, ACE_TEXT("LOCAL")) == 0)
{
- ACE_Service_Gestalt* gestalt = 0;
+ ACE_Service_Gestalt* gestalt = nullptr;
ACE_NEW_THROW_EX (gestalt,
ACE_Service_Gestalt
(ACE_Service_Gestalt::MAX_SERVICES / 4, true),
@@ -1166,7 +1166,7 @@ namespace TAO
// Get ORB Core
TAO_ORB_Core_Auto_Ptr oc (TAO::ORB_Table::instance ()->find (
ACE_TEXT_ALWAYS_CHAR(orbid.c_str ())));
- if (oc.get () != 0)
+ if (oc.get () != nullptr)
return oc->configuration ();
if (TAO_debug_level > 0)
@@ -1237,7 +1237,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid)
: 0);
if ((argc == 0 && argv0_len != 0)
- || (argc != 0 && (argv == 0 || argv[0] == 0)))
+ || (argc != 0 && (argv == nullptr || argv[0] == nullptr)))
{
throw ::CORBA::BAD_PARAM (
CORBA::SystemException::_tao_minor_code (
@@ -1273,7 +1273,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid)
ACE_TEXT_ALWAYS_CHAR(orbid_string.c_str ())));
// The ORB was already initialized. Just return that one.
- if (oc.get () != 0)
+ if (oc.get () != nullptr)
{
return CORBA::ORB::_duplicate (oc->orb ());
}
@@ -1288,7 +1288,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid)
// An ORB corresponding to the desired ORBid doesn't exist so create
// a new one.
- TAO_ORB_Core * tmp = 0;
+ TAO_ORB_Core * tmp = nullptr;
ACE_NEW_THROW_EX (tmp,
TAO_ORB_Core (ACE_TEXT_ALWAYS_CHAR(orbid_string.c_str ()),
gestalt),
@@ -1343,7 +1343,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid)
PortableInterceptor::SlotId slotid = 0;
size_t pre_init_count = 0;
- if (orbinitializer_registry != 0)
+ if (orbinitializer_registry != nullptr)
{
pre_init_count =
orbinitializer_registry->pre_init (oc.get (),
@@ -1356,7 +1356,7 @@ CORBA::ORB_init (int &argc, ACE_TCHAR *argv[], const char *orbid)
result = oc->init (command_line.get_argc(),
command_line.get_ASCII_argv());
- if (orbinitializer_registry != 0)
+ if (orbinitializer_registry != nullptr)
{
orbinitializer_registry->post_init (pre_init_count,
oc.get (),
@@ -1400,7 +1400,7 @@ CORBA::ORB::object_to_string (CORBA::Object_ptr obj)
char* user_string =
obj->convert_to_ior (this->use_omg_ior_format_, ior_prefix);
- if (user_string != 0)
+ if (user_string != nullptr)
return user_string;
}
@@ -1448,20 +1448,20 @@ CORBA::ORB::object_to_string (CORBA::Object_ptr obj)
// return that string.
size_t const total_len = cdr.total_length ();
- char *cp = 0;
+ char *cp = nullptr;
ACE_ALLOCATOR_RETURN (cp,
CORBA::string_alloc (
sizeof ior_prefix
+ 2
* static_cast<CORBA::ULong> (total_len)),
- 0);
+ nullptr);
CORBA::String_var string = cp;
ACE_OS::strcpy (cp, ior_prefix);
cp += sizeof (ior_prefix) - 1;
- for (const ACE_Message_Block *i = cdr.begin (); i != 0; i = i->cont ())
+ for (const ACE_Message_Block *i = cdr.begin (); i != nullptr; i = i->cont ())
{
const char *bytes = i->rd_ptr ();
size_t len = i->length ();
@@ -1483,7 +1483,7 @@ CORBA::ORB::object_to_string (CORBA::Object_ptr obj)
// It is perfectly valid to marshal a nil object reference.
// However, it is not possible to convert a nil object reference
// to a URL IOR, so throw an exception.
- if (CORBA::is_nil (obj) || obj->_stubobj () == 0)
+ if (CORBA::is_nil (obj) || obj->_stubobj () == nullptr)
{
if (TAO_debug_level > 0)
TAOLIB_ERROR ((LM_ERROR,
@@ -1530,7 +1530,7 @@ CORBA::ORB::string_to_object (const char *str)
this->check_shutdown ();
// Check for NULL pointer
- if (str == 0)
+ if (str == nullptr)
throw ::CORBA::INV_OBJREF (
CORBA::SystemException::_tao_minor_code (
0,
@@ -1540,7 +1540,7 @@ CORBA::ORB::string_to_object (const char *str)
TAO_IOR_Parser *ior_parser =
this->orb_core_->parser_registry ()->match_parser (str);
- if (ior_parser != 0)
+ if (ior_parser != nullptr)
{
return ior_parser->parse_string (str, this);
}
@@ -1562,7 +1562,7 @@ CORBA::ORB::string_to_object (const wchar_t *str)
// ****************************************************************
char *
-CORBA::ORB::id (void)
+CORBA::ORB::id ()
{
return CORBA::string_dup (this->orb_core_->orbid ());
}
@@ -1578,7 +1578,7 @@ CORBA::ORB::create_policy (CORBA::PolicyType type, const CORBA::Any& val)
TAO::PolicyFactory_Registry_Adapter *adapter =
this->orb_core_->policy_factory_registry ();
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -1597,7 +1597,7 @@ CORBA::ORB::_create_policy (CORBA::PolicyType type)
TAO::PolicyFactory_Registry_Adapter *adapter =
this->orb_core_->policy_factory_registry ();
- if (adapter == 0)
+ if (adapter == nullptr)
{
throw ::CORBA::INTERNAL ();
}
@@ -1689,7 +1689,7 @@ CORBA::ORB::url_ior_string_to_object (const char* str)
}
// Now make the TAO_Stub.
- TAO_Stub *data = this->orb_core_->create_stub ((char *) 0, mprofile);
+ TAO_Stub *data = this->orb_core_->create_stub ((char *) nullptr, mprofile);
TAO_Stub_Auto_Ptr safe_objdata (data);