PolicyFactoryC.cpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // PolicyFactoryC.cpp,v 1.5 2006/04/19 09:22:24 jwillemsen Exp
00004 
00005 // ****  Code generated by the The ACE ORB (TAO) IDL Compiler ****
00006 // TAO and the TAO IDL Compiler have been developed by:
00007 //       Center for Distributed Object Computing
00008 //       Washington University
00009 //       St. Louis, MO
00010 //       USA
00011 //       http://www.cs.wustl.edu/~schmidt/doc-center.html
00012 // and
00013 //       Distributed Object Computing Laboratory
00014 //       University of California at Irvine
00015 //       Irvine, CA
00016 //       USA
00017 //       http://doc.ece.uci.edu/
00018 // and
00019 //       Institute for Software Integrated Systems
00020 //       Vanderbilt University
00021 //       Nashville, TN
00022 //       USA
00023 //       http://www.isis.vanderbilt.edu/
00024 //
00025 // Information about TAO is available at:
00026 //     http://www.cs.wustl.edu/~schmidt/TAO.html
00027 
00028 // TAO_IDL - Generated from
00029 // be\be_codegen.cpp:277
00030 
00031 
00032 #include "tao/PI/PolicyFactoryC.h"
00033 #include "tao/CDR.h"
00034 #include "ace/OS_NS_string.h"
00035 
00036 // TAO_IDL - Generated from
00037 // be\be_visitor_arg_traits.cpp:70
00038 
00039 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00040 
00041 // Arg traits specializations.
00042 namespace TAO
00043 {
00044 }
00045 
00046 
00047 // TAO_IDL - Generated from
00048 // be\be_visitor_interface/interface_cs.cpp:60
00049 
00050 // Traits specializations for PortableInterceptor::PolicyFactory.
00051 
00052 PortableInterceptor::PolicyFactory_ptr
00053 TAO::Objref_Traits<PortableInterceptor::PolicyFactory>::duplicate (
00054     PortableInterceptor::PolicyFactory_ptr p
00055   )
00056 {
00057   return PortableInterceptor::PolicyFactory::_duplicate (p);
00058 }
00059 
00060 void
00061 TAO::Objref_Traits<PortableInterceptor::PolicyFactory>::release (
00062     PortableInterceptor::PolicyFactory_ptr p
00063   )
00064 {
00065   ::CORBA::release (p);
00066 }
00067 
00068 PortableInterceptor::PolicyFactory_ptr
00069 TAO::Objref_Traits<PortableInterceptor::PolicyFactory>::nil (void)
00070 {
00071   return PortableInterceptor::PolicyFactory::_nil ();
00072 }
00073 
00074 ::CORBA::Boolean
00075 TAO::Objref_Traits<PortableInterceptor::PolicyFactory>::marshal (
00076     PortableInterceptor::PolicyFactory_ptr p,
00077     TAO_OutputCDR & cdr
00078   )
00079 {
00080   return ::CORBA::Object::marshal (p, cdr);
00081 }
00082 
00083 PortableInterceptor::PolicyFactory::PolicyFactory (void)
00084 {}
00085 
00086 PortableInterceptor::PolicyFactory::~PolicyFactory (void)
00087 {}
00088 
00089 PortableInterceptor::PolicyFactory_ptr
00090 PortableInterceptor::PolicyFactory::_narrow (
00091     ::CORBA::Object_ptr _tao_objref
00092     ACE_ENV_ARG_DECL_NOT_USED
00093   )
00094 {
00095   return PolicyFactory::_duplicate (
00096       dynamic_cast<PolicyFactory_ptr> (_tao_objref)
00097     );
00098 }
00099 
00100 PortableInterceptor::PolicyFactory_ptr
00101 PortableInterceptor::PolicyFactory::_unchecked_narrow (
00102     ::CORBA::Object_ptr _tao_objref
00103     ACE_ENV_ARG_DECL_NOT_USED
00104   )
00105 {
00106   return PolicyFactory::_duplicate (
00107       dynamic_cast<PolicyFactory_ptr> (_tao_objref)
00108     );
00109 }
00110 
00111 PortableInterceptor::PolicyFactory_ptr
00112 PortableInterceptor::PolicyFactory::_duplicate (PolicyFactory_ptr obj)
00113 {
00114   if (! ::CORBA::is_nil (obj))
00115     {
00116       obj->_add_ref ();
00117     }
00118 
00119   return obj;
00120 }
00121 
00122 void
00123 PortableInterceptor::PolicyFactory::_tao_release (PolicyFactory_ptr obj)
00124 {
00125   ::CORBA::release (obj);
00126 }
00127 
00128 ::CORBA::Boolean
00129 PortableInterceptor::PolicyFactory::_is_a (
00130     const char *value
00131     ACE_ENV_ARG_DECL_NOT_USED
00132   )
00133 {
00134   if (
00135       !ACE_OS::strcmp (
00136           value,
00137           "IDL:omg.org/PortableInterceptor/PolicyFactory:1.0"
00138         ) ||
00139       !ACE_OS::strcmp (
00140           value,
00141           "IDL:omg.org/CORBA/LocalObject:1.0"
00142         ) ||
00143       !ACE_OS::strcmp (
00144           value,
00145           "IDL:omg.org/CORBA/Object:1.0"
00146         )
00147     )
00148     {
00149       return true; // success using local knowledge
00150     }
00151   else
00152     {
00153       return false;
00154     }
00155 }
00156 
00157 const char* PortableInterceptor::PolicyFactory::_interface_repository_id (void) const
00158 {
00159   return "IDL:omg.org/PortableInterceptor/PolicyFactory:1.0";
00160 }
00161 
00162 ::CORBA::Boolean
00163 PortableInterceptor::PolicyFactory::marshal (TAO_OutputCDR &)
00164 {
00165   return false;
00166 }
00167 
00168 // Hand-crafted.
00169 ::CORBA::Policy_ptr
00170 PortableInterceptor::PolicyFactory::_create_policy (CORBA::PolicyType
00171                                                     ACE_ENV_ARG_DECL)
00172   ACE_THROW_SPEC ((CORBA::SystemException,
00173                    CORBA::PolicyError))
00174 {
00175   ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE),
00176                     CORBA::Policy::_nil ());
00177 }
00178 
00179 
00180 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 12:51:39 2006 for TAO_PI by doxygen 1.3.6