00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkSTLConstContainerAdaptor_h
00018 #define __itkSTLConstContainerAdaptor_h
00019
00020
00021 namespace itk {
00022
00023
00037 template<typename TContainer>
00038 class STLConstContainerAdaptor
00039 {
00040 public:
00041
00042 typedef const TContainer AdapteeType;
00043
00044 typedef const typename AdapteeType::Element ElementType;
00045 typedef const typename AdapteeType::STLContainerType TargetType;
00046
00047
00048 private:
00049
00050 AdapteeType & m_AdapteeRef;
00051
00053 STLConstContainerAdaptor(const STLConstContainerAdaptor & r);
00054
00055
00056 const STLConstContainerAdaptor & operator=(const STLConstContainerAdaptor & r);
00057
00058
00059 public:
00060
00061 STLConstContainerAdaptor(AdapteeType & adaptee)
00062 : m_AdapteeRef(adaptee)
00063 {}
00064
00065 STLConstContainerAdaptor(AdapteeType * adaptee)
00066 : m_AdapteeRef(*adaptee)
00067 {}
00068
00069 TargetType & GetSTLConstContainerRef()
00070 {
00071 return m_AdapteeRef.CastToSTLConstContainer();
00072 }
00073
00074 };
00075
00076
00077 }
00078
00079 #endif