3 //=============================================================================
5 * @file ExceptionList.h
7 * This file defines the ExceptionList datatype used in
10 * @author Copyright 1994-1995 by Sun Microsystems Inc.
12 //=============================================================================
14 #ifndef TAO_CORBA_EXCEPTIONLIST_H
15 #define TAO_CORBA_EXCEPTIONLIST_H
17 #include /**/ "ace/pre.h"
19 #include "tao/DynamicInterface/dynamicinterface_export.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "tao/DynamicInterface/DII_CORBA_methods.h"
26 #include "tao/AnyTypeCode/AnyTypeCode_methods.h"
27 #include "tao/orbconf.h"
28 #include "tao/Basic_Types.h"
29 #include "tao/default_environment.h"
30 #include "tao/Pseudo_VarOut_T.h"
32 #include "ace/Unbounded_Queue.h"
35 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
40 typedef ExceptionList
* ExceptionList_ptr
;
42 typedef TAO_Pseudo_Var_T
<ExceptionList
> ExceptionList_var
;
43 typedef TAO_Pseudo_Out_T
<ExceptionList
> ExceptionList_out
;
46 * @class ExceptionList
48 * @brief ExceptionList definition taken from CORBA v2.2 Feb 1998.
50 * Maintains a list of TypeCodes for Exceptions.
52 class TAO_DynamicInterface_Export ExceptionList
58 /// Constructor - initialize given a length and an array of
60 ExceptionList (CORBA::ULong len
, CORBA::TypeCode_ptr
*tc_list
);
65 /// Return the number of elements.
66 CORBA::ULong
count ();
68 /// Increase the reference count.
69 ExceptionList_ptr
_duplicate ();
71 /// Increase the reference count in the spec defined manner.
72 static ExceptionList_ptr
_duplicate (ExceptionList
*);
76 static ExceptionList_ptr
_nil ();
78 /// Add a TypeCode to the list.
79 void add (CORBA::TypeCode_ptr tc
);
81 /// Add and consume a TypeCode to the list.
82 void add_consume (CORBA::TypeCode_ptr tc
);
84 /// Return the typecode at slot i. Raises the "Bounds" exception.
85 CORBA::TypeCode_ptr
item (CORBA::ULong slot
);
87 /// Remove the typecode at slot i. Raises the "Bounds" exception.
88 void remove (CORBA::ULong slot
);
90 /// Increment and decrement ref counts.
91 void _incr_refcount ();
92 void _decr_refcount ();
94 /// Useful for template programming.
95 typedef CORBA::ExceptionList_ptr _ptr_type
;
96 typedef CORBA::ExceptionList_var _var_type
;
97 typedef CORBA::ExceptionList_out _out_type
;
101 ExceptionList (const ExceptionList
&);
102 ExceptionList
&operator= (const ExceptionList
&);
104 /// Reference counter.
105 std::atomic
<uint32_t> refcount_
;
107 /// Internal list of typecodes.
108 ACE_Unbounded_Queue
<CORBA::TypeCode_ptr
> tc_list_
;
110 } // End CORBA namespace
112 TAO_END_VERSIONED_NAMESPACE_DECL
114 #if defined (__ACE_INLINE__)
115 # include "tao/DynamicInterface/ExceptionList.inl"
116 #endif /* __ACE_INLINE__ */
118 #include /**/ "ace/post.h"
120 #endif /* TAO_CORBA_EXCEPTIONLIST_H */