1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
/*=========================================================================
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.kitware.com/VolViewCopyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkQueue - a link-list based templated queue
#ifndef __vtkQueue_h
#define __vtkQueue_h
#include "vtkVector.h"
template <class DType> class vtkQueueIterator;
template <class DType>
class vtkQueue : public vtkVector<DType>
{
friend class vtkQueueIterator<DType>;
virtual const char* GetClassNameInternal() const { return "vtkQueue"; }
public:
typedef vtkVector<DType> Superclass;
static vtkQueue<DType> *New();
// Description:
// Create the iterator.
vtkQueueIterator<DType>* NewQueueIterator();
// Description:
// Enqueue an item.
int EnqueueItem(DType a);
// Description:
// Dequeue the item.
int DequeueItem();
// Description:
// Get the item to be deueued. This has to be done before calling of
// DequeueItem
int GetDequeueItem(DType &a);
// Description:
// Display the content of the list.
virtual void DebugList();
// Description:
// Make queue empty.
void MakeEmpty();
protected:
vtkQueue();
virtual ~vtkQueue();
vtkIdType Start;
vtkIdType End;
private:
vtkQueue(const vtkQueue<DType>&); // Not implemented
void operator=(const vtkQueue<DType>&); // Not implemented
};
#ifdef VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION
#include "vtkQueue.txx"
#endif
#endif
|