Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Buffering_Constraint_Policy.cpp

Go to the documentation of this file.
00001 #include "tao_pch.h"
00002 // $Id: Buffering_Constraint_Policy.cpp,v 1.1.1.4.2.1 2003/03/14 16:05:12 chad Exp $
00003 
00004 
00005 #include "tao/Buffering_Constraint_Policy.h"
00006 
00007 #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
00008 
00009 ACE_RCSID(TAO, Buffering_Constraint_Policy, "$Id: Buffering_Constraint_Policy.cpp,v 1.1.1.4.2.1 2003/03/14 16:05:12 chad Exp $")
00010 
00011 #if ! defined (__ACE_INLINE__)
00012 #include "tao/Buffering_Constraint_Policy.i"
00013 #endif /* __ACE_INLINE__ */
00014 
00015 TAO_Buffering_Constraint_Policy::TAO_Buffering_Constraint_Policy (const TAO::BufferingConstraint &buffering_constraint)
00016   : buffering_constraint_ (buffering_constraint)
00017 {
00018 }
00019 
00020 TAO_Buffering_Constraint_Policy::TAO_Buffering_Constraint_Policy (const TAO_Buffering_Constraint_Policy &rhs)
00021   : TAO::BufferingConstraintPolicy (),
00022     TAO_Local_RefCounted_Object (),
00023     buffering_constraint_ (rhs.buffering_constraint_)
00024 {
00025 }
00026 
00027 CORBA::PolicyType
00028 TAO_Buffering_Constraint_Policy::policy_type (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00029   ACE_THROW_SPEC ((CORBA::SystemException))
00030 {
00031   return TAO::BUFFERING_CONSTRAINT_POLICY_TYPE;
00032 }
00033 
00034 CORBA::Policy_ptr
00035 TAO_Buffering_Constraint_Policy::create (const CORBA::Any& val
00036                                          ACE_ENV_ARG_DECL)
00037 {
00038   TAO::BufferingConstraint *buffering_constraint;
00039   if ((val >>= buffering_constraint) == 0)
00040     ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_TYPE),
00041                       CORBA::Policy::_nil ());
00042 
00043   TAO_Buffering_Constraint_Policy *servant = 0;
00044   ACE_NEW_THROW_EX (servant,
00045                     TAO_Buffering_Constraint_Policy (*buffering_constraint),
00046                     CORBA::NO_MEMORY ());
00047   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
00048 
00049   return servant;
00050 }
00051 
00052 TAO_Buffering_Constraint_Policy *
00053 TAO_Buffering_Constraint_Policy::clone (void) const
00054 {
00055   TAO_Buffering_Constraint_Policy *copy = 0;
00056   ACE_NEW_RETURN (copy,
00057                   TAO_Buffering_Constraint_Policy (*this),
00058                   0);
00059   return copy;
00060 }
00061 
00062 TAO::BufferingConstraint
00063 TAO_Buffering_Constraint_Policy::buffering_constraint (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00064   ACE_THROW_SPEC ((CORBA::SystemException))
00065 {
00066   return this->buffering_constraint_;
00067 }
00068 
00069 CORBA::Policy_ptr
00070 TAO_Buffering_Constraint_Policy::copy (ACE_ENV_SINGLE_ARG_DECL)
00071   ACE_THROW_SPEC ((CORBA::SystemException))
00072 {
00073   TAO_Buffering_Constraint_Policy* servant = 0;
00074   ACE_NEW_THROW_EX (servant,
00075                     TAO_Buffering_Constraint_Policy (*this),
00076                     CORBA::NO_MEMORY ());
00077   ACE_CHECK_RETURN (CORBA::Policy::_nil ());
00078 
00079   return servant;
00080 }
00081 
00082 void
00083 TAO_Buffering_Constraint_Policy::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00084   ACE_THROW_SPEC ((CORBA::SystemException))
00085 {
00086 }
00087 
00088 TAO_Cached_Policy_Type
00089 TAO_Buffering_Constraint_Policy::_tao_cached_type (void) const
00090 {
00091   return TAO_CACHED_POLICY_BUFFERING_CONSTRAINT;
00092 }
00093 
00094 #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
00095 
00096 #elif defined(ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
00097 
00098 #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
00099 
00100 #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */

Generated on Mon Jun 16 13:48:02 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002