Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / RequestProcessingStrategyServantManager.cpp
blob476258bcf681cb530e740591e17da3b94152fbf6
1 // -*- C++ -*-
2 #include "tao/orbconf.h"
4 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
6 #include "tao/PortableServer/RequestProcessingStrategyServantManager.h"
7 #include "tao/PortableServer/ServantManagerC.h"
8 #include "tao/PortableServer/Root_POA.h"
9 #include "tao/ORB_Constants.h"
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
13 namespace TAO
15 namespace Portable_Server
17 PortableServer::Servant
18 RequestProcessingStrategyServantManager::get_servant ()
20 throw PortableServer::POA::WrongPolicy ();
23 void
24 RequestProcessingStrategyServantManager::set_servant (
25 PortableServer::Servant)
27 throw PortableServer::POA::WrongPolicy ();
30 void
31 RequestProcessingStrategyServantManager::validate_servant_manager (
32 PortableServer::ServantManager_ptr servant_manager)
34 // When no servant manager is set, give an exception with minor code 4,
35 // see 11.3.8.6 of the corba spec
36 if (CORBA::is_nil (servant_manager))
38 throw ::CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
42 PortableServer::Servant
43 RequestProcessingStrategyServantManager::system_id_to_servant (
44 const PortableServer::ObjectId &system_id)
46 return this->poa_->find_servant (system_id);
49 PortableServer::ObjectId *
50 RequestProcessingStrategyServantManager::servant_to_id (
51 PortableServer::Servant servant)
53 return this->poa_->servant_to_user_id (servant);
56 PortableServer::Servant
57 RequestProcessingStrategyServantManager::id_to_servant (
58 const PortableServer::ObjectId &id)
60 return this->poa_->user_id_to_servant_i (id);
65 TAO_END_VERSIONED_NAMESPACE_DECL
67 #endif /* TAO_HAS_MINIMUM_POA == 0 */