PolicyFactoryC.cpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: PolicyFactoryC.cpp 78128 2007-04-20 08:07:58Z johnnyw $
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   )
00093 {
00094   return PolicyFactory::_duplicate (
00095       dynamic_cast<PolicyFactory_ptr> (_tao_objref)
00096     );
00097 }
00098 
00099 PortableInterceptor::PolicyFactory_ptr
00100 PortableInterceptor::PolicyFactory::_unchecked_narrow (
00101     ::CORBA::Object_ptr _tao_objref
00102   )
00103 {
00104   return PolicyFactory::_duplicate (
00105       dynamic_cast<PolicyFactory_ptr> (_tao_objref)
00106     );
00107 }
00108 
00109 PortableInterceptor::PolicyFactory_ptr
00110 PortableInterceptor::PolicyFactory::_duplicate (PolicyFactory_ptr obj)
00111 {
00112   if (! ::CORBA::is_nil (obj))
00113     {
00114       obj->_add_ref ();
00115     }
00116 
00117   return obj;
00118 }
00119 
00120 void
00121 PortableInterceptor::PolicyFactory::_tao_release (PolicyFactory_ptr obj)
00122 {
00123   ::CORBA::release (obj);
00124 }
00125 
00126 ::CORBA::Boolean
00127 PortableInterceptor::PolicyFactory::_is_a (const char *value)
00128 {
00129   if (
00130       !ACE_OS::strcmp (
00131           value,
00132           "IDL:omg.org/PortableInterceptor/PolicyFactory:1.0"
00133         ) ||
00134       !ACE_OS::strcmp (
00135           value,
00136           "IDL:omg.org/CORBA/LocalObject:1.0"
00137         ) ||
00138       !ACE_OS::strcmp (
00139           value,
00140           "IDL:omg.org/CORBA/Object:1.0"
00141         )
00142     )
00143     {
00144       return true; // success using local knowledge
00145     }
00146   else
00147     {
00148       return false;
00149     }
00150 }
00151 
00152 const char* PortableInterceptor::PolicyFactory::_interface_repository_id (void) const
00153 {
00154   return "IDL:omg.org/PortableInterceptor/PolicyFactory:1.0";
00155 }
00156 
00157 ::CORBA::Boolean
00158 PortableInterceptor::PolicyFactory::marshal (TAO_OutputCDR &)
00159 {
00160   return false;
00161 }
00162 
00163 // Hand-crafted.
00164 ::CORBA::Policy_ptr
00165 PortableInterceptor::PolicyFactory::_create_policy (CORBA::PolicyType)
00166 {
00167   throw ::CORBA::PolicyError (CORBA::BAD_POLICY_TYPE);
00168 }
00169 
00170 
00171 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 13:29:59 2008 for TAO_PI by doxygen 1.3.6