diff options
Diffstat (limited to 'TAO/tao/Union_TypeCode.inl')
-rw-r--r-- | TAO/tao/Union_TypeCode.inl | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/TAO/tao/Union_TypeCode.inl b/TAO/tao/Union_TypeCode.inl index f0dbe93daab..3f431d53a5f 100644 --- a/TAO/tao/Union_TypeCode.inl +++ b/TAO/tao/Union_TypeCode.inl @@ -2,19 +2,23 @@ // // $Id$ +#include "ace/Auto_Ptr.h" + + template <typename StringType, class CaseArrayType, class RefCountPolicy> ACE_INLINE TAO::TypeCode::Union<StringType, CaseArrayType, RefCountPolicy>::Union ( char const * id, char const * name, - CORBA::TypeCode_ptr * discriminant_type, - Case const * cases, + CORBA::TypeCode_ptr const * discriminant_type, + case_type const * cases, CORBA::ULong ncases, CORBA::Long default_index, char const * default_member_name, - CORBA::TypeCode_ptr * default_member_type) + CORBA::TypeCode_ptr const * default_member_type) : base_attributes_ (id, name) - , default_index_ (default_index), + , discriminant_type_ (discriminant_type) + , default_index_ (default_index) , ncases_ (ncases) , cases_ (cases) , default_case_ (default_member_name, @@ -25,15 +29,19 @@ TAO::TypeCode::Union<StringType, CaseArrayType, RefCountPolicy>::Union ( template <typename StringType, typename CaseArrayType, class RefCountPolicy> ACE_INLINE CORBA::ULong TAO::TypeCode::Union<StringType, - CaseArrayType>::case_count (void) const + CaseArrayType, + RefCountPolicy>::case_count (void) const { return (this->default_index_ < 0 ? this->ncases_ : this->ncases_ + 1); } template <typename StringType, typename CaseArrayType, class RefCountPolicy> -ACE_INLINE TAO::TypeCode::Union::case_type const & +ACE_INLINE TAO::TypeCode::Union<StringType, + CaseArrayType, + RefCountPolicy>::case_type const & TAO::TypeCode::Union<StringType, - CaseArrayType>::case (CORBA::ULong index) const + CaseArrayType, + RefCountPolicy>::the_case (CORBA::ULong index) const { if (default_index_ >= 0) { @@ -57,9 +65,12 @@ TAO::TypeCode::Union<StringType, // Member specializations // ------------------------------------------------------------- -ACE_INLINE TAO::TypeCode::Union::Case const * -TAO::TypeCode::Union<CORBA::String_var, - ACE_Auto_Ptr_Array<Case const> >::cases (void) const -{ - return this->cases_.get (); -} +// ACE_INLINE TAO::TypeCode::Union<CORBA::String_var, +// ACE_Auto_Ptr_Array<Case const>, +// TAO::True_RefCount_Policy>::case_type const * +// TAO::TypeCode::Union<CORBA::String_var, +// ACE_Auto_Ptr_Array<Case const>, +// TAO::True_RefCount_Policy>::cases (void) const +// { +// return this->cases_.get (); +// } |