![]() |
Orfeo Toolbox
3.16
|
Implements transparent reference counting. More...
#include <itkSmartPointer.h>
Inheritance diagram for itk::SmartPointer< TObjectType >:Public Types | |
| typedef TObjectType | ObjectType |
Public Member Functions | |
| SmartPointer () | |
| SmartPointer (const SmartPointer< ObjectType > &p) | |
| SmartPointer (ObjectType *p) | |
| ~SmartPointer () | |
| ObjectType * | GetPointer () const |
| bool | IsNotNull () const |
| bool | IsNull () const |
| operator ObjectType * () const | |
| template<typename TR > | |
| bool | operator!= (TR r) const |
| ObjectType * | operator-> () const |
| bool | operator< (const SmartPointer &r) const |
| bool | operator<= (const SmartPointer &r) const |
| SmartPointer & | operator= (const SmartPointer &r) |
| SmartPointer & | operator= (ObjectType *r) |
| template<typename TR > | |
| bool | operator== (TR r) const |
| bool | operator> (const SmartPointer &r) const |
| bool | operator>= (const SmartPointer &r) const |
| ObjectType * | Print (std::ostream &os) const |
Private Member Functions | |
| void | Register () |
| void | UnRegister () |
Private Attributes | |
| ObjectType * | m_Pointer |
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.
| typedef TObjectType itk::SmartPointer< TObjectType >::ObjectType |
Definition at line 45 of file itkSmartPointer.h.
|
inline |
Constructor
Definition at line 48 of file itkSmartPointer.h.
|
inline |
Copy constructor
Definition at line 52 of file itkSmartPointer.h.
|
inline |
Constructor to pointer p
Definition at line 57 of file itkSmartPointer.h.
|
inline |
Destructor
Definition at line 62 of file itkSmartPointer.h.
|
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(), 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(), otb::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::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::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::watershed::Relabeler< TScalarType, TImageDimension >::Relabeler(), otb::SailModel::SailModel(), otb::watershed::Segmenter< TInputImage >::Segmenter(), itk::watershed::Segmenter< TInputImage >::Segmenter(), itk::watershed::SegmentTreeGenerator< TScalarType >::SegmentTreeGenerator(), otb::Wrapper::QtWidgetSimpleProgressReport::SetApplication(), otb::Wrapper::QtWidgetProgressReport::SetApplication(), itk::watershed::BoundaryResolver< TPixelType, TDimension >::SetEquivalencyTable(), otb::watershed::BoundaryResolver< TPixelType, TDimension >::SetEquivalencyTable(), itk::fem::FiniteDifferenceFunctionLoad< TMoving, TFixed >::SetMetric(), itk::MultiResolutionPyramidImageFilter< TInputImage, TOutputImage >::SetNumberOfLevels(), itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::SetNumberOfPrincipalComponentsRequired(), otb::Wrapper::Parameter::SetRoot(), 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(), otb::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >::WarpImageFilter(), itk::WarpVectorImageFilter< TInputImage, TOutputImage, TDeformationField >::WarpVectorImageFilter(), otb::Wrapper::ComplexOutputImageParameter::Write(), and otb::Wrapper::OutputImageParameter::Write().
|
inline |
Test if the pointer has been initialized
Definition at line 77 of file itkSmartPointer.h.
Referenced by otb::VectorDataModel::AddPointToGeometry(), otb::GDALImageIO::CanReadFile(), otb::VectorDataModel::DeleteGeometry(), otb::Wrapper::QtWidgetChoiceParameter::DoCreateWidget(), otb::GlWidget::handle(), otb::Wrapper::InputFilenameListParameter::HasValue(), otb::Wrapper::InputImageListParameter::HasValue(), otb::Wrapper::InputVectorDataListParameter::HasValue(), otb::Wrapper::Application::IsInitialized(), itk::ConstrainedRegionBasedLevelSetFunctionSharedData< TInputImage, TFeatureImage, TSingleData >::PopulateListImage(), and otb::GlWidget::resize().
|
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::MRCImageIO::GetHeaderSize(), 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(), and itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetClassifier().
|
inline |
Return pointer to object.
Definition at line 73 of file itkSmartPointer.h.
|
inline |
Definition at line 88 of file itkSmartPointer.h.
|
inline |
Overload operator ->
Definition at line 69 of file itkSmartPointer.h.
|
inline |
Comparison of pointers. Less than comparison.
Definition at line 96 of file itkSmartPointer.h.
|
inline |
Comparison of pointers. Less than or equal to comparison.
Definition at line 104 of file itkSmartPointer.h.
|
inline |
Overload operator assignment.
Definition at line 112 of file itkSmartPointer.h.
Referenced by itk::SmartPointer< AtmosphericCorrectionParametersType >::operator=().
|
inline |
Overload operator assignment.
Definition at line 116 of file itkSmartPointer.h.
|
inline |
Template comparison operators.
Definition at line 84 of file itkSmartPointer.h.
|
inline |
Comparison of pointers. Greater than comparison.
Definition at line 100 of file itkSmartPointer.h.
|
inline |
Comparison of pointers. Greater than or equal to comparison.
Definition at line 108 of file itkSmartPointer.h.
|
inline |
Function to print object pointed to
Definition at line 129 of file itkSmartPointer.h.
Referenced by main(), otb::ogr::internal::Printer::operator()(), and itk::MultiphaseSparseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, TOutputImage, TFunction, TIdCell >::PrintSelf().
|
inlineprivate |
Definition at line 140 of file itkSmartPointer.h.
Referenced by itk::ObjectFactoryBase::CreateInstance(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator=(), and itk::SmartPointer< AtmosphericCorrectionParametersType >::SmartPointer().
|
inlineprivate |
Definition at line 145 of file itkSmartPointer.h.
Referenced by itk::OutputWindow::GetInstance(), itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance(), otb::DEMHandler::Instance(), itk::Directory::New(), otb::GeometriesSet::New(), itk::BSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >::New(), otb::ogr::DataSource::New(), itk::CellInterface< TPixelType, TCellTraits >::MultiVisitor::New(), and itk::SmartPointer< AtmosphericCorrectionParametersType >::~SmartPointer().
|
private |
The pointer to the object referrred to by this smart pointer.
Definition at line 138 of file itkSmartPointer.h.
Referenced by itk::SmartPointer< AtmosphericCorrectionParametersType >::GetPointer(), itk::SmartPointer< AtmosphericCorrectionParametersType >::IsNotNull(), itk::SmartPointer< AtmosphericCorrectionParametersType >::IsNull(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator ObjectType *(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator!=(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator->(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator<(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator<=(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator=(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator==(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator>(), itk::SmartPointer< AtmosphericCorrectionParametersType >::operator>=(), itk::SmartPointer< AtmosphericCorrectionParametersType >::Print(), itk::SmartPointer< AtmosphericCorrectionParametersType >::Register(), itk::SmartPointer< AtmosphericCorrectionParametersType >::SmartPointer(), itk::SmartPointer< AtmosphericCorrectionParametersType >::UnRegister(), and itk::SmartPointer< AtmosphericCorrectionParametersType >::~SmartPointer().