STK++ 0.9.13
STK::CellBase< Type > Class Template Reference

template Base class for the Cell in a list . More...

#include <STK_Cell.h>

Inheritance diagram for STK::CellBase< Type >:
Inheritance graph

Public Member Functions

 CellBase ()
 constructor with a pointer on the data.
 
 CellBase (Type const &data)
 constructor with a reference to the data.
 
 CellBase (const CellBase< Type > &C)
 Copy constructor.
 
virtual ~CellBase ()
 virtual destructor.
 
CellBase< Type > & operator= (const CellBase< Type > &C)
 Operator = : overwrite the Cell with C.
 
CellBase< Type > & operator= (Type const &v)
 Operator = : write a value on the cell.
 
Type constdata () const
 
Type & data ()
 
void setData (Type const &data)
 Set data.
 

Protected Attributes

Type data_
 Data contained by the Cell.
 

Detailed Description

template<class Type>
class STK::CellBase< Type >

template Base class for the Cell in a list .

The class Type should have surdefined the operator = if necessary.

Definition at line 47 of file STK_Cell.h.

Constructor & Destructor Documentation

◆ CellBase() [1/3]

template<class Type >
STK::CellBase< Type >::CellBase ( )
inline

constructor with a pointer on the data.

Definition at line 54 of file STK_Cell.h.

54: data_(Type()) {}
Type data_
Data contained by the Cell.
Definition STK_Cell.h:50

◆ CellBase() [2/3]

template<class Type >
STK::CellBase< Type >::CellBase ( Type const data)
inline

constructor with a reference to the data.

Definition at line 56 of file STK_Cell.h.

56 : data_(data)
57 {}
Type const & data() const
Definition STK_Cell.h:70

◆ CellBase() [3/3]

template<class Type >
STK::CellBase< Type >::CellBase ( const CellBase< Type > &  C)
inline

Copy constructor.

Definition at line 59 of file STK_Cell.h.

59 : data_(C.data_)
60 {}

◆ ~CellBase()

template<class Type >
virtual STK::CellBase< Type >::~CellBase ( )
inlinevirtual

virtual destructor.

Definition at line 62 of file STK_Cell.h.

62{}

Member Function Documentation

◆ data() [1/2]

template<class Type >
Type & STK::CellBase< Type >::data ( )
inline
Returns
a reference to the data.

Definition at line 72 of file STK_Cell.h.

72{ return data_;}

References STK::CellBase< Type >::data_.

◆ data() [2/2]

template<class Type >
Type const & STK::CellBase< Type >::data ( ) const
inline
Returns
a constant reference to the data

Definition at line 70 of file STK_Cell.h.

70{ return data_;}

References STK::CellBase< Type >::data_.

Referenced by STK::CellBase< Type >::setData().

◆ operator=() [1/2]

template<class Type >
CellBase< Type > & STK::CellBase< Type >::operator= ( const CellBase< Type > &  C)
inline

Operator = : overwrite the Cell with C.

Definition at line 64 of file STK_Cell.h.

65 { data_ = C.data_; return *this;}

References STK::CellBase< Type >::data_.

◆ operator=() [2/2]

template<class Type >
CellBase< Type > & STK::CellBase< Type >::operator= ( Type const v)
inline

Operator = : write a value on the cell.

Definition at line 67 of file STK_Cell.h.

68 { data_ = v; return *this;}

References STK::CellBase< Type >::data_.

◆ setData()

template<class Type >
void STK::CellBase< Type >::setData ( Type const data)
inline

Set data.

Definition at line 74 of file STK_Cell.h.

74{ data_ = data;}

References STK::CellBase< Type >::data(), and STK::CellBase< Type >::data_.

Member Data Documentation

◆ data_


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