MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / OpenQueue

Class OpenQueue

Source/Utils/micropather.cpp:49–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47using namespace micropather;
48
49class 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
79void OpenQueue::Push( PathNode* pNode )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected