Orfeo Toolbox  3.16
Public Types | Public Member Functions | Private Member Functions | Private Attributes
itk::SmartPointer< TObjectType > Class Template Reference

Implements transparent reference counting. More...

#include <itkSmartPointer.h>

+ Inheritance diagram for itk::SmartPointer< TObjectType >:

List of all members.

Public Types

typedef TObjectType ObjectType

Public Member Functions

 SmartPointer ()
 SmartPointer (const SmartPointer< ObjectType > &p)
 SmartPointer (ObjectType *p)
 ~SmartPointer ()
ObjectTypeGetPointer () const
bool IsNotNull () const
bool IsNull () const
 operator ObjectType * () const
template<typename TR >
bool operator!= (TR r) const
ObjectTypeoperator-> () const
bool operator< (const SmartPointer &r) const
bool operator<= (const SmartPointer &r) const
SmartPointeroperator= (const SmartPointer &r)
SmartPointeroperator= (ObjectType *r)
template<typename TR >
bool operator== (TR r) const
bool operator> (const SmartPointer &r) const
bool operator>= (const SmartPointer &r) const
ObjectTypePrint (std::ostream &os) const

Private Member Functions

void Register ()
void UnRegister ()

Private Attributes

ObjectTypem_Pointer

Detailed Description

template<class TObjectType>
class itk::SmartPointer< TObjectType >

Implements transparent reference counting.

SmartPointer implements reference counting by overloading operator -> (and *) among others. This allows natural interface to the class referred to by the pointer without having to invoke special Register()/UnRegister() methods directly.

To compile / test this class Windows: cl SmartPointerTest.cxx; ..exe linux: c++ SmartPointerTest.cxx ./a.out other: CCcompiler SmartPointerTest.cxx ./a.out

Definition at line 42 of file itkSmartPointer.h.


Member Typedef Documentation

template<class TObjectType>
typedef TObjectType itk::SmartPointer< TObjectType >::ObjectType

Definition at line 45 of file itkSmartPointer.h.


Constructor & Destructor Documentation

template<class TObjectType>
itk::SmartPointer< TObjectType >::SmartPointer ( )
inline

Constructor

Definition at line 48 of file itkSmartPointer.h.

template<class TObjectType>
itk::SmartPointer< TObjectType >::SmartPointer ( const SmartPointer< ObjectType > &  p)
inline

Copy constructor

Definition at line 52 of file itkSmartPointer.h.

template<class TObjectType>
itk::SmartPointer< TObjectType >::SmartPointer ( ObjectType p)
inline

Constructor to pointer p

Definition at line 57 of file itkSmartPointer.h.

template<class TObjectType>
itk::SmartPointer< TObjectType >::~SmartPointer ( )
inline

Destructor

Definition at line 62 of file itkSmartPointer.h.


Member Function Documentation

template<class TObjectType>
ObjectType* itk::SmartPointer< TObjectType >::GetPointer ( ) const
inline

Access function to pointer.

Definition at line 92 of file itkSmartPointer.h.

Referenced by otb::Wrapper::ParameterGroup::AddChoice(), otb::Wrapper::ChoiceParameter::AddChoice(), otb::Wrapper::ParameterGroup::AddParameter(), otb::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms::AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms(), itk::BayesianClassifierImageFilter< TInputVectorImage, TLabelsType, TPosteriorsPrecisionType, TPriorsPrecisionType >::BayesianClassifierImageFilter(), itk::BinaryMinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >::BinaryMinMaxCurvatureFlowImageFilter(), itk::watershed::BoundaryResolver< TPixelType, TDimension >::BoundaryResolver(), otb::Wrapper::ComplexInputImageParameter::CastVectorImageFromImage(), otb::Wrapper::InputImageParameter::CastVectorImageFromImage(), otb::Wrapper::ParameterGroup::ClearChoices(), itk::Euler2DTransform< TScalarType >::CloneInverseTo(), itk::CenteredRigid2DTransform< TScalarType >::CloneInverseTo(), itk::CenteredSimilarity2DTransform< TScalarType >::CloneInverseTo(), itk::Similarity2DTransform< TScalarType >::CloneInverseTo(), itk::Rigid2DTransform< TScalarType >::CloneInverseTo(), itk::SpatialObjectDuplicator< TInputSpatialObject >::CopyObject(), itk::CoreAtomImageToDistanceMatrixProcess< TSourceImage >::CoreAtomImageToDistanceMatrixProcess(), itk::CoreAtomImageToUnaryCorrespondenceMatrixProcess< TSourceImage >::CoreAtomImageToUnaryCorrespondenceMatrixProcess(), itk::ObjectFactory< T >::Create(), itk::Object::CreateAnother(), itk::BSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >::CreateAnother(), itk::CreateObjectFunction< T >::CreateObject(), otb::Wrapper::ApplicationFactory< TApplication >::CreateObject(), itk::MetaSceneConverter< NDimensions, PixelType, TMeshTraits >::CreateSpatialObjectScene(), itk::TransformIOBase::CreateTransform(), itk::CurvatureFlowImageFilter< TInputImage, TOutputImage >::CurvatureFlowImageFilter(), itk::DemonsRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >::DemonsRegistrationFilter(), itk::DemonsRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::DemonsRegistrationFunction(), itk::DiffeomorphicDemonsRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >::DiffeomorphicDemonsRegistrationFilter(), otb::Wrapper::CommandLineLauncher::DisplayParameterHelp(), itk::watershed::EquivalenceRelabeler< TScalarType, TImageDimension >::EquivalenceRelabeler(), itk::ESMDemonsRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::ESMDemonsRegistrationFunction(), itk::ExpandImageFilter< TInputImage, TOutputImage >::ExpandImageFilter(), itk::ExtensionVelocitiesImageFilter< TLevelSet, TAuxValue, VAuxDimension >::ExtensionVelocitiesImageFilter(), itk::FastMarchingExtensionImageFilter< TLevelSet, TAuxValue, VAuxDimension, TSpeedImage >::FastMarchingExtensionImageFilter(), itk::FastSymmetricForcesDemonsRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >::FastSymmetricForcesDemonsRegistrationFilter(), itk::FastSymmetricForcesDemonsRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::FastSymmetricForcesDemonsRegistrationFunction(), itk::fem::FEMRegistrationFilter< TMovingImage, TFixedImage >::FEMRegistrationFilter(), itk::ContourExtractor2DImageFilter< TInputImage >::FillOutputs(), otb::ImageToPathListAlignFilter< TInputImage, TOutputPath >::GenerateData(), otb::VCAImageFilter< TVectorImage >::GenerateData(), itk::ScalarImageKmeansImageFilter< TInputImage, TOutputImage >::GenerateData(), itk::StreamingImageIOBase::GetActualNumberOfSplitsForWriting(), itk::Statistics::MeanShiftModeSeekerBase< TSample >::GetCacheMethod(), itk::ExceptionObject::GetExceptionData(), itk::SpatialObjectFactoryBase::GetFactory(), itk::TransformFactoryBase::GetFactory(), itk::fem::Solver::GetInterpolationGrid(), itk::Euler2DTransform< TScalarType >::GetInverseTransform(), itk::CenteredAffineTransform< TScalarType, NDimensions >::GetInverseTransform(), itk::CenteredEuler3DTransform< TScalarType >::GetInverseTransform(), itk::ScalableAffineTransform< TScalarType, NDimensions >::GetInverseTransform(), itk::TranslationTransform< TScalarType, NDimensions >::GetInverseTransform(), itk::Rigid3DTransform< TScalarType >::GetInverseTransform(), itk::CenteredRigid2DTransform< TScalarType >::GetInverseTransform(), itk::ScaleTransform< TScalarType, NDimensions >::GetInverseTransform(), itk::CenteredSimilarity2DTransform< TScalarType >::GetInverseTransform(), itk::Similarity2DTransform< TScalarType >::GetInverseTransform(), itk::IdentityTransform< TScalarType, NDimensions >::GetInverseTransform(), itk::Rigid2DTransform< TScalarType >::GetInverseTransform(), itk::AffineTransform< TScalarType, NDimensions >::GetInverseTransform(), itk::MatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::GetInverseTransform(), otb::FilterWatcherBase::GetNameOfClass(), otb::WriterWatcherBase::GetNameOfClass(), otb::Wrapper::ParameterGroup::GetParameterByKey(), otb::FilterWatcherBase::GetProcess(), otb::WriterWatcherBase::GetProcess(), itk::QtProgressBar::GetRedrawCommand(), itk::TreeContainer< itk::SpatialObject< TDimension > * >::GetRoot(), otb::Wrapper::ParameterGroup::GetSelectedItems(), otb::Wrapper::ComplexOutputImageParameter::GetWriter(), otb::Wrapper::OutputImageParameter::GetWriter(), itk::GridImageSource< TOutputImage >::GridImageSource(), itk::ImageRegistrationMethod< TFixedImage, TMovingImage >::ImageRegistrationMethod(), itk::Statistics::ImageToListGenerator< TImage, TMaskImage >::ImageToListGenerator(), itk::ImageToSpatialObjectRegistrationMethod< TFixedImage, TMovingSpatialObject >::ImageToSpatialObjectRegistrationMethod(), otb::DEMHandler::Instance(), itk::LevelSetMotionRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >::LevelSetMotionRegistrationFilter(), itk::LevelSetMotionRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::LevelSetMotionRegistrationFunction(), otb::Statistics::ListSampleSource< TInputSampleList, TOutputSampleList >::ListSampleSource(), otb::Wrapper::CommandLineLauncher::LoadApplication(), otb::Wrapper::CommandLineLauncher::LoadParameters(), itk::Statistics::ImageToListGenerator< TImage, TMaskImage >::MakeOutput(), itk::EigenAnalysis2DImageFilter< TInputImage, TEigenValueImage, TEigenVectorImage >::MakeOutput(), itk::MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, THistogram >::MakeOutput(), itk::watershed::BoundaryResolver< TPixelType, TDimension >::MakeOutput(), otb::Statistics::ListSampleToBalancedListSampleFilter< TInputSampleList, TLabelSampleList, TOutputSampleList >::MakeOutput(), otb::PersistentDescriptorsListSampleGenerator< TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample >::MakeOutput(), itk::ProcessObject::MakeOutput(), itk::MeanSquareRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::MeanSquareRegistrationFunction(), itk::MinimumMaximumImageFilter< TInputImage >::MinimumMaximumImageFilter(), itk::MinMaxCurvatureFlowImageFilter< TInputImage, TOutputImage >::MinMaxCurvatureFlowImageFilter(), itk::MIRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::MIRegistrationFunction(), otb::MorphologicalPyramidAnalysisFilter< TInputImage, TOutputImage, TMorphoFilter >::MorphologicalPyramidAnalysisFilter(), otb::MorphologicalPyramid::MRToMSConverter< TInputImage, TOutputImage >::MRToMSConverter(), itk::MultiResolutionImageRegistrationMethod< TFixedImage, TMovingImage >::MultiResolutionImageRegistrationMethod(), itk::MultiResolutionPDEDeformableRegistration< TFixedImage, TMovingImage, TDeformationField, TRealType >::MultiResolutionPDEDeformableRegistration(), itk::MultiScaleHessianBasedMeasureImageFilter< TInputImage, THessianImage, TOutputImage >::MultiScaleHessianBasedMeasureImageFilter(), itk::ImageToImageMetric< TFixedImage, TMovingImage >::MultiThreadingInitialize(), itk::MutualInformationImageToImageMetric< TFixedImage, TMovingImage >::MutualInformationImageToImageMetric(), otb::NCCRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >::NCCRegistrationFilter(), itk::NCCRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::NCCRegistrationFunction(), otb::NCCRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::NCCRegistrationFunction(), itk::FFTRealToComplexConjugateImageFilter< TPixel, VDimension >::New(), itk::FFTComplexConjugateToRealImageFilter< TPixel, VDimension >::New(), itk::FFTComplexToComplexImageFilter< TPixel, NDimension >::New(), itk::QtProgressBar::Observe(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator=(), itk::MetaDataDictionary::operator[](), otb::PersistentCompareImageFilter< TInputImage >::PersistentCompareImageFilter(), otb::PersistentHistogramVectorImageFilter< TInputImage >::PersistentHistogramVectorImageFilter(), otb::PersistentMinMaxVectorImageFilter< TInputImage >::PersistentMinMaxVectorImageFilter(), otb::PersistentStatisticsImageFilter< TInputImage >::PersistentStatisticsImageFilter(), otb::PersistentStreamingStatisticsMapFromLabelImageFilter< TInputVectorImage, TLabelImage >::PersistentStreamingStatisticsMapFromLabelImageFilter(), itk::PointSetToImageRegistrationMethod< TFixedPointSet, TMovingImage >::PointSetToImageRegistrationMethod(), itk::PointSetToPointSetRegistrationMethod< TFixedPointSet, TMovingPointSet >::PointSetToPointSetRegistrationMethod(), otb::ObjectList< TObject >::PrintSelf(), otb::ProspectModel::ProspectModel(), itk::watershed::Relabeler< TScalarType, TImageDimension >::Relabeler(), otb::SailModel::SailModel(), itk::watershed::Segmenter< TInputImage >::Segmenter(), itk::watershed::SegmentTreeGenerator< TScalarType >::SegmentTreeGenerator(), otb::Wrapper::QtWidgetSimpleProgressReport::SetApplication(), otb::Wrapper::QtWidgetProgressReport::SetApplication(), itk::watershed::BoundaryResolver< TPixelType, TDimension >::SetEquivalencyTable(), itk::fem::FiniteDifferenceFunctionLoad< TMoving, TFixed >::SetMetric(), itk::MultiResolutionPyramidImageFilter< TInputImage, TOutputImage >::SetNumberOfLevels(), itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::SetNumberOfPrincipalComponentsRequired(), otb::Wrapper::ComplexInputImageParameter::SimpleCastImage(), otb::Wrapper::InputImageParameter::SimpleCastImage(), otb::SparseWvltToAngleMapperListFilter< TInputImageList, TOutputSampleList, VNbInputImages >::SparseWvltToAngleMapperListFilter(), itk::StatisticsImageFilter< TInputImage >::StatisticsImageFilter(), otb::Wrapper::OutputImageParameter::SwitchRGBAImageWrite(), otb::Wrapper::OutputImageParameter::SwitchRGBImageWrite(), itk::SymmetricForcesDemonsRegistrationFilter< TFixedImage, TMovingImage, TDeformationField >::SymmetricForcesDemonsRegistrationFilter(), itk::SymmetricForcesDemonsRegistrationFunction< TFixedImage, TMovingImage, TDeformationField >::SymmetricForcesDemonsRegistrationFunction(), itk::SpatialObjectDuplicator< TInputSpatialObject >::Update(), itk::TransformFileReader::Update(), itk::NeuralNetworkFileReader< TNetwork >::Update(), itk::VectorExpandImageFilter< TInputImage, TOutputImage >::VectorExpandImageFilter(), itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::WarpImageFilter(), itk::WarpVectorImageFilter< TInputImage, TOutputImage, TDeformationField >::WarpVectorImageFilter(), otb::Wrapper::ComplexOutputImageParameter::Write(), and otb::Wrapper::OutputImageParameter::Write().

template<class TObjectType>
bool itk::SmartPointer< TObjectType >::IsNotNull ( ) const
inline
template<class TObjectType>
bool itk::SmartPointer< TObjectType >::IsNull ( ) const
inline

Definition at line 79 of file itkSmartPointer.h.

Referenced by otb::Wrapper::ParameterGroup::AddParameter(), otb::VectorDataModel::AddPointToGeometry(), otb::Wrapper::CommandLineLauncher::BeforeExecute(), itk::TransformIOBase::CreateTransform(), itk::ContourExtractor2DImageFilter< TInputImage >::FillOutputs(), itk::ExceptionObject::GetDescription(), itk::ExceptionObject::GetFile(), itk::MRCImageIO::GetHeaderSize(), itk::ExceptionObject::GetLine(), itk::ExceptionObject::GetLocation(), otb::Wrapper::ParameterGroup::GetParameterByKey(), otb::Wrapper::InputVectorDataParameter::GetVectorData(), otb::Wrapper::InputVectorDataParameter::HasValue(), otb::Wrapper::ComplexInputImageParameter::HasValue(), otb::Wrapper::InputImageParameter::HasValue(), otb::PostGISTable< TConnectionImplementation, TPrecision, TSpatialDimension >::InsertPolygons(), otb::GDALImageIO::InternalWriteImageInformation(), otb::Wrapper::CommandLineLauncher::LoadApplication(), otb::Wrapper::CommandLineLauncher::LoadParameters(), main(), itk::FFTRealToComplexConjugateImageFilter< TPixel, VDimension >::New(), itk::FFTComplexConjugateToRealImageFilter< TPixel, VDimension >::New(), itk::FFTComplexToComplexImageFilter< TPixel, NDimension >::New(), itk::BSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >::New(), otb::ViewerModel::OpenImage(), otb::Function::RenderingFunction< TPixel, TRGBPixel >::RenderHistogram(), itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetClassifier(), itk::ExceptionObject::SetDescription(), and itk::ExceptionObject::SetLocation().

template<class TObjectType>
itk::SmartPointer< TObjectType >::operator ObjectType * ( ) const
inline

Return pointer to object.

Definition at line 73 of file itkSmartPointer.h.

template<class TObjectType>
template<typename TR >
bool itk::SmartPointer< TObjectType >::operator!= ( TR  r) const
inline

Definition at line 88 of file itkSmartPointer.h.

template<class TObjectType>
ObjectType* itk::SmartPointer< TObjectType >::operator-> ( ) const
inline

Overload operator ->

Definition at line 69 of file itkSmartPointer.h.

template<class TObjectType>
bool itk::SmartPointer< TObjectType >::operator< ( const SmartPointer< TObjectType > &  r) const
inline

Comparison of pointers. Less than comparison.

Definition at line 96 of file itkSmartPointer.h.

template<class TObjectType>
bool itk::SmartPointer< TObjectType >::operator<= ( const SmartPointer< TObjectType > &  r) const
inline

Comparison of pointers. Less than or equal to comparison.

Definition at line 104 of file itkSmartPointer.h.

template<class TObjectType>
SmartPointer& itk::SmartPointer< TObjectType >::operator= ( const SmartPointer< TObjectType > &  r)
inline

Overload operator assignment.

Definition at line 112 of file itkSmartPointer.h.

Referenced by itk::SmartPointer< AtmosphericCorrectionParametersType >::operator=().

template<class TObjectType>
SmartPointer& itk::SmartPointer< TObjectType >::operator= ( ObjectType r)
inline

Overload operator assignment.

Definition at line 116 of file itkSmartPointer.h.

template<class TObjectType>
template<typename TR >
bool itk::SmartPointer< TObjectType >::operator== ( TR  r) const
inline

Template comparison operators.

Definition at line 84 of file itkSmartPointer.h.

template<class TObjectType>
bool itk::SmartPointer< TObjectType >::operator> ( const SmartPointer< TObjectType > &  r) const
inline

Comparison of pointers. Greater than comparison.

Definition at line 100 of file itkSmartPointer.h.

template<class TObjectType>
bool itk::SmartPointer< TObjectType >::operator>= ( const SmartPointer< TObjectType > &  r) const
inline

Comparison of pointers. Greater than or equal to comparison.

Definition at line 108 of file itkSmartPointer.h.

template<class TObjectType>
ObjectType* itk::SmartPointer< TObjectType >::Print ( std::ostream &  os) const
inline
template<class TObjectType>
void itk::SmartPointer< TObjectType >::Register ( )
inlineprivate
template<class TObjectType>
void itk::SmartPointer< TObjectType >::UnRegister ( )
inlineprivate

Member Data Documentation

template<class TObjectType>
ObjectType* itk::SmartPointer< TObjectType >::m_Pointer
private

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

Generated at Sun Feb 3 2013 02:34:28 for Orfeo Toolbox with doxygen 1.8.1.1