OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element Struct Reference

#include <SafetyProfileSequence.h>

List of all members.

Public Member Functions

 Element (CharT *&element, seq_flag_type release)
 Element (const Element &elt)
Elementoperator= (const CharT *rhs)
Elementoperator= (CharT *rhs)
Elementoperator= (const ::TAO::String_var< CharT > &rhs)
Elementoperator= (const ::TAO::String_Manager_T< CharT > &rhs)
 operator const CharT * () const
const CharT * in () const
CharT *& inout ()
::TAO::String_out< CharT > out () const
CharT * _retn ()

Private Member Functions

Elementmove_from (::TAO::String_var< CharT > &rhs)

Private Attributes

CharT *& element_
seq_flag_type release_

Friends

bool operator>> (DCPS::Serializer &ser, Element elt)

Detailed Description

template<typename CharT>
struct OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element

Indexing a non-const string sequence yields an object of this class. This allows string memory management duing assignment.

Definition at line 130 of file SafetyProfileSequence.h.


Constructor & Destructor Documentation

template<typename CharT >
OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::Element ( CharT *&  element,
seq_flag_type  release 
) [inline]

Definition at line 131 of file SafetyProfileSequence.h.

00132         : element_(element), release_(release) {}

template<typename CharT >
OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::Element ( const Element elt  )  [inline]

Definition at line 134 of file SafetyProfileSequence.h.

00135         : element_(elt.element_), release_(elt.release_) {}


Member Function Documentation

template<typename CharT >
CharT* OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::_retn ( void   )  [inline]

Definition at line 171 of file SafetyProfileSequence.h.

References OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::element_.

00172       {
00173         CharT* const tmp = element_;
00174         element_ = StringTraits<CharT>::empty();
00175         return tmp;
00176       }

template<typename CharT >
const CharT* OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::in ( void   )  const [inline]
template<typename CharT >
CharT*& OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::inout ( void   )  [inline]
template<typename CharT >
Element& OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::move_from ( ::TAO::String_var< CharT > &  rhs  )  [inline, private]

Definition at line 179 of file SafetyProfileSequence.h.

References OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::element_, and OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::release_.

Referenced by OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::operator=().

00180       {
00181         if (release_) StringTraits<CharT>::free(element_);
00182         element_ = rhs._retn();
00183         return *this;
00184       }

Here is the caller graph for this function:

template<typename CharT >
OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::operator const CharT * (  )  const [inline]
template<typename CharT >
Element& OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::operator= ( const ::TAO::String_Manager_T< CharT > &  rhs  )  [inline]

Definition at line 155 of file SafetyProfileSequence.h.

References OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::move_from().

00156       {
00157         ::TAO::String_var<CharT> tmp(rhs);
00158         return move_from(tmp);
00159       }

Here is the call graph for this function:

template<typename CharT >
Element& OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::operator= ( const ::TAO::String_var< CharT > &  rhs  )  [inline]

Definition at line 149 of file SafetyProfileSequence.h.

References OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::move_from().

00150       {
00151         ::TAO::String_var<CharT> tmp(rhs);
00152         return move_from(tmp);
00153       }

Here is the call graph for this function:

template<typename CharT >
Element& OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::operator= ( CharT *  rhs  )  [inline]

Definition at line 143 of file SafetyProfileSequence.h.

References OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::move_from().

00144       {
00145         ::TAO::String_var<CharT> tmp(rhs);
00146         return move_from(tmp);
00147       }

Here is the call graph for this function:

template<typename CharT >
Element& OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::operator= ( const CharT *  rhs  )  [inline]

Definition at line 137 of file SafetyProfileSequence.h.

References OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::move_from().

00138       {
00139         ::TAO::String_var<CharT> tmp(rhs);
00140         return move_from(tmp);
00141       }

Here is the call graph for this function:

template<typename CharT >
::TAO::String_out<CharT> OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::out ( void   )  const [inline]

Friends And Related Function Documentation

template<typename CharT >
bool operator>> ( DCPS::Serializer ser,
Element  elt 
) [friend]

Definition at line 189 of file SafetyProfileSequence.h.

00190       {
00191         ser.read_string(elt.out(), StringTraits<CharT>::alloc,
00192           StringTraits<CharT>::free);
00193         return ser.good_bit();
00194       }


Member Data Documentation

template<typename CharT >
CharT*& OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::element_ [private]
template<typename CharT >
seq_flag_type OpenDDS::SafetyProfile::StringEltPolicy< CharT >::Element::release_ [private]

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

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1