Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
AbsQueue.h
Go to the documentation of this file.
1//! @file AbsQueue.h
2//! @brief Pure virtual base class for queueing data
3//!
4/////////////////////////////////////////////////////////////////
5#ifndef __AbsQueue
6#define __AbsQueue
7
8// Queue abstract class interface
9//
10// Etype: must have zero-parameter constructor;
11// implementation will require either
12// operator= or copy constructor, perhaps both
13// CONSTRUCTION: with (a) no initializer;
14// copy construction of Queue objects is DISALLOWED
15//
16// ******************PUBLIC OPERATIONS*********************
17// All of the following are pure virtual functions
18// void Enqueue( Etype X )--> Insert X
19// void Dequeue( ) --> Remove least recently inserted item
20// Etype GetFront( ) --> Return least recently inserted item
21// int IsEmpty( ) --> Return 1 if empty; else return 0
22// int IsFull( ) --> Return 1 if full; else return 0
23// void MakeEmpty( ) --> Remove all items
24// ******************ERRORS********************************
25// GetFront or Dequeue on empty queue
26
27template <class Etype>
28class AbsQueue
29{
30 public:
31 AbsQueue( ) { } // Default constructor
32 virtual ~AbsQueue( ) { } // Destructor
33
34 virtual void Enqueue( const Etype & X ) = 0; // Insert
35 virtual void Dequeue( ) = 0; // Remove
36 virtual const Etype & GetFront( ) const = 0; // Find
37 virtual int IsEmpty( ) const = 0;
38 virtual int IsFull( ) const = 0;
39 virtual void MakeEmpty( ) = 0;
40 private:
41 // Disable copy constructor
42 AbsQueue( const AbsQueue & ) { }
43};
44#endif
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27