casacore
Public Member Functions | Private Attributes | List of all members
casacore::PtrBlock< T > Class Template Reference

A drop-in replacement for Block<T*>. More...

#include <Block.h>

Public Member Functions

 PtrBlock ()
 
 PtrBlock (size_t n)
 
 PtrBlock (size_t n, T val)
 
 PtrBlock (size_t n, T *&storagePointer, Bool takeOverStorage=True)
 
 PtrBlock (const PtrBlock< T > &other)
 
PtrBlock< T > & operator= (const PtrBlock< T > &other)
 
 ~PtrBlock ()
 
void resize (size_t n, Bool forceSmaller, Bool copyElements)
 
void resize (size_t n)
 
void resize (size_t n, Bool forceSmaller)
 
void remove (size_t whichOne, Bool forceSmaller)
 
void remove (size_t whichOne)
 
void replaceStorage (size_t n, T *&storagePointer, Bool takeOverStorage=True)
 
T & operator[] (size_t index)
 
const T & operator[] (size_t index) const
 
void set (const T &val)
 
PtrBlock< T > & operator= (const T &val)
 
T * storage ()
 
const T * storage () const
 
size_t nelements () const
 
size_t size () const
 
Bool empty () const
 

Private Attributes

Block< void * > block_p
 

Detailed Description

template<class T>
class casacore::PtrBlock< T >

A drop-in replacement for Block<T*>.

Intended use:

Public interface

Prerequisite

Synopsis

PtrBlock<T*> has exactly the same interface as Block<T*> and should be used in preference to the latter. It's purpose is solely to reduce the number of template instantiations.

To Do

Definition at line 814 of file Block.h.

Constructor & Destructor Documentation

◆ PtrBlock() [1/5]

template<class T >
casacore::PtrBlock< T >::PtrBlock ( )
inline

Definition at line 816 of file Block.h.

◆ PtrBlock() [2/5]

template<class T >
casacore::PtrBlock< T >::PtrBlock ( size_t  n)
inlineexplicit

Definition at line 817 of file Block.h.

◆ PtrBlock() [3/5]

template<class T >
casacore::PtrBlock< T >::PtrBlock ( size_t  n,
val 
)
inline

Definition at line 818 of file Block.h.

◆ PtrBlock() [4/5]

template<class T >
casacore::PtrBlock< T >::PtrBlock ( size_t  n,
T *&  storagePointer,
Bool  takeOverStorage = True 
)
inline

Definition at line 819 of file Block.h.

◆ PtrBlock() [5/5]

template<class T >
casacore::PtrBlock< T >::PtrBlock ( const PtrBlock< T > &  other)
inline

Definition at line 821 of file Block.h.

◆ ~PtrBlock()

template<class T >
casacore::PtrBlock< T >::~PtrBlock ( )
inline

Definition at line 824 of file Block.h.

Member Function Documentation

◆ empty()

template<class T >
Bool casacore::PtrBlock< T >::empty ( ) const
inline

Definition at line 843 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::empty().

◆ nelements()

template<class T >
size_t casacore::PtrBlock< T >::nelements ( ) const
inline

Definition at line 841 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::nelements().

◆ operator=() [1/2]

template<class T >
PtrBlock<T>& casacore::PtrBlock< T >::operator= ( const PtrBlock< T > &  other)
inline

Definition at line 822 of file Block.h.

References casacore::PtrBlock< T >::block_p.

◆ operator=() [2/2]

template<class T >
PtrBlock<T>& casacore::PtrBlock< T >::operator= ( const T &  val)
inline

Definition at line 838 of file Block.h.

References casacore::PtrBlock< T >::set().

◆ operator[]() [1/2]

template<class T >
T& casacore::PtrBlock< T >::operator[] ( size_t  index)
inline

Definition at line 835 of file Block.h.

References casacore::PtrBlock< T >::block_p.

◆ operator[]() [2/2]

template<class T >
const T& casacore::PtrBlock< T >::operator[] ( size_t  index) const
inline

Definition at line 836 of file Block.h.

References casacore::PtrBlock< T >::block_p.

◆ remove() [1/2]

template<class T >
void casacore::PtrBlock< T >::remove ( size_t  whichOne)
inline

Definition at line 831 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::remove().

◆ remove() [2/2]

template<class T >
void casacore::PtrBlock< T >::remove ( size_t  whichOne,
Bool  forceSmaller 
)
inline

Definition at line 829 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::remove().

◆ replaceStorage()

template<class T >
void casacore::PtrBlock< T >::replaceStorage ( size_t  n,
T *&  storagePointer,
Bool  takeOverStorage = True 
)
inline

◆ resize() [1/3]

template<class T >
void casacore::PtrBlock< T >::resize ( size_t  n)
inline

Definition at line 827 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::resize().

◆ resize() [2/3]

template<class T >
void casacore::PtrBlock< T >::resize ( size_t  n,
Bool  forceSmaller 
)
inline

Definition at line 828 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::resize().

◆ resize() [3/3]

template<class T >
void casacore::PtrBlock< T >::resize ( size_t  n,
Bool  forceSmaller,
Bool  copyElements 
)
inline

Definition at line 825 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::resize().

◆ set()

template<class T >
void casacore::PtrBlock< T >::set ( const T &  val)
inline

◆ size()

template<class T >
size_t casacore::PtrBlock< T >::size ( ) const
inline

Definition at line 842 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::size().

◆ storage() [1/2]

template<class T >
T* casacore::PtrBlock< T >::storage ( )
inline

Definition at line 839 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::storage().

◆ storage() [2/2]

template<class T >
const T* casacore::PtrBlock< T >::storage ( ) const
inline

Definition at line 840 of file Block.h.

References casacore::PtrBlock< T >::block_p, and casacore::Block< T >::storage().

Member Data Documentation

◆ block_p

template<class T >
Block<void*> casacore::PtrBlock< T >::block_p
private

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