ITK
5.1.0
Insight Toolkit
ITK
Modules
Core
Common
include
itkSTLConstContainerAdaptor.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright NumFOCUS
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef itkSTLConstContainerAdaptor_h
19
#define itkSTLConstContainerAdaptor_h
20
21
namespace
itk
22
{
45
template
<
typename
TContainer>
46
class
STLConstContainerAdaptor
47
{
48
public
:
49
ITK_DISALLOW_COPY_AND_ASSIGN(
STLConstContainerAdaptor
);
50
51
using
AdapteeType
=
const
TContainer;
52
53
using
ElementType
=
const
typename
AdapteeType::Element;
54
using
TargetType
=
const
typename
AdapteeType::STLContainerType;
55
56
private
:
57
AdapteeType
&
m_AdapteeRef
;
58
59
public
:
60
STLConstContainerAdaptor
(
AdapteeType
& adaptee)
61
:
m_AdapteeRef
(adaptee)
62
{}
63
64
STLConstContainerAdaptor
(
AdapteeType
* adaptee)
65
:
m_AdapteeRef
(*adaptee)
66
{}
67
68
TargetType
&
69
GetSTLConstContainerRef
()
70
{
71
return
m_AdapteeRef
.CastToSTLConstContainer();
72
}
73
};
74
}
// end namespace itk
75
76
#endif
itk::STLConstContainerAdaptor::TargetType
const typename AdapteeType::STLContainerType TargetType
Definition:
itkSTLConstContainerAdaptor.h:54
itk::STLConstContainerAdaptor::ElementType
const typename AdapteeType::Element ElementType
Definition:
itkSTLConstContainerAdaptor.h:53
itk::STLConstContainerAdaptor::AdapteeType
const TContainer AdapteeType
Definition:
itkSTLConstContainerAdaptor.h:51
itk::STLConstContainerAdaptor::GetSTLConstContainerRef
TargetType & GetSTLConstContainerRef()
Definition:
itkSTLConstContainerAdaptor.h:69
itk::STLConstContainerAdaptor::STLConstContainerAdaptor
STLConstContainerAdaptor(AdapteeType *adaptee)
Definition:
itkSTLConstContainerAdaptor.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition:
itkArray.h:26
itk::STLConstContainerAdaptor::STLConstContainerAdaptor
STLConstContainerAdaptor(AdapteeType &adaptee)
Definition:
itkSTLConstContainerAdaptor.h:60
itk::STLConstContainerAdaptor
An adapter object that casts a [const itk::XxxContainer] into [const std::xxx] and enables access to ...
Definition:
itkSTLConstContainerAdaptor.h:46
itk::STLConstContainerAdaptor::m_AdapteeRef
AdapteeType & m_AdapteeRef
Definition:
itkSTLConstContainerAdaptor.h:57
Generated on Sat Apr 25 2020 02:05:45 for ITK by
1.8.16