TAO::In_BD_String_Clonable_Argument_T< S_var, BOUND, Insert_Policy > Class Template Reference

Template class for IN bounded (w)string argument. More...

#include <BD_String_Argument_T.h>

Inheritance diagram for TAO::In_BD_String_Clonable_Argument_T< S_var, BOUND, Insert_Policy >:
Inheritance graph
[legend]
Collaboration diagram for TAO::In_BD_String_Clonable_Argument_T< S_var, BOUND, Insert_Policy >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 In_BD_String_Clonable_Argument_T (const typename S_var::s_traits::char_type *x)
virtual ~In_BD_String_Clonable_Argument_T (void)
virtual Argumentclone (void)
 Template method to clone a TAO Argument.

Private Attributes

bool is_clone_

Detailed Description

template<typename S_var, size_t BOUND, class Insert_Policy>
class TAO::In_BD_String_Clonable_Argument_T< S_var, BOUND, Insert_Policy >

Template class for IN bounded (w)string argument.

Definition at line 67 of file BD_String_Argument_T.h.


Constructor & Destructor Documentation

template<typename S_var , size_t BOUND, class Insert_Policy >
TAO::In_BD_String_Clonable_Argument_T< S_var, BOUND, Insert_Policy >::In_BD_String_Clonable_Argument_T ( const typename S_var::s_traits::char_type *  x  )  [inline]

Definition at line 31 of file BD_String_Argument_T.inl.

00034   : In_BD_String_Argument_T<S_var,BOUND,Insert_Policy> (x),
00035     is_clone_ (false)
00036 {}

template<typename S_var , size_t BOUND, class Insert_Policy >
TAO::In_BD_String_Clonable_Argument_T< S_var, BOUND, Insert_Policy >::~In_BD_String_Clonable_Argument_T ( void   )  [inline, virtual]

Definition at line 50 of file BD_String_Argument_T.cpp.

00051 {
00052   if (this->is_clone_)
00053     {
00054       typename S_var::s_traits::char_type * tmp =
00055             const_cast<typename S_var::s_traits::char_type *> (this->x_);
00056       delete [] tmp;
00057     }
00058 }


Member Function Documentation

template<typename S_var , size_t BOUND, class Insert_Policy >
TAO::Argument * TAO::In_BD_String_Clonable_Argument_T< S_var, BOUND, Insert_Policy >::clone ( void   )  [inline, virtual]

Template method to clone a TAO Argument.

Reimplemented from TAO::Argument.

Definition at line 64 of file BD_String_Argument_T.cpp.

00065 {
00066   typename S_var::s_traits::char_type * clone_x =
00067              new typename S_var::s_traits::char_type [BOUND];
00068   ACE_OS::strncpy (clone_x, this->x_, BOUND);
00069   In_BD_String_Clonable_Argument_T<S_var,BOUND,Insert_Policy>* clone_arg =
00070     new In_BD_String_Clonable_Argument_T<S_var,BOUND,Insert_Policy> (clone_x);
00071   clone_arg->is_clone_ = true;
00072   return clone_arg;
00073 }


Member Data Documentation

template<typename S_var, size_t BOUND, class Insert_Policy>
bool TAO::In_BD_String_Clonable_Argument_T< S_var, BOUND, Insert_Policy >::is_clone_ [private]

Definition at line 76 of file BD_String_Argument_T.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Sun Nov 22 23:27:58 2009 for TAO by  doxygen 1.6.1