Skip to content
Snippets Groups Projects
Commit 2f1f25a1 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

Revert "chore : removed ostream operator<< support"

This reverts commit ffc4d22e.
parent ffc4d22e
No related branches found
No related tags found
2 merge requests!105version 0.2.0,!100fix/scheduler_exec_time
......@@ -457,10 +457,15 @@ private:
*/
void addParent(const NodePtr otherNode, const IOIndex_t inId);
/**
* @brief operator<< overload to ease print & debug of nodes
* @param[inout] ostream to print to
* @param[in] n node to print
*/
friend std::ostream& operator << (std::ostream& os, Node& n);
};
} // namespace Aidge
#endif /* AIDGE_CORE_GRAPH_NODE_H_ */
......@@ -390,6 +390,25 @@ std::set<Aidge::NodePtr> Aidge::Node::getNodeDelta(int delta, std::set<Aidge::No
return out;
}
namespace Aidge {
std::ostream& operator << (std::ostream& os, Aidge::Node& n) {
using namespace std;
os << "Node :\tName :\t\"" << n.name() << "\"\tType : \"" << n.getOperator()->type()<< "\"\tIN/OUTputs : "<< n.nbInputs() <<"/"<< n.nbOutputs() <<endl;
os << "\tParents :\t" ;
for (const auto & p : n.getParents())
{
os << "\"" <<p->name() << "\"\t";
}
os << endl;
os << "\tChildren :\t" ;
for (const auto & c : n.getChildren())
{
os << "\"" << c->name() << "\"\t";
}
os << endl;
return os;
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
// private
......
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