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

start working userguide of graphview

parent c2477042
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,13 @@ enum class DataType;
/**
* @brief Groupement of Nodes forming a computational graph on which properties and functions
* can easily and safely be applied or run.
* A GraphView countains:
* - mName: The name of the GraphView
* - mRootNode: The root of the GraphView, an arbitrary Node of the GraphView
* - mNodes: The set of Nodes included in the GraphView
* - mNodeRegistry: Set of nodes included in the graphview with names
* - mInputNodes: GraphView inputs IOIndex_t designates the input number
* - mOutputNodes: GraphView outputs IOIndex_t designates the input number
*/
class GraphView : public std::enable_shared_from_this<GraphView> {
private:
......@@ -56,16 +63,22 @@ private:
/// @brief GraphView inputs IOIndex_t designates the input number
std::vector<std::pair<NodePtr, IOIndex_t>> mInputNodes;
/// @brief GraphView outputs IOIndex_t designates the input number
/// @brief GraphView outputs IOIndex_t designates the output number
std::vector<std::pair<NodePtr, IOIndex_t>> mOutputNodes;
public:
/**
* @todo
*/
GraphView(const std::string& name="")
: mName(name)
{
// ctor
}
/**
* @todo
*/
bool operator==(const GraphView &gv) const
{
return mNodes == gv.mNodes;
......@@ -84,15 +97,15 @@ public:
///////////////////////////////////////////////////////
public:
/**
* @brief Name of the node.
* @brief Name of the GraphView.
* @return std::string
*/
inline std::string name() const noexcept { return mName; }
/**
* @brief Set the node name.
* @warning Undefined behaviour when several Nodes have the same name.
* @param name New name for the node.
* @brief Set the GraphView name.
* @warning Undefined behaviour when several GraphViews have the same name. @todo to check if true
* @param name New name for the GraphView.
*/
inline void setName(const std::string &name) { mName = name; }
......@@ -105,7 +118,9 @@ public:
/**
* @brief Save the GraphView as a Mermaid graph in a .md file at the
* specified location.
* @param path
* @param path: Path where the file should be put
* @param verbose @todo i have no idea what it's doing
* @param showProducers if true, shows additional informations
*/
void save(const std::string& path, bool verbose = false, bool showProducers = true) const;
......
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