casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::SimpleCountedPtr< t > Class Template Reference

Simple referenced counted pointer to non-constant data. More...

#include <CountedPtr.h>

Inheritance diagram for casa::SimpleCountedPtr< t >:
casa::SimpleCountedConstPtr< t > casa::CountedPtr< t >

List of all members.

Public Member Functions

 SimpleCountedPtr ()
 This constructor allows for the creation of a null SimpleCountedPtr.
 SimpleCountedPtr (t *val, Bool delit=True)
 This constructor sets up a reference count for the val pointer.
 SimpleCountedPtr (const SimpleCountedPtr< t > &val)
 This copy constructor allows SimpleCountedPtrs to be initialized from other SimpleCountedPtrs.
SimpleCountedPtr< t > & operator= (const SimpleCountedPtr< t > &val)
 This assignment operator allows SimpleCountedPtrs to be freely assigned to each other.
SimpleCountedPtr< t > & operator= (t *v)
 This assignment operator allows the object to which the current SimpleCountedPtr points to be changed.
const t & operator* () const
 The SimpleCountedPtr indirection operator simply returns a reference to the value being protected.
t & operator* ()

Detailed Description

template<class t>
class casa::SimpleCountedPtr< t >

Simple referenced counted pointer to non-constant data.

Intended use:

Public interface

Review Status

Reviewed By:
Friso Olnon
Date Reviewed:
1995/03/15
Test programs:
tCountedPtr

Prerequisite

Synopsis

This class, like SimpleCountedConstPtr , does not define the operator->(). Thus it can point to simple data which does not have this operator defined. In contrast to SimpleCountedConstPtr, this class points at non-constant underlying data. The deletion properties are the same for both classes.

Definition at line 423 of file CountedPtr.h.


Constructor & Destructor Documentation

template<class t>
casa::SimpleCountedPtr< t >::SimpleCountedPtr ( ) [inline]

This constructor allows for the creation of a null SimpleCountedPtr.

The assignment operator can be used to assign a null SimpleCountedPtr from another pointer.

Definition at line 430 of file CountedPtr.h.

template<class t>
casa::SimpleCountedPtr< t >::SimpleCountedPtr ( t *  val,
Bool  delit = True 
) [inline]

This constructor sets up a reference count for the val pointer.

By default, the data pointed to by val will be deleted when it is no longer referenced. Passing in False for delit will prevent the data from being deleted when the reference count reaches zero.


Warning: After the counted pointer is initialized the value should no longer be manipulated by the raw pointer of type t*;

Definition at line 443 of file CountedPtr.h.

template<class t>
casa::SimpleCountedPtr< t >::SimpleCountedPtr ( const SimpleCountedPtr< t > &  val) [inline]

This copy constructor allows SimpleCountedPtrs to be initialized from other SimpleCountedPtrs.

Definition at line 448 of file CountedPtr.h.


Member Function Documentation

template<class t>
const t& casa::SimpleCountedPtr< t >::operator* ( ) const [inline]

The SimpleCountedPtr indirection operator simply returns a reference to the value being protected.

If the pointer is un-initialized (null), an exception will be thrown. The member function null () can be used to catch such a condition in time.

Thrown Exceptions

  • ExcpError


Tip: The address of the reference returned should not be stored for later use;

Reimplemented from casa::SimpleCountedConstPtr< t >.

Definition at line 482 of file CountedPtr.h.

template<class t>
t& casa::SimpleCountedPtr< t >::operator* ( ) [inline]

Definition at line 486 of file CountedPtr.h.

template<class t>
SimpleCountedPtr<t>& casa::SimpleCountedPtr< t >::operator= ( const SimpleCountedPtr< t > &  val) [inline]

This assignment operator allows SimpleCountedPtrs to be freely assigned to each other.

Definition at line 453 of file CountedPtr.h.

Referenced by casa::SimpleCountedPtr< Block< AutoDiffA< T > > >::operator=().

template<class t>
SimpleCountedPtr<t>& casa::SimpleCountedPtr< t >::operator= ( t *  v) [inline]

This assignment operator allows the object to which the current SimpleCountedPtr points to be changed.

Reimplemented from casa::SimpleCountedConstPtr< t >.

Reimplemented in casa::CountedPtr< t >, casa::CountedPtr< TempLatticeImpl< typename NumericTraits< T >::ConjugateType > >, casa::CountedPtr< Block< TT > >, casa::CountedPtr< Block< CountedPtr< VisibilityResamplerBase > > >, casa::CountedPtr< Block< T > >, casa::CountedPtr< VisibilityResampler >, casa::CountedPtr< Block< typename FunctionTraits< DComplex >::ArgType > >, casa::CountedPtr< Block< Cube< Float > > >, casa::CountedPtr< Block< Slicer > >, casa::CountedPtr< FTMachine >, casa::CountedPtr< Block< CountedPtr< ResamplerWorklet > > >, casa::CountedPtr< LatticeIterInterface< Float > >, casa::CountedPtr< Block< QString > >, casa::CountedPtr< Block< typename LSQTraits< typename FunctionTraits< Double >::BaseType >::base > >, casa::CountedPtr< Block< typename NumericTraits< FType >::ConjugateType > >, casa::CountedPtr< LELInterface< Complex > >, casa::CountedPtr< LsiIntermediate >, casa::CountedPtr< CFCell >, casa::CountedPtr< Block< ArgType > >, casa::CountedPtr< Matrix< Double > >, casa::CountedPtr< Array< DComplex > >, casa::CountedPtr< Block< CountedPtr< Array< DComplex > > > >, casa::CountedPtr< Block< CFStore > >, casa::CountedPtr< LFBase >, casa::CountedPtr< Block< AutoDiff< Float > > >, casa::CountedPtr< Block< Vector< uInt > > >, casa::CountedPtr< Lattice< typename NumericTraits< Float >::ConjugateType > >, casa::CountedPtr< TempLatticeImpl< typename NumericTraits< Float >::ConjugateType > >, casa::CountedPtr< PlotLogger >, casa::CountedPtr< Block< typename FunctionTraits< DComplex >::BaseType > >, casa::CountedPtr< Block< Flux< Double > > >, casa::CountedPtr< LELInterface< F > >, casa::CountedPtr< LatticeBase >, casa::CountedPtr< CFStore2 >, casa::CountedPtr< Block< MS::PredefinedColumns > >, casa::CountedPtr< Block< float > >, casa::CountedPtr< Block< typename FunctionTraits< T >::BaseType > >, casa::CountedPtr< Block< MFrequency > >, casa::CountedPtr< Block< CountedPtr< SIImageStore > > >, casa::CountedPtr< SDMaskHandler >, casa::CountedPtr< Block< Bool > >, casa::CountedPtr< RefRep >, casa::CountedPtr< RecordRep >, casa::CountedPtr< TempLatticeImpl< T > >, casa::CountedPtr< Block< CountedPtr< ComponentList > > >, casa::CountedPtr< Block< dbus::variant > >, casa::CountedPtr< TypeIO >, casa::CountedPtr< Block< typename FunctionTraits< Float >::BaseType > >, casa::CountedPtr< Block< Vector< typename LSQTraits< typename FunctionTraits< DComplex >::BaseType >::base > > >, casa::CountedPtr< Block< typename FunctionTraits< Double >::DiffType > >, casa::CountedPtr< TableRecordRep >, casa::CountedPtr< Block< SquareMatrix< Complex, 2 > > >, casa::CountedPtr< VisSet >, casa::CountedPtr< Block< BeamCalcGeometry > >, casa::CountedPtr< Block< RigidVector< Int, 2 > > >, casa::CountedPtr< ImageInterface< Complex > >, casa::CountedPtr< Block< typename LSQTraits< typename FunctionTraits< T >::BaseType >::base > >, casa::CountedPtr< SkyCompRep >, casa::CountedPtr< TempLatticeImpl< Float > >, casa::CountedPtr< Block< Quantity > >, casa::CountedPtr< Block< PagedImage< Complex > * > >, casa::CountedPtr< Block< Char > >, casa::CountedPtr< ImageMSCleaner >, casa::CountedPtr< Lattice< T > >, casa::CountedPtr< MeasurementSet >, casa::CountedPtr< Block< bool > >, casa::CountedPtr< Block< typename FunctionTraits< Double >::ArgType > >, casa::CountedPtr< PlotFont >, casa::CountedPtr< Cube< Complex > >, casa::CountedPtr< HDF5DataSet >, casa::CountedPtr< ComponentShape >, casa::CountedPtr< CFTypeReal >, casa::CountedPtr< CoordinateSystem >, casa::CountedPtr< PlotLine >, casa::CountedPtr< Block< Stokes::StokesTypes > >, casa::CountedPtr< Block< Vector< Complex > > >, casa::CountedPtr< Block< Unit > >, casa::CountedPtr< TempLatticeImpl< AccumType > >, casa::CountedPtr< Block< SAS > >, casa::CountedPtr< CFBuffer >, casa::CountedPtr< Block< AutoDiff< Double > > >, casa::CountedPtr< Block< Vector< FuncTypes > > >, casa::CountedPtr< Block< AxisType > >, casa::CountedPtr< ComponentFTMachine >, casa::CountedPtr< PagedImage< Float > >, casa::CountedPtr< Vector< Int > >, casa::CountedPtr< Block< Vector< Range > > >, casa::CountedPtr< ATerm >, casa::CountedPtr< Block< uChar > >, casa::CountedPtr< Block< Matrix< Int > > >, casa::CountedPtr< Block< FuncTypes > >, casa::CountedPtr< Block< ALMAAntennaType > >, casa::CountedPtr< PlotMSIndexer >, casa::CountedPtr< ByteIO >, casa::CountedPtr< Block< typename FunctionTraits< Float >::ArgType > >, casa::CountedPtr< T >, casa::CountedPtr< Block< Range > >, casa::CountedPtr< Block< typename NumericTraits< Float >::ConjugateType > >, casa::CountedPtr< PlotFactory >, casa::CountedPtr< Block< MVTime > >, casa::CountedPtr< Block< std::pair< Quantity, Quantity > > >, casa::CountedPtr< LoggerHolderRep >, casa::CountedPtr< Block< IPosition > >, casa::CountedPtr< Block< Type > >, casa::CountedPtr< Block< AsciiAnnotationFileLine > >, casa::CountedPtr< WPConvFunc >, casa::CountedPtr< Block< MeasComet * > >, casa::CountedPtr< CFType >, casa::CountedPtr< LELLattCoordBase >, casa::CountedPtr< CFCache >, casa::CountedPtr< Lattice< Float > >, casa::CountedPtr< LELInterface< T > >, casa::CountedPtr< TableMeasDescBase >, casa::CountedPtr< SubImage< Float > >, casa::CountedPtr< Array< TT > >, casa::CountedPtr< MaskedLattice< T > >, casa::CountedPtr< Block< CountedPtr< Array< Complex > > > >, casa::CountedPtr< BaseCompare >, casa::CountedPtr< Block< typename FunctionTraits< Double >::BaseType > >, casa::CountedPtr< Block< casa::Double > >, casa::CountedPtr< Block< MSSelection > >, casa::CountedPtr< PSTerm >, casa::CountedPtr< Block< ImageFit1D< Float > > >, casa::CountedPtr< HDF5File >, casa::CountedPtr< Block< Short > >, casa::CountedPtr< ConvolutionFunction >, casa::CountedPtr< Block< Vector< typename LSQTraits< typename FunctionTraits< T >::BaseType >::base > > >, casa::CountedPtr< Block< typename FunctionTraits< T >::ArgType > >, casa::CountedPtr< Block< Int64 > >, casa::CountedPtr< Block< String > >, casa::CountedPtr< Block< Float > >, casa::CountedPtr< Block< MVFrequency > >, casa::CountedPtr< Block< VBStore > >, casa::CountedPtr< Block< Vector< typename LSQTraits< typename FunctionTraits< Double >::BaseType >::base > > >, casa::CountedPtr< LELInterface< DComplex > >, casa::CountedPtr< PlotCanvas >, casa::CountedPtr< Block< NewCalTable > >, casa::CountedPtr< HDF5Group >, casa::CountedPtr< PlotOperation >, casa::CountedPtr< Block< Vector< Int > > >, casa::CountedPtr< Block< CountedPtr< CFCell > > >, casa::CountedPtr< Block< Domain > >, casa::CountedPtr< PlotMutex >, casa::CountedPtr< Lattice< typename NumericTraits< T >::ConjugateType > >, casa::CountedPtr< Block< MVAngle > >, casa::CountedPtr< Block< CountedPtr< FTMachine > > >, casa::CountedPtr< ThreadCoordinator< Int > >, casa::CountedPtr< MSHistoryHandler >, casa::CountedPtr< Plotter >, casa::CountedPtr< Block< Vector< typename LSQTraits< typename FunctionTraits< Float >::BaseType >::base > > >, casa::CountedPtr< Block< typename FunctionTraits< Float >::DiffType > >, casa::CountedPtr< SIMapperBase >, casa::CountedPtr< Block< CStokesVector > >, casa::CountedPtr< Block< GaussianSpectralElement > >, casa::CountedPtr< Matrix< Float > >, casa::CountedPtr< Block< Vector< Slice > > >, casa::CountedPtr< Block< Cube< Bool > > >, casa::CountedPtr< PlotSymbol >, casa::CountedPtr< VisibilityResamplerBase >, casa::CountedPtr< SolvableVisJones >, casa::CountedPtr< PolOuterProduct >, casa::CountedPtr< IlluminationConvFunc >, casa::CountedPtr< ComponentList >, casa::CountedPtr< Array< Complex > >, casa::CountedPtr< Block< typename LSQTraits< typename FunctionTraits< DComplex >::BaseType >::base > >, casa::CountedPtr< SimplePBConvFunc >, casa::CountedPtr< Matrix< Complex > >, casa::CountedPtr< Block< boost::dynamic_bitset<> > >, casa::CountedPtr< Block< typename FunctionTraits< T >::DiffType > >, casa::CountedPtr< Lattice< AccumType > >, casa::CountedPtr< ImageInterface< Float > >, casa::CountedPtr< Block< Vector< Double > > >, casa::CountedPtr< Block< uInt > >, casa::CountedPtr< LatticeIterInterface< T > >, casa::CountedPtr< Block< typename FunctionTraits< DComplex >::DiffType > >, casa::CountedPtr< Block< RFlagWord > >, casa::CountedPtr< LELInterface< Float > >, casa::CountedPtr< WTerm >, casa::CountedPtr< LogSinkInterface >, casa::CountedPtr< Block< FType > >, casa::CountedPtr< Block< DComplex > >, casa::CountedPtr< ConvolveGridder< Double, Complex > >, casa::CountedPtr< Block< MVBaseline > >, casa::CountedPtr< Block< Complex > >, casa::CountedPtr< RecordDescRep >, casa::CountedPtr< DataConversion >, casa::CountedPtr< Block< MEpoch > >, casa::CountedPtr< LELInterface< Double > >, casa::CountedPtr< Block< FitterType > >, casa::CountedPtr< Block< CTTimeInterp1 * > >, casa::CountedPtr< Block< recordType > >, casa::CountedPtr< Lattice< Complex > >, casa::CountedPtr< SIImageStore >, casa::CountedPtr< Block< CountedPtr< LFBase > > >, casa::CountedPtr< Block< RegularFile > >, casa::CountedPtr< Block< Slice > >, casa::CountedPtr< Block< typename NumericTraits< Double >::ConjugateType > >, casa::CountedPtr< FluxRep< Double > >, casa::CountedPtr< PBMathInterface >, casa::CountedPtr< ValueHolderRep >, casa::CountedPtr< Block< Quantum< Double > > >, casa::CountedPtr< Block< double > >, casa::CountedPtr< Block< Int > >, casa::CountedPtr< Block< AutoDiff< T > > >, casa::CountedPtr< Block< AnnotationBase::Keyword > >, casa::CountedPtr< ResamplerWorklet >, casa::CountedPtr< Block< CountedPtr< Matrix< Double > > > >, casa::CountedPtr< Block< uInt64 > >, casa::CountedPtr< TempImage< Float > >, casa::CountedPtr< TiledFileAccess >, casa::CountedPtr< Block< MPosition > >, casa::CountedPtr< Block< RigidVector< Double, 2 > > >, casa::CountedPtr< Block< MDirection > >, casa::CountedPtr< LELInterface< Bool > >, casa::CountedPtr< SDAlgorithmBase >, casa::CountedPtr< FluxRep< T > >, casa::CountedPtr< Block< Vector< MVAngle > > >, casa::CountedPtr< Block< Vector< MVFrequency > > >, casa::CountedPtr< Block< GaussianBeam > >, casa::CountedPtr< Block< Vector< String > > >, casa::CountedPtr< Block< typename LSQTraits< typename FunctionTraits< Float >::BaseType >::base > >, casa::CountedPtr< Block< MeasurementSet > >, casa::CountedPtr< PlotColor >, casa::CountedPtr< Block< typename NumericTraits< T >::ConjugateType > >, casa::CountedPtr< PlotAreaFill >, casa::CountedPtr< Block< RORecordFieldPtr< Double > > >, casa::CountedPtr< Block< RigidVector< Double, 3 > > >, casa::CountedPtr< SpectralModel >, casa::CountedPtr< PGPlotterInterface >, casa::CountedPtr< Block< int > >, casa::CountedPtr< TempLatticeImpl< Complex > >, casa::CountedPtr< Block< CountedPtr< CFBuffer > > >, casa::CountedPtr< Block< Double > >, and casa::CountedPtr< Block< AutoDiffA< T > > >.

Definition at line 461 of file CountedPtr.h.


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