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