summaryrefslogtreecommitdiff
path: root/TAO/tao/PolicyFactory_Registry.cpp
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-09-03 23:28:57 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-09-03 23:28:57 +0000
commitd9d178e5ebdda9f4b01f2846567dbeb19f73d20f (patch)
tree05d80e369d43a865f24d0001bb391fd3c4920144 /TAO/tao/PolicyFactory_Registry.cpp
parent4e88a634b9a9b90b74b26e8d53a6980302e57e92 (diff)
downloadATCD-d9d178e5ebdda9f4b01f2846567dbeb19f73d20f.tar.gz
ChangeLogTag: Tue Sep 03 19:26:44 2002 Irfan Pyarali <irfan@oomworks.com>
Diffstat (limited to 'TAO/tao/PolicyFactory_Registry.cpp')
-rw-r--r--TAO/tao/PolicyFactory_Registry.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/TAO/tao/PolicyFactory_Registry.cpp b/TAO/tao/PolicyFactory_Registry.cpp
index d973b66ffaf..bfd42bcca69 100644
--- a/TAO/tao/PolicyFactory_Registry.cpp
+++ b/TAO/tao/PolicyFactory_Registry.cpp
@@ -80,6 +80,29 @@ TAO_PolicyFactory_Registry::create_policy (CORBA::PolicyType type,
ACE_ENV_ARG_PARAMETER);
}
+CORBA::Policy_ptr
+TAO_PolicyFactory_Registry::_create_policy (CORBA::PolicyType type
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException,
+ CORBA::PolicyError))
+{
+ PortableInterceptor::PolicyFactory_ptr policy_factory =
+ PortableInterceptor::PolicyFactory::_nil ();
+
+ if (this->factories_.find (type,
+ policy_factory) == -1)
+ {
+ // Policy factory corresponding to given policy type does not
+ // exist in policy factory map.
+ ACE_THROW_RETURN (
+ CORBA::PolicyError (CORBA::BAD_POLICY_TYPE), // @@ Right exception?
+ CORBA::Policy::_nil ());
+ }
+
+ return policy_factory->_create_policy (type
+ ACE_ENV_ARG_PARAMETER);
+}
+
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)