Space Comps
 All Classes Files Functions Variables
node.h
1 #ifndef NODE_H
2 #define NODE_H
3 #include "position.h"
4 #include "particle.h"
5 
6 class Particle;
7 
15 class Node
16 {
17 public:
28  Node(Particle* part, Position* pos);
29  ~Node();
30 
35  Node* getNext();
36 
42 
47  Node* getPrevious();
48 
54 
59  void setNext(Node* n);
60 
65  void setNextForParticle(Node* n);
66 
71  void setPrevious(Node* n);
72 
78 
84 
90 
91 private:
92  Node* next;
93  Node* previous;
94  Node* nextForParticle;
95  Node* previousForParticle;
96 
97  Particle* particle;
98  Position* position;
99 };
100 
101 #endif // NODE_H
The Node class contains a Position for a Particle in the MultiQueue.
Definition: node.h:15
Position * getPosition()
Returns the Position this Node is holding.
Definition: node.cpp:54
Node * getNext()
Retruns the next Node in the MultiQueue.
Definition: node.cpp:18
void setPreviousForParticle(Node *n)
Sets this Node's pointer to the prevoius Node for this Particle.
Definition: node.cpp:46
Node * getPrevious()
Returns the Previous Node in the MultiQueue.
Definition: node.cpp:26
Definition: position.h:8
void setPrevious(Node *n)
Sets this Node's prevoius pointer to the given Node.
Definition: node.cpp:42
Definition: particle.h:12
Node(Particle *part, Position *pos)
Constructs a Node for the given Particle containing the Position.
Definition: node.cpp:3
Node * getPreviousForParticle()
Returns the Prevoius Node in the MultiQueue for this Particle.
Definition: node.cpp:30
Particle * getParticle()
Returns the Particle associated with the Position in this Node.
Definition: node.cpp:50
void setNextForParticle(Node *n)
Sets this Node's pointer to the next Node with the same Particle.
Definition: node.cpp:38
void setNext(Node *n)
Sets this Node's next pointer to the given Node.
Definition: node.cpp:34
Node * getNextForParticle()
Returns the next Node in the MultiQueue for this Particle.
Definition: node.cpp:22