VPTissue Reference Manual
NeighborNodes.h
Go to the documentation of this file.
1 #ifndef NEIGHBOR_NODES_H_INCLUDED
2 #define NEIGHBOR_NODES_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include <iosfwd>
23 
24 namespace SimPT_Sim {
25 
26 class Node;
27 class Cell;
28 
35 {
36 public:
38  NeighborNodes(Cell* c = nullptr, Node* n1 = nullptr, Node* n2 = nullptr);
39 
41  Cell* GetCell() const;
42 
44  Node* GetNb1() const;
45 
47  Node* GetNb2() const;
48 
50  bool operator==(const NeighborNodes& nn) const;
51 
53  bool operator!=(const NeighborNodes& nn) const;
54 
55 private:
56  Cell* m_cell;
57  Node* m_nb1;
58  Node* m_nb2;
59 };
60 
62 std::ostream& operator<<(std::ostream& os, const NeighborNodes& n);
63 
64 }
65 
66 #endif //end_of_include_guard
67 
bool operator==(const NeighborNodes &nn) const
Equality test.
bool operator!=(const NeighborNodes &nn) const
Inequality test.
A cell contains walls and nodes.
Definition: Cell.h:48
Node in cell wall.
Definition: Node.h:39
Cell * GetCell() const
Return the cell of this Neighbor pair.
Namespace for the core simulator.
NeighborNodes(Cell *c=nullptr, Node *n1=nullptr, Node *n2=nullptr)
Plain constructor.
Node * GetNb1() const
Return first node of this Neighbor pair.
Structure of neighboring nodes: two neighboring nodes from standpoint of a given cell with an orderin...
Definition: NeighborNodes.h:34
Node * GetNb2() const
Return second node of this Neighbor pair.