| 47 | using namespace micropather; |
| 48 | |
| 49 | class OpenQueue |
| 50 | { |
| 51 | public: |
| 52 | OpenQueue( Graph* _graph ) |
| 53 | { |
| 54 | graph = _graph; |
| 55 | sentinel = (PathNode*) sentinelMem; |
| 56 | sentinel->InitSentinel(); |
| 57 | #ifdef DEBUG |
| 58 | sentinel->CheckList(); |
| 59 | #endif |
| 60 | } |
| 61 | ~OpenQueue() {} |
| 62 | |
| 63 | void Push( PathNode* pNode ); |
| 64 | PathNode* Pop(); |
| 65 | void Update( PathNode* pNode ); |
| 66 | |
| 67 | bool Empty() { return sentinel->next == sentinel; } |
| 68 | |
| 69 | private: |
| 70 | OpenQueue( const OpenQueue& ); // undefined and unsupported |
| 71 | void operator=( const OpenQueue& ); |
| 72 | |
| 73 | PathNode* sentinel; |
| 74 | int sentinelMem[ ( sizeof( PathNode ) + sizeof( int ) ) / sizeof( int ) ]; |
| 75 | Graph* graph; // for debugging |
| 76 | }; |
| 77 | |
| 78 | |
| 79 | void OpenQueue::Push( PathNode* pNode ) |
nothing calls this directly
no outgoing calls
no test coverage detected