ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | Private Attributes | List of all members
itk::STLConstContainerAdaptor< TContainer > Class Template Reference

#include <itkSTLConstContainerAdaptor.h>

Detailed Description

template<typename TContainer>
class itk::STLConstContainerAdaptor< TContainer >

An adapter object that casts a [const itk::XxxContainer] into [const std::xxx] and enables access to the underlying data structure.

An adapter object that casts a [const itk::XxxContainer] into [const std::xxx] and enables access to the underlying data structure.

The class is provided for interface consistency with STLContainerAdaptor plus the [const] modifier. Since everything is const, there is no need to call AdapteeType::Modified() in the destructor.

Here's a usage example of STLContainerAdaptor

const std::vector<ElementType> & vec = vecAdaptor.GetSTLContainerRef();
// do things with vec ...

Definition at line 48 of file itkSTLConstContainerAdaptor.h.

Public Types

using AdapteeType = const TContainer
 
using ElementType = const typename AdapteeType::Element
 
using TargetType = const typename AdapteeType::STLContainerType
 

Public Member Functions

TargetTypeGetSTLConstContainerRef ()
 
 STLConstContainerAdaptor (AdapteeType &adaptee)
 
 STLConstContainerAdaptor (AdapteeType *adaptee)
 

Private Attributes

AdapteeTypem_AdapteeRef
 

Member Typedef Documentation

◆ AdapteeType

template<typename TContainer>
using itk::STLConstContainerAdaptor< TContainer >::AdapteeType = const TContainer

Definition at line 53 of file itkSTLConstContainerAdaptor.h.

◆ ElementType

template<typename TContainer>
using itk::STLConstContainerAdaptor< TContainer >::ElementType = const typename AdapteeType::Element

Definition at line 55 of file itkSTLConstContainerAdaptor.h.

◆ TargetType

template<typename TContainer>
using itk::STLConstContainerAdaptor< TContainer >::TargetType = const typename AdapteeType::STLContainerType

Definition at line 56 of file itkSTLConstContainerAdaptor.h.

Constructor & Destructor Documentation

◆ STLConstContainerAdaptor() [1/2]

template<typename TContainer>
itk::STLConstContainerAdaptor< TContainer >::STLConstContainerAdaptor ( AdapteeType adaptee)
inline

Definition at line 62 of file itkSTLConstContainerAdaptor.h.

◆ STLConstContainerAdaptor() [2/2]

template<typename TContainer>
itk::STLConstContainerAdaptor< TContainer >::STLConstContainerAdaptor ( AdapteeType adaptee)
inline

Definition at line 66 of file itkSTLConstContainerAdaptor.h.

Member Function Documentation

◆ GetSTLConstContainerRef()

template<typename TContainer>
TargetType& itk::STLConstContainerAdaptor< TContainer >::GetSTLConstContainerRef ( )
inline

Member Data Documentation

◆ m_AdapteeRef

template<typename TContainer>
AdapteeType& itk::STLConstContainerAdaptor< TContainer >::m_AdapteeRef
private

The documentation for this class was generated from the following file:
itk::STLConstContainerAdaptor
An adapter object that casts a [const itk::XxxContainer] into [const std::xxx] and enables access to ...
Definition: itkSTLConstContainerAdaptor.h:48