ExceptionList.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ExceptionList.h
00006  *
00007  *  $Id: ExceptionList.h 77028 2007-02-12 14:49:05Z johnnyw $
00008  *
00009  *  This file defines the ExceptionList datatype used in
00010  *  dynamic invocations.
00011  *
00012  *
00013  *  @author  Copyright 1994-1995 by Sun Microsystems Inc.
00014  */
00015 //=============================================================================
00016 
00017 
00018 #ifndef TAO_CORBA_EXCEPTIONLIST_H
00019 #define TAO_CORBA_EXCEPTIONLIST_H
00020 
00021 #include /**/ "ace/pre.h"
00022 
00023 #include "tao/DynamicInterface/dynamicinterface_export.h"
00024 
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif /* ACE_LACKS_PRAGMA_ONCE */
00028 
00029 #include "tao/DynamicInterface/DII_CORBA_methods.h"
00030 #include "tao/AnyTypeCode/AnyTypeCode_methods.h"
00031 #include "tao/orbconf.h"
00032 #include "tao/Basic_Types.h"
00033 #include "tao/default_environment.h"
00034 #include "tao/Pseudo_VarOut_T.h"
00035 
00036 #include "ace/Unbounded_Queue.h"
00037 #include "ace/Atomic_Op.h"
00038 #include "ace/Synch_Traits.h"
00039 
00040 #if defined (TAO_EXPORT_MACRO)
00041 #undef TAO_EXPORT_MACRO
00042 #endif
00043 #define TAO_EXPORT_MACRO TAO_DynamicInterface_Export
00044 
00045 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00046 
00047 namespace CORBA
00048 {
00049   typedef TAO_Pseudo_Var_T<ExceptionList> ExceptionList_var;
00050   typedef TAO_Pseudo_Out_T<ExceptionList> ExceptionList_out;
00051 
00052   /**
00053    * @class ExceptionList
00054    *
00055    * @brief ExceptionList definition taken from CORBA v2.2 Feb 1998.
00056    *
00057    * Maintains a list of TypeCodes for Exceptions.
00058    */
00059   class TAO_DynamicInterface_Export ExceptionList
00060   {
00061   public:
00062     // = Intialization and termination methods.
00063 
00064     /// Constructor.
00065     ExceptionList (void);
00066 
00067     /// Constructor - initialize given a length and an array of
00068     /// TypeCodes.
00069     ExceptionList (CORBA::ULong len, CORBA::TypeCode_ptr *tc_list);
00070 
00071     /// Destructor.
00072     ~ExceptionList (void);
00073 
00074     /// Return the number of elements.
00075     CORBA::ULong count (void);
00076 
00077     /// Increase the reference count.
00078     ExceptionList_ptr _duplicate (void);
00079 
00080     /// Increase the reference count in the spec defined manner.
00081     static ExceptionList_ptr _duplicate (ExceptionList *);
00082 
00083     void _destroy (void);
00084 
00085     static ExceptionList_ptr _nil (void);
00086 
00087     /// Add a TypeCode to the list.
00088     void add (CORBA::TypeCode_ptr tc);
00089 
00090     /// Add and consume a TypeCode to the list.
00091     void add_consume (CORBA::TypeCode_ptr tc);
00092 
00093     /// Return the typecode at slot i. Raises the "Bounds" exception.
00094     CORBA::TypeCode_ptr item (CORBA::ULong slot);
00095 
00096     /// Remove the typecode at slot i. Raises the "Bounds" exception.
00097     void remove (CORBA::ULong slot);
00098 
00099     /// Increment and decrement ref counts.
00100     void _incr_refcnt (void);
00101     void _decr_refcnt (void);
00102 
00103     /// Useful for template programming.
00104     typedef CORBA::ExceptionList_ptr _ptr_type;
00105     typedef CORBA::ExceptionList_var _var_type;
00106     typedef CORBA::ExceptionList_out _out_type;
00107 
00108   private:
00109     // = Not allowed.
00110     ExceptionList (const ExceptionList &);
00111     ExceptionList &operator= (const ExceptionList &);
00112 
00113     /// Reference counter.
00114     ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> ref_count_;
00115 
00116     /// Internal list of typecodes.
00117     ACE_Unbounded_Queue<CORBA::TypeCode_ptr> tc_list_;
00118   };
00119 }  // End CORBA namespace
00120 
00121 TAO_END_VERSIONED_NAMESPACE_DECL
00122 
00123 #if defined (__ACE_INLINE__)
00124 # include "tao/DynamicInterface/ExceptionList.inl"
00125 #endif /* __ACE_INLINE__ */
00126 
00127 #include /**/ "ace/post.h"
00128 
00129 #endif /* TAO_CORBA_EXCEPTIONLIST_H */

Generated on Sun Jan 27 13:37:31 2008 for TAO_DynamicInterface by doxygen 1.3.6