TAO::In_Fixed_Array_Clonable_Argument_T< S_forany, Insert_Policy > Class Template Reference

IN stub argument of fixed size element array. More...

#include <Fixed_Array_Argument_T.h>

Inheritance diagram for TAO::In_Fixed_Array_Clonable_Argument_T< S_forany, Insert_Policy >:

Inheritance graph
[legend]
Collaboration diagram for TAO::In_Fixed_Array_Clonable_Argument_T< S_forany, Insert_Policy >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 In_Fixed_Array_Clonable_Argument_T (const typename S_forany::_slice_type *x)
virtual ~In_Fixed_Array_Clonable_Argument_T (void)
virtual Argumentclone (void)
 Template method to clone a TAO Argument.

Private Attributes

bool is_clone_

Detailed Description

template<typename S_forany, class Insert_Policy>
class TAO::In_Fixed_Array_Clonable_Argument_T< S_forany, Insert_Policy >

IN stub argument of fixed size element array.

Definition at line 59 of file Fixed_Array_Argument_T.h.


Constructor & Destructor Documentation

template<typename S_forany, class Insert_Policy>
ACE_INLINE TAO::In_Fixed_Array_Clonable_Argument_T< S_forany, Insert_Policy >::In_Fixed_Array_Clonable_Argument_T ( const typename S_forany::_slice_type *  x  ) 

Definition at line 41 of file Fixed_Array_Argument_T.inl.

00042   : In_Fixed_Array_Argument_T<S_forany,Insert_Policy> (x),
00043     is_clone_ (false)
00044 {
00045 }

template<typename S_forany, class Insert_Policy>
TAO::In_Fixed_Array_Clonable_Argument_T< S_forany, Insert_Policy >::~In_Fixed_Array_Clonable_Argument_T ( void   )  [virtual]

Definition at line 39 of file Fixed_Array_Argument_T.cpp.

References free().

00040 {
00041   if (this->is_clone_)
00042     {
00043       typedef TAO::details::array_traits<S_forany> ARRAY_TRAITS;
00044       typename ARRAY_TRAITS::slice_type * tmp =
00045                const_cast<typename ARRAY_TRAITS::slice_type *>(this->x_.in ());
00046       ARRAY_TRAITS::free (tmp);
00047     }
00048 }


Member Function Documentation

template<typename S_forany, class Insert_Policy>
TAO::Argument * TAO::In_Fixed_Array_Clonable_Argument_T< S_forany, Insert_Policy >::clone ( void   )  [virtual]

Template method to clone a TAO Argument.

Reimplemented from TAO::Argument.

Definition at line 53 of file Fixed_Array_Argument_T.cpp.

References ACE_ALLOCATOR_RETURN.

00054 {
00055   typedef TAO::details::array_traits<S_forany> ARRAY_TRAITS;
00056   typename ARRAY_TRAITS::slice_type * tmp_ptr = 0;
00057   ACE_ALLOCATOR_RETURN (tmp_ptr,
00058                         ARRAY_TRAITS::alloc (),
00059                         0);
00060   ARRAY_TRAITS::copy (tmp_ptr, this->x_.in ());
00061 
00062   In_Fixed_Array_Clonable_Argument_T<S_forany,Insert_Policy>* clone_arg
00063     = new In_Fixed_Array_Clonable_Argument_T<S_forany,Insert_Policy> (tmp_ptr);
00064   clone_arg->is_clone_ = true;
00065   return clone_arg;
00066 }


Member Data Documentation

template<typename S_forany, class Insert_Policy>
bool TAO::In_Fixed_Array_Clonable_Argument_T< S_forany, Insert_Policy >::is_clone_ [private]

Definition at line 69 of file Fixed_Array_Argument_T.h.


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