]> Creatis software - FrontAlgorithms.git/blob - libs/fpa/Base/QueueAlgorithm.h
...
[FrontAlgorithms.git] / libs / fpa / Base / QueueAlgorithm.h
1 #ifndef __fpa__Base__QueueAlgorithm__h__
2 #define __fpa__Base__QueueAlgorithm__h__
3
4 #include <queue>
5 #include <itkMacro.h>
6 #include <itkSmartPointer.h>
7
8 namespace fpa
9 {
10   namespace Base
11   {
12     /**
13      */
14     template< class _TSuperclass >
15     class QueueAlgorithm
16       : public _TSuperclass
17     {
18     public:
19       typedef QueueAlgorithm                  Self;
20       typedef _TSuperclass                    Superclass;
21       typedef itk::SmartPointer< Self >       Pointer;
22       typedef itk::SmartPointer< const Self > ConstPointer;
23
24     protected:
25       typedef typename Superclass::_TQueueNode _TQueueNode;
26       typedef std::queue< _TQueueNode > _TQueue;
27
28     public:
29       itkTypeMacro( QueueAlgorithm, _TSuperclass );
30
31     protected:
32       QueueAlgorithm( );
33       virtual ~QueueAlgorithm( );
34
35       virtual unsigned long _QueueSize( ) const override;
36       virtual void _QueueClear( ) override;
37       virtual void _QueuePush( const _TQueueNode& node ) override;
38       virtual _TQueueNode _QueuePop( ) override;
39
40     private:
41       // Purposely not defined
42       QueueAlgorithm( const Self& other );
43       Self& operator=( const Self& other );
44
45     protected:
46       _TQueue m_Queue;
47     };
48
49   } // ecapseman
50
51 } // ecapseman
52
53 #ifndef ITK_MANUAL_INSTANTIATION
54 #  include <fpa/Base/QueueAlgorithm.hxx>
55 #endif // ITK_MANUAL_INSTANTIATION
56
57 #endif // __fpa__Base__QueueAlgorithm__h__
58
59 // eof - $RCSfile$