CORBA::PolicyError Class Reference

#include <PolicyC.h>

Inheritance diagram for CORBA::PolicyError:

Inheritance graph
[legend]
Collaboration diagram for CORBA::PolicyError:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PolicyError (void)
 PolicyError (const PolicyError &)
 ~PolicyError (void)
PolicyErroroperator= (const PolicyError &)
virtual CORBA::Exception_tao_duplicate (void) const
 Deep copy.
virtual void _raise (void) const
virtual void _tao_encode (TAO_OutputCDR &) const
virtual void _tao_decode (TAO_InputCDR &)
 PolicyError (::CORBA::PolicyErrorCode _tao_reason)
virtual CORBA::TypeCode_ptr _tao_type (void) const
 Will be overridden in the concrete derived classes.

Static Public Member Functions

static void _tao_any_destructor (void *)
 Used in the non-copying Any insertion operator.
static PolicyError_downcast (CORBA::Exception *)
 The narrow operation.
static const PolicyError_downcast (CORBA::Exception const *)
 The const version of narrow operation.
static CORBA::Exception_alloc (void)

Public Attributes

CORBA::PolicyErrorCode reason

Detailed Description

Definition at line 121 of file PolicyC.h.


Constructor & Destructor Documentation

CORBA::PolicyError::PolicyError ( void   ) 

Definition at line 97 of file PolicyC.cpp.

00098   : CORBA::UserException (
00099         "IDL:omg.org/CORBA/PolicyError:1.0",
00100         "PolicyError"
00101       )
00102 {
00103 }

CORBA::PolicyError::PolicyError ( const PolicyError  ) 

CORBA::PolicyError::~PolicyError ( void   ) 

Definition at line 105 of file PolicyC.cpp.

00106 {
00107 }

CORBA::PolicyError::PolicyError ( ::CORBA::PolicyErrorCode  _tao_reason  ) 


Member Function Documentation

CORBA::Exception * CORBA::PolicyError::_alloc ( void   )  [static]

Definition at line 145 of file PolicyC.cpp.

References ACE_NEW_RETURN.

00146 {
00147   CORBA::Exception *retval = 0;
00148   ACE_NEW_RETURN (retval, ::CORBA::PolicyError, 0);
00149   return retval;
00150 }

const CORBA::PolicyError * CORBA::PolicyError::_downcast ( CORBA::Exception const *   )  [static]

The const version of narrow operation.

Reimplemented from CORBA::UserException.

Definition at line 140 of file PolicyC.cpp.

00141 {
00142   return dynamic_cast<const PolicyError *> (_tao_excp);
00143 }

CORBA::PolicyError * CORBA::PolicyError::_downcast ( CORBA::Exception  )  [static]

The narrow operation.

Reimplemented from CORBA::UserException.

Definition at line 134 of file PolicyC.cpp.

00135 {
00136   return dynamic_cast<PolicyError *> (_tao_excp);
00137 }

void CORBA::PolicyError::_raise ( void   )  const [virtual]

Implements CORBA::UserException.

Definition at line 164 of file PolicyC.cpp.

00165 {
00166   throw *this;
00167 }

void CORBA::PolicyError::_tao_any_destructor ( void *   )  [static]

Used in the non-copying Any insertion operator.

Reimplemented from CORBA::Exception.

Definition at line 126 of file PolicyC.cpp.

00127 {
00128   PolicyError *_tao_tmp_pointer =
00129     static_cast<PolicyError *> (_tao_void_pointer);
00130   delete _tao_tmp_pointer;
00131 }

void CORBA::PolicyError::_tao_decode ( TAO_InputCDR  )  [virtual]

Implements CORBA::Exception.

Definition at line 182 of file PolicyC.cpp.

00186 {
00187   if (cdr >> *this)
00188     {
00189       return;
00190     }
00191 
00192   throw ::CORBA::MARSHAL ();
00193 }

CORBA::Exception * CORBA::PolicyError::_tao_duplicate ( void   )  const [virtual]

Deep copy.

The following operation is used in the implementation of it performs a deep copy of the exception, normally it is implemented as:

 class SomeException : public // Derives from CORBA::Exception
 {
 public:
   virtual CORBA::Exception *_tao_duplicate (void) const
   {
     CORBA::Exception *result = 0;
     ACE_NEW_RETURN (
         result,
         SomeException (*this),
         0
       );
     return result;
   }
 };
 

Implements CORBA::Exception.

Definition at line 153 of file PolicyC.cpp.

References ACE_NEW_RETURN.

00154 {
00155   CORBA::Exception *result = 0;
00156   ACE_NEW_RETURN (
00157       result,
00158       ::CORBA::PolicyError (*this),
00159       0
00160     );
00161   return result;
00162 }

void CORBA::PolicyError::_tao_encode ( TAO_OutputCDR  )  const [virtual]

Implements CORBA::Exception.

Definition at line 169 of file PolicyC.cpp.

00173 {
00174   if (cdr << *this)
00175     {
00176       return;
00177     }
00178 
00179   throw ::CORBA::MARSHAL ();
00180 }

CORBA::TypeCode_ptr CORBA::PolicyError::_tao_type ( void   )  const [virtual]

Will be overridden in the concrete derived classes.

Reimplemented from CORBA::UserException.

Definition at line 212 of file PolicyC.cpp.

References ACE_ERROR, ACE_TEXT, ACE_Dynamic_Service< TYPE >::instance(), and LM_ERROR.

00213 {
00214   TAO_AnyTypeCode_Adapter *adapter =
00215     ACE_Dynamic_Service<TAO_AnyTypeCode_Adapter>::instance (
00216         "AnyTypeCode_Adapter"
00217       );
00218   if (adapter != 0)
00219     return adapter->_tao_type_PolicyError ();
00220   else
00221     {
00222       ACE_ERROR ((LM_ERROR,
00223                   ACE_TEXT ("(%P|%t) %p\n"),
00224                   ACE_TEXT ("Unable to find the ")
00225                   ACE_TEXT ("AnyTypeCode Adapter instance")));
00226       return 0;
00227     }
00228 }

PolicyError& CORBA::PolicyError::operator= ( const PolicyError  ) 


Member Data Documentation

CORBA::PolicyErrorCode CORBA::PolicyError::reason

Definition at line 125 of file PolicyC.h.

Referenced by operator<<(), and operator>>().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:39:57 2010 for TAO by  doxygen 1.4.7