The Gaudi Framework  v33r1 (b1225454)
NTuple::Item< TYP > Class Template Reference

Class acting as a smart pointer holding a N tuple _Item. More...

#include <GaudiKernel/NTuple.h>

Inheritance diagram for NTuple::Item< TYP >:
Collaboration diagram for NTuple::Item< TYP >:

Public Member Functions

 Item ()=default
 Standard Constructor. More...
 
 operator const TYP () const
 Automatic type conversion. More...
 
TYP operator * ()
 Dereference operator for pointers. More...
 
const TYP operator * () const
 Dereference operator for pointers(CONST) More...
 
Itemoperator++ ()
 
Itemoperator++ (int)
 
Itemoperator-- ()
 
Itemoperator-- (int)
 
Itemoperator= (const TYP data)
 Assignment operator. More...
 
template<class T >
Itemoperator= (const Item< T > &data)
 Assignment operator. More...
 
Item< TYP > & operator+= (const TYP data)
 
Item< TYP > & operator-= (const TYP data)
 
Item< TYP > & operator *= (const TYP data)
 
Item< TYP > & operator/= (const TYP data)
 
- Public Member Functions inherited from NTuple::_Accessor< _Item< TYP > >
 _Accessor ()=default
 Standard Constructor. More...
 
virtual ~_Accessor ()=default
 Standard Destructor. More...
 
bool operator! () const
 Check if column is present. More...
 
 operator const void * () const
 Check if column is present. More...
 
_Item< TYP > * operator-> ()
 Dereference operator. More...
 
const _Item< TYP > * operator-> () const
 Dereference operator (CONST) More...
 
const Range< _Item< TYP > > & range () const
 Access the range. More...
 

Private Types

typedef Item< TYP > _My
 

Additional Inherited Members

- Protected Attributes inherited from NTuple::_Accessor< _Item< TYP > >
_Item< TYP > * m_ptr
 Pointer to instance. More...
 

Detailed Description

template<class TYP>
class NTuple::Item< TYP >

Class acting as a smart pointer holding a N tuple _Item.

Definition at line 58 of file NTuple.h.

Member Typedef Documentation

◆ _My

template<class TYP>
typedef Item<TYP> NTuple::Item< TYP >::_My
private

Definition at line 257 of file NTuple.h.

Constructor & Destructor Documentation

◆ Item()

template<class TYP>
NTuple::Item< TYP >::Item ( )
default

Standard Constructor.

Member Function Documentation

◆ operator *() [1/2]

template<class TYP>
TYP NTuple::Item< TYP >::operator * ( )
inline

Dereference operator for pointers.

Definition at line 265 of file NTuple.h.

265 { return this->m_ptr->get(); }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

◆ operator *() [2/2]

template<class TYP>
const TYP NTuple::Item< TYP >::operator * ( ) const
inline

Dereference operator for pointers(CONST)

Definition at line 267 of file NTuple.h.

267 { return this->m_ptr->get(); }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

◆ operator *=()

template<class TYP>
Item<TYP>& NTuple::Item< TYP >::operator *= ( const TYP  data)
inline

Definition at line 292 of file NTuple.h.

292  {
293  this->m_ptr->set( this->m_ptr->get() * data );
294  return *this;
295  }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

◆ operator const TYP()

template<class TYP>
NTuple::Item< TYP >::operator const TYP ( ) const
inline

Automatic type conversion.

Definition at line 263 of file NTuple.h.

263 { return this->m_ptr->get(); }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

◆ operator++() [1/2]

template<class TYP>
Item& NTuple::Item< TYP >::operator++ ( )
inline

Definition at line 269 of file NTuple.h.

269 { return *this += TYP( 1 ); }

◆ operator++() [2/2]

template<class TYP>
Item& NTuple::Item< TYP >::operator++ ( int  )
inline

Definition at line 270 of file NTuple.h.

270 { return *this += TYP( 1 ); }

◆ operator+=()

template<class TYP>
Item<TYP>& NTuple::Item< TYP >::operator+= ( const TYP  data)
inline

Definition at line 284 of file NTuple.h.

284  {
285  this->m_ptr->set( this->m_ptr->get() + data );
286  return *this;
287  }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

◆ operator--() [1/2]

template<class TYP>
Item& NTuple::Item< TYP >::operator-- ( )
inline

Definition at line 271 of file NTuple.h.

271 { return *this -= TYP( 1 ); }

◆ operator--() [2/2]

template<class TYP>
Item& NTuple::Item< TYP >::operator-- ( int  )
inline

Definition at line 272 of file NTuple.h.

272 { return *this -= TYP( 1 ); }

◆ operator-=()

template<class TYP>
Item<TYP>& NTuple::Item< TYP >::operator-= ( const TYP  data)
inline

Definition at line 288 of file NTuple.h.

288  {
289  this->m_ptr->set( this->m_ptr->get() - data );
290  return *this;
291  }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

◆ operator/=()

template<class TYP>
Item<TYP>& NTuple::Item< TYP >::operator/= ( const TYP  data)
inline

Definition at line 296 of file NTuple.h.

296  {
297  this->m_ptr->set( this->m_ptr->get() / data );
298  return *this;
299  }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

◆ operator=() [1/2]

template<class TYP>
Item& NTuple::Item< TYP >::operator= ( const TYP  data)
inline

Assignment operator.

Definition at line 274 of file NTuple.h.

274  {
275  this->m_ptr->set( data );
276  return *this;
277  }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

◆ operator=() [2/2]

template<class TYP>
template<class T >
Item& NTuple::Item< TYP >::operator= ( const Item< T > &  data)
inline

Assignment operator.

Definition at line 280 of file NTuple.h.

280  {
281  this->m_ptr->set( data->get() );
282  return *this;
283  }
_Item< TYP > * m_ptr
Pointer to instance.
Definition: NTuple.h:234

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