Space Comps
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
src
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
41
Node
*
getNextForParticle
();
42
47
Node
*
getPrevious
();
48
53
Node
*
getPreviousForParticle
();
54
59
void
setNext
(
Node
* n);
60
65
void
setNextForParticle
(
Node
* n);
66
71
void
setPrevious
(
Node
* n);
72
77
void
setPreviousForParticle
(
Node
* n);
78
83
Particle
*
getParticle
();
84
89
Position
*
getPosition
();
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
Node
The Node class contains a Position for a Particle in the MultiQueue.
Definition:
node.h:15
Node::getPosition
Position * getPosition()
Returns the Position this Node is holding.
Definition:
node.cpp:54
Node::getNext
Node * getNext()
Retruns the next Node in the MultiQueue.
Definition:
node.cpp:18
Node::setPreviousForParticle
void setPreviousForParticle(Node *n)
Sets this Node's pointer to the prevoius Node for this Particle.
Definition:
node.cpp:46
Node::getPrevious
Node * getPrevious()
Returns the Previous Node in the MultiQueue.
Definition:
node.cpp:26
Position
Definition:
position.h:8
Node::setPrevious
void setPrevious(Node *n)
Sets this Node's prevoius pointer to the given Node.
Definition:
node.cpp:42
Particle
Definition:
particle.h:12
Node::Node
Node(Particle *part, Position *pos)
Constructs a Node for the given Particle containing the Position.
Definition:
node.cpp:3
Node::getPreviousForParticle
Node * getPreviousForParticle()
Returns the Prevoius Node in the MultiQueue for this Particle.
Definition:
node.cpp:30
Node::getParticle
Particle * getParticle()
Returns the Particle associated with the Position in this Node.
Definition:
node.cpp:50
Node::setNextForParticle
void setNextForParticle(Node *n)
Sets this Node's pointer to the next Node with the same Particle.
Definition:
node.cpp:38
Node::setNext
void setNext(Node *n)
Sets this Node's next pointer to the given Node.
Definition:
node.cpp:34
Node::getNextForParticle
Node * getNextForParticle()
Returns the next Node in the MultiQueue for this Particle.
Definition:
node.cpp:22
Generated on Sun Feb 23 2014 12:52:24 for Space Comps by
1.8.6