![]() |
PhoenixGraph
01.0.0
Set of tools to simplify graph manipulation
|
#include <Node.h>
Public Member Functions | |
void | addChild (UIdx child) |
Add a child to the current Node. | |
void | addParent (UIdx parent) |
Add a parent to the current Node. | |
T & | getData () |
Get the data of the Node. | |
const T & | getData () const |
Get the data of the Node. | |
std::string | getDotDefinition () const |
Get the dot definition name of the current Node. | |
std::string | getDotName () const |
Get the dot name of the current Node. | |
UIdx | getIndex () const |
Get the index of the Node. | |
bool & | getIsUpdated () |
Say if the node is updated. | |
bool | getIsUpdated () const |
Say if the node is updated. | |
std::list< UIdx > & | getListChild () |
Get the list of children of the Node. | |
const std::list< UIdx > & | getListChild () const |
Get the list of children of the Node. | |
std::list< UIdx > & | getListParent () |
Get the list of parents of the Node. | |
const std::list< UIdx > & | getListParent () const |
Get the list of parents of the Node. | |
std::string & | getName () |
Get the name of the Node. | |
const std::string & | getName () const |
Get the name of the Node. | |
bool | isEnd () const |
Say if the current Node has no child. | |
bool | isStart () const |
Say if the current Node has no parent. | |
Node (const Node< T, UIdx > &other) | |
Copy constructor of Node. | |
Node (const std::string &name="") | |
Default constructor of Node. | |
Node (const T &data, const std::string &name="") | |
Constructor of Node. | |
Node & | operator= (const Node< T, UIdx > &other) |
Definition of equal operator of Node. | |
void | removeChild (UIdx child) |
Remove connection with child. | |
void | removeParent (UIdx parent) |
Remove connection with parent. | |
void | setData (const T &data) |
Set the data of the Node. | |
void | setIndex (UIdx index) |
Set the index of the Node. | |
void | setIsUpdated (bool isUpdated) |
Say if the node is updated. | |
void | setListChild (const std::list< UIdx > &listChild) |
Set the list of children of the Node. | |
void | setListParent (const std::list< UIdx > &listParent) |
Set the list of parents of the Node. | |
void | setName (const std::string &name) |
Set the name of the Node. | |
virtual | ~Node () |
Destructor of Node. | |
Protected Member Functions | |
void | copyNode (const Node< T, UIdx > &other) |
Copy function of Node. | |
Private Member Functions | |
void | initialisationNode () |
Initialisation function of the class Node. | |
Private Attributes | |
T | p_data |
Data of the node. | |
UIdx | p_index |
Index of the current Node. | |
bool | p_isUpdated |
Check if the current Node has been already updated. | |
std::list< UIdx > | p_listChild |
List of children Node. | |
std::list< UIdx > | p_listParent |
List of parent Node. | |
std::string | p_name |
Name of the current Node. | |
T : type of the data to be connected in the graph UIdx : type of the index to be used to connect the Node together
Default constructor of Node.
name | : name of th current Node |
Definition at line 41 of file Node_impl.h.
References initialisationNode(), and p_name.
Referenced by copyNode(), Node(), and operator=().
Node< T, UIdx >::Node | ( | const T & | data, |
const std::string & | name = "" ) |
Constructor of Node.
Definition at line 50 of file Node_impl.h.
References initialisationNode(), p_data, and p_name.
Copy constructor of Node.
other | : class to copy |
Definition at line 60 of file Node_impl.h.
References copyNode(), and Node().
void Node< T, UIdx >::addChild | ( | UIdx | child | ) |
Add a child to the current Node.
child | : index of the corresponding child Node |
Definition at line 84 of file Node_impl.h.
References p_listChild.
Referenced by Graph< T, UIdx >::connectNode(), Graph< T, UIdx >::connectNode(), and Graph< T, UIdx >::connectNode().
void Node< T, UIdx >::addParent | ( | UIdx | parent | ) |
Add a parent to the current Node.
parent | : index of the corresponding parent Node |
Definition at line 92 of file Node_impl.h.
References p_listParent.
Referenced by Graph< T, UIdx >::connectNode(), Graph< T, UIdx >::connectNode(), and Graph< T, UIdx >::connectNode().
|
protected |
Copy function of Node.
other | : class to copy |
Definition at line 263 of file Node_impl.h.
References Node(), p_data, p_index, p_isUpdated, p_listChild, p_listParent, and p_name.
Referenced by Node(), and operator=().
T & Node< T, UIdx >::getData | ( | ) |
const T & Node< T, UIdx >::getData | ( | ) | const |
std::string Node< T, UIdx >::getDotDefinition | ( | ) | const |
Get the dot definition name of the current Node.
Definition at line 241 of file Node_impl.h.
References getDotName(), isEnd(), isStart(), node_convertToString(), p_index, and p_name.
std::string Node< T, UIdx >::getDotName | ( | ) | const |
Get the dot name of the current Node.
Definition at line 230 of file Node_impl.h.
References node_convertToString(), and p_index.
Referenced by getDotDefinition(), and Graph< T, UIdx >::toDot().
UIdx Node< T, UIdx >::getIndex | ( | ) | const |
bool & Node< T, UIdx >::getIsUpdated | ( | ) |
Say if the node is updated.
Definition at line 200 of file Node_impl.h.
References p_isUpdated.
bool Node< T, UIdx >::getIsUpdated | ( | ) | const |
Say if the node is updated.
Definition at line 194 of file Node_impl.h.
References p_isUpdated.
Referenced by Graph< T, UIdx >::isListNodeUdpated(), Graph< T, UIdx >::iterateChildrenCheckUpdate(), and Graph< T, UIdx >::iterateParentCheckUpdate().
std::list< UIdx > & Node< T, UIdx >::getListChild | ( | ) |
Get the list of children of the Node.
Definition at line 158 of file Node_impl.h.
References p_listChild.
const std::list< UIdx > & Node< T, UIdx >::getListChild | ( | ) | const |
Get the list of children of the Node.
Definition at line 152 of file Node_impl.h.
References p_listChild.
Referenced by Graph< T, UIdx >::iterateChildren(), Graph< T, UIdx >::iterateChildrenCheckUpdate(), Graph< T, UIdx >::iterateParentCheckUpdate(), and Graph< T, UIdx >::removeNode().
std::list< UIdx > & Node< T, UIdx >::getListParent | ( | ) |
Get the list of parents of the Node.
Definition at line 170 of file Node_impl.h.
References p_listParent.
const std::list< UIdx > & Node< T, UIdx >::getListParent | ( | ) | const |
Get the list of parents of the Node.
Definition at line 164 of file Node_impl.h.
References p_listParent.
Referenced by Graph< T, UIdx >::iterateChildrenCheckUpdate(), Graph< T, UIdx >::iterateParent(), Graph< T, UIdx >::iterateParentCheckUpdate(), and Graph< T, UIdx >::removeNode().
std::string & Node< T, UIdx >::getName | ( | ) |
const std::string & Node< T, UIdx >::getName | ( | ) | const |
|
private |
Initialisation function of the class Node.
Definition at line 274 of file Node_impl.h.
References p_isUpdated, and p_name.
Referenced by Node(), and Node().
bool Node< T, UIdx >::isEnd | ( | ) | const |
Say if the current Node has no child.
Definition at line 224 of file Node_impl.h.
References p_listChild.
Referenced by getDotDefinition().
bool Node< T, UIdx >::isStart | ( | ) | const |
Say if the current Node has no parent.
Definition at line 218 of file Node_impl.h.
References p_listParent.
Referenced by getDotDefinition().
Node< T, UIdx > & Node< T, UIdx >::operator= | ( | const Node< T, UIdx > & | other | ) |
Definition of equal operator of Node.
other | : class to copy |
Definition at line 75 of file Node_impl.h.
References copyNode(), and Node().
void Node< T, UIdx >::removeChild | ( | UIdx | child | ) |
Remove connection with child.
child | : index of the child to be removed |
Definition at line 100 of file Node_impl.h.
References listindex_remove(), and p_listChild.
Referenced by Graph< T, UIdx >::removeNode().
void Node< T, UIdx >::removeParent | ( | UIdx | parent | ) |
Remove connection with parent.
parent | : index of the parent to be removed |
Definition at line 108 of file Node_impl.h.
References listindex_remove(), and p_listParent.
Referenced by Graph< T, UIdx >::removeNode().
void Node< T, UIdx >::setData | ( | const T & | data | ) |
void Node< T, UIdx >::setIndex | ( | UIdx | index | ) |
Set the index of the Node.
index | : index of the Node |
Definition at line 128 of file Node_impl.h.
References p_index.
Referenced by Graph< T, UIdx >::createNode(), and Graph< T, UIdx >::createNode().
void Node< T, UIdx >::setIsUpdated | ( | bool | isUpdated | ) |
Say if the node is updated.
isUpdated | : true if the Node is updated, false otherwise |
Definition at line 140 of file Node_impl.h.
References p_isUpdated.
Referenced by Graph< T, UIdx >::iterateChildrenCheckUpdate(), and Graph< T, UIdx >::iterateParentCheckUpdate().
void Node< T, UIdx >::setListChild | ( | const std::list< UIdx > & | listChild | ) |
Set the list of children of the Node.
listChild | : list of children of the Node |
Definition at line 116 of file Node_impl.h.
References p_listChild.
void Node< T, UIdx >::setListParent | ( | const std::list< UIdx > & | listParent | ) |
Set the list of parents of the Node.
listParent | : list of parents of the Node |
Definition at line 122 of file Node_impl.h.
References p_listParent.
void Node< T, UIdx >::setName | ( | const std::string & | name | ) |
|
private |
|
private |
Index of the current Node.
Definition at line 67 of file Node.h.
Referenced by copyNode(), getDotDefinition(), getDotName(), getIndex(), and setIndex().
|
private |
Check if the current Node has been already updated.
Definition at line 71 of file Node.h.
Referenced by copyNode(), getIsUpdated(), getIsUpdated(), initialisationNode(), and setIsUpdated().
|
private |
List of children Node.
Definition at line 63 of file Node.h.
Referenced by addChild(), copyNode(), getListChild(), getListChild(), isEnd(), removeChild(), and setListChild().
|
private |
List of parent Node.
Definition at line 65 of file Node.h.
Referenced by addParent(), copyNode(), getListParent(), getListParent(), isStart(), removeParent(), and setListParent().
|
private |
Name of the current Node.
Definition at line 69 of file Node.h.
Referenced by copyNode(), getDotDefinition(), getName(), getName(), initialisationNode(), Node(), Node(), and setName().