#ifndef __CPEXTENSIONS__DATASTRUCTURES__VECTORVALUESCONTAINER__H__ #define __CPEXTENSIONS__DATASTRUCTURES__VECTORVALUESCONTAINER__H__ #include #include #include namespace cpExtensions { namespace DataStructures { /** */ template< class T > class VectorValuesContainer : public itk::SimpleDataObjectDecorator< std::vector< T > > { public: typedef std::vector< T > TDecorated; typedef VectorValuesContainer Self; typedef itk::SimpleDataObjectDecorator< TDecorated > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef T TValue; typedef typename TDecorated::iterator Iterator; typedef typename TDecorated::const_iterator ConstIterator; public: itkNewMacro( Self ); itkTypeMacro( VectorValuesContainer, itkSimpleDataObjectDecorator ); public: void PushBack( const T& v ) { this->Get( ).push_back( v ); this->Modified( ); } void PopBack( const T& v ) { this->Get( ).pop_back( ); this->Modified( ); } Iterator Begin( ) { return( this->Get( ).begin( ) ); } Iterator End( ) { return( this->Get( ).end( ) ); } ConstIterator Begin( ) const { return( this->Get( ).begin( ) ); } ConstIterator End( ) const { return( this->Get( ).end( ) ); } protected: VectorValuesContainer( ) : Superclass( ) { } virtual ~VectorValuesContainer( ) { } private: // Purposely not implemented VectorValuesContainer( const Self& other ); Self& operator=( const Self& other ); }; } // ecapseman } // ecapseman #endif // __CPEXTENSIONS__DATASTRUCTURES__VECTORVALUESCONTAINER__H__ // eof - $RCSfile$