OpenDDS  Snapshot(2023/04/28-20:55)
Public Types | Public Member Functions | Private Attributes | List of all members
OpenDDS::SafetyProfile::SequenceVar< T > Class Template Reference

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

#include <SafetyProfileSequenceVar.h>

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

◆ _in_type

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

Definition at line 55 of file SafetyProfileSequenceVar.h.

◆ _inout_type

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

Definition at line 56 of file SafetyProfileSequenceVar.h.

◆ _out_type

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

Definition at line 57 of file SafetyProfileSequenceVar.h.

◆ _retn_type

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

Definition at line 58 of file SafetyProfileSequenceVar.h.

◆ T_const_elem

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

Definition at line 18 of file SafetyProfileSequenceVar.h.

◆ T_elem

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

Definition at line 17 of file SafetyProfileSequenceVar.h.

Constructor & Destructor Documentation

◆ SequenceVar() [1/3]

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

Definition at line 20 of file SafetyProfileSequenceVar.h.

◆ SequenceVar() [2/3]

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

Definition at line 25 of file SafetyProfileSequenceVar.h.

◆ SequenceVar() [3/3]

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

Definition at line 30 of file SafetyProfileSequenceVar.h.

31  : ptr_(p.ptr_ ? new T(*p.ptr_) : 0)
32  {
33  }

◆ ~SequenceVar()

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

Member Function Documentation

◆ _retn()

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

Definition at line 146 of file SafetyProfileSequenceVar.h.

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

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

147  {
148  T* tmp = ptr_;
149  ptr_ = 0;
150  return tmp;
151  }

◆ in()

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

◆ inout()

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

◆ operator _in_type()

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().

79  {
80  return in();
81  }

◆ operator _inout_type()

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().

84  {
85  return inout();
86  }

◆ operator _out_type()

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().

89  {
90  return out();
91  }

◆ operator->() [1/2]

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

◆ operator->() [2/2]

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

◆ operator=() [1/2]

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_.

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

112  {
113  delete ptr_;
114  ptr_ = p;
115  return *this;
116  }

◆ operator=() [2/2]

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_.

123  {
124  SequenceVar<T> tmp(p);
125 
126  T* old_ptr = ptr_;
127  ptr_ = tmp.ptr_;
128  tmp.ptr_ = old_ptr;
129 
130  return *this;
131  }

◆ operator[]() [1/2]

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_.

95  {
96  return (*ptr_)[index];
97  }

◆ operator[]() [2/2]

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_.

100  {
101  return (*ptr_)[index];
102  }

◆ out()

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

◆ ptr()

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

Member Data Documentation

◆ ptr_

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

The documentation for this class was generated from the following file: