OpenDDS::SafetyProfile::SequenceVar< T > Class Template Reference

Parametrized implementation of var class for sequences. More...

#include <SafetyProfileSequenceVar.h>

Collaboration diagram for OpenDDS::SafetyProfile::SequenceVar< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T::subscript_type T_elem
typedef T::const_subscript_type T_const_elem
typedef const T & _in_type
typedef T & _inout_type
typedef T *& _out_type
typedef T * _retn_type

Public Member Functions

 SequenceVar ()
 SequenceVar (T *p)
 SequenceVar (const SequenceVar< T > &p)
 ~SequenceVar ()
SequenceVaroperator= (T *p)
SequenceVaroperator= (const SequenceVar< T > &p)
T * operator-> ()
const T * operator-> () const
_in_type in () const
_inout_type inout ()
_out_type out ()
_retn_type _retn ()
_retn_type ptr () const
 operator _in_type () const
 operator _inout_type ()
 operator _out_type ()
T_elem operator[] (CORBA::ULong index)
T_const_elem operator[] (CORBA::ULong index) const

Private Attributes

T * ptr_

Detailed Description

template<typename T>
class OpenDDS::SafetyProfile::SequenceVar< T >

Parametrized implementation of var class for sequences.

Definition at line 15 of file SafetyProfileSequenceVar.h.


Member Typedef Documentation

template<typename T>
typedef const T& OpenDDS::SafetyProfile::SequenceVar< T >::_in_type

Definition at line 55 of file SafetyProfileSequenceVar.h.

template<typename T>
typedef T& OpenDDS::SafetyProfile::SequenceVar< T >::_inout_type

Definition at line 56 of file SafetyProfileSequenceVar.h.

template<typename T>
typedef T*& OpenDDS::SafetyProfile::SequenceVar< T >::_out_type

Definition at line 57 of file SafetyProfileSequenceVar.h.

template<typename T>
typedef T* OpenDDS::SafetyProfile::SequenceVar< T >::_retn_type

Definition at line 58 of file SafetyProfileSequenceVar.h.

template<typename T>
typedef T::const_subscript_type OpenDDS::SafetyProfile::SequenceVar< T >::T_const_elem

Definition at line 18 of file SafetyProfileSequenceVar.h.

template<typename T>
typedef T::subscript_type OpenDDS::SafetyProfile::SequenceVar< T >::T_elem

Definition at line 17 of file SafetyProfileSequenceVar.h.


Constructor & Destructor Documentation

template<typename T>
OpenDDS::SafetyProfile::SequenceVar< T >::SequenceVar (  )  [inline]

Definition at line 20 of file SafetyProfileSequenceVar.h.

00021       : ptr_(0)
00022     {
00023     }

template<typename T>
OpenDDS::SafetyProfile::SequenceVar< T >::SequenceVar ( T *  p  )  [inline]

Definition at line 25 of file SafetyProfileSequenceVar.h.

00026       : ptr_(p)
00027     {
00028     }

template<typename T>
OpenDDS::SafetyProfile::SequenceVar< T >::SequenceVar ( const SequenceVar< T > &  p  )  [inline]

Definition at line 30 of file SafetyProfileSequenceVar.h.

00031       : ptr_(p.ptr_ ? new T(*p.ptr_) : 0)
00032     {
00033     }

template<typename T>
OpenDDS::SafetyProfile::SequenceVar< T >::~SequenceVar (  )  [inline]

Definition at line 35 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00036     {
00037       delete ptr_;
00038     }


Member Function Documentation

template<typename T>
T * OpenDDS::SafetyProfile::SequenceVar< T >::_retn (  )  [inline]

Definition at line 146 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00147   {
00148     T* tmp = ptr_;
00149     ptr_ = 0;
00150     return tmp;
00151   }

template<typename T>
_in_type OpenDDS::SafetyProfile::SequenceVar< T >::in (  )  const [inline]

Definition at line 60 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

Referenced by OpenDDS::SafetyProfile::SequenceVar< T >::operator _in_type().

00061     {
00062       return *ptr_;
00063     }

template<typename T>
_inout_type OpenDDS::SafetyProfile::SequenceVar< T >::inout (  )  [inline]

Definition at line 65 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

Referenced by OpenDDS::SafetyProfile::SequenceVar< T >::operator _inout_type().

00066     {
00067       return *ptr_;
00068     }

template<typename T>
OpenDDS::SafetyProfile::SequenceVar< T >::operator _in_type (  )  const [inline]

Definition at line 78 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::in().

00079     {
00080       return in();
00081     }

template<typename T>
OpenDDS::SafetyProfile::SequenceVar< T >::operator _inout_type (  )  [inline]

Definition at line 83 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::inout().

00084     {
00085       return inout();
00086     }

template<typename T>
OpenDDS::SafetyProfile::SequenceVar< T >::operator _out_type (  )  [inline]

Definition at line 88 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::out().

00089     {
00090       return out();
00091     }

template<typename T>
const T* OpenDDS::SafetyProfile::SequenceVar< T >::operator-> (  )  const [inline]

Definition at line 49 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00050     {
00051       return ptr_;
00052     }

template<typename T>
T* OpenDDS::SafetyProfile::SequenceVar< T >::operator-> (  )  [inline]

Definition at line 44 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00045     {
00046       return ptr_;
00047     }

template<typename T>
SequenceVar< T > & OpenDDS::SafetyProfile::SequenceVar< T >::operator= ( const SequenceVar< T > &  p  )  [inline]

Definition at line 121 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00123   {
00124     SequenceVar<T> tmp(p);
00125 
00126     T* old_ptr = ptr_;
00127     ptr_ = tmp.ptr_;
00128     tmp.ptr_ = old_ptr;
00129 
00130     return *this;
00131   }

template<typename T>
SequenceVar< T > & OpenDDS::SafetyProfile::SequenceVar< T >::operator= ( T *  p  )  [inline]

Definition at line 111 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00112   {
00113     delete ptr_;
00114     ptr_ = p;
00115     return *this;
00116   }

template<typename T>
T_const_elem OpenDDS::SafetyProfile::SequenceVar< T >::operator[] ( CORBA::ULong  index  )  const [inline]

Definition at line 99 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00100     {
00101       return (*ptr_)[index];
00102     }

template<typename T>
T_elem OpenDDS::SafetyProfile::SequenceVar< T >::operator[] ( CORBA::ULong  index  )  [inline]

Definition at line 94 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00095     {
00096       return (*ptr_)[index];
00097     }

template<typename T>
T *& OpenDDS::SafetyProfile::SequenceVar< T >::out (  )  [inline]

Definition at line 136 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

Referenced by OpenDDS::SafetyProfile::SequenceVar< T >::operator _out_type().

00137   {
00138     delete ptr_;
00139     ptr_ = 0;
00140     return ptr_;
00141   }

template<typename T>
_retn_type OpenDDS::SafetyProfile::SequenceVar< T >::ptr (  )  const [inline]

Definition at line 73 of file SafetyProfileSequenceVar.h.

References OpenDDS::SafetyProfile::SequenceVar< T >::ptr_.

00074     {
00075       return ptr_;
00076     }


Member Data Documentation

template<typename T>
T* OpenDDS::SafetyProfile::SequenceVar< T >::ptr_ [private]

Definition at line 105 of file SafetyProfileSequenceVar.h.

Referenced by OpenDDS::SafetyProfile::SequenceVar< T >::_retn(), OpenDDS::SafetyProfile::SequenceVar< T >::in(), OpenDDS::SafetyProfile::SequenceVar< T >::inout(), OpenDDS::SafetyProfile::SequenceVar< T >::operator->(), OpenDDS::SafetyProfile::SequenceVar< T >::operator=(), OpenDDS::SafetyProfile::SequenceVar< T >::operator[](), OpenDDS::SafetyProfile::SequenceVar< T >::out(), OpenDDS::SafetyProfile::SequenceVar< T >::ptr(), and OpenDDS::SafetyProfile::SequenceVar< T >::~SequenceVar().


The documentation for this class was generated from the following file:
Generated on Fri Feb 12 20:06:51 2016 for OpenDDS by  doxygen 1.4.7