Skip to content
Snippets Groups Projects
Commit 9b6683cf authored by Octave Perrin's avatar Octave Perrin
Browse files

continuation GraphView

parent f3b83a6e
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,8 @@ private:
public:
/**
* @todo
* @brief Constructs a GraphView object with a given name
* @params string name : name given to the GraphView
*/
GraphView(const std::string& name="")
: mName(name)
......@@ -77,19 +78,29 @@ public:
}
/**
* @todo
* @brief equality operator, tests if the current GraphView and the gv GraphView have the same Nodes
* @params GraphView &gv GraphView that shall be compared to the current one
* @returns bool True if both GraphView have the same set of Nodes
*/
bool operator==(const GraphView &gv) const
{
return mNodes == gv.mNodes;
}
/**
* @brief Allows to find a Node in the GraphView using the Node's name
* @params string The name of the Node we are looking for
* @returns NodePtr Pointer of the Node that is found
* @details Returns nullptr if the Node isn't found
*/
const NodePtr operator[](const std::string& nodeName) const;
///////////////////////////////////////////////////////
// FUNCTIONAL DESCRIPTION
///////////////////////////////////////////////////////
/**
* @todo
*/
Connector operator()(const std::vector<Connector> ctors);
///////////////////////////////////////////////////////
......@@ -129,7 +140,7 @@ public:
/**
* Check that a node is in the current GraphView.
* @param nodePtr Node to check
* @return bool True is nodePtr belongs to the GraphView.
* @return bool True if nodePtr belongs to the GraphView.
*/
bool inView(const NodePtr& nodePtr) const;
......@@ -140,10 +151,18 @@ public:
*/
bool inView(const std::string& nodeName) const;
/**
* Retruns the rootNode of the GraphView
* @return NodePtr of the rootNode
*/
inline NodePtr rootNode() const noexcept {
return mRootNode;
}
/**
* Changes the rootNode of the GraphView
* @param NodePtr of the new rootNode
*/
void setRootNode(NodePtr node);
///////////////////////////////////////////////////////
......@@ -162,6 +181,8 @@ public:
/** @brief Assess if the given Node is an output Node of the GraphView object. */
bool isOutputNode(const NodePtr& nodePtr) const;
/** @todo here i am
*/
void setOrderedInputs(const std::vector<std::pair<NodePtr, IOIndex_t>>& inputs);
void setOrderedOutputs(const std::vector<std::pair<NodePtr, IOIndex_t>>& outputs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment