Functions: add debug utility for lazy function graphs

This makes it easier to print information about a socket. Just the
socket name is sometimes not enough information to know where
it is in the graph.
This commit is contained in:
2023-01-20 13:39:10 +01:00
parent 453e47eb42
commit 31a505d1a5
2 changed files with 9 additions and 0 deletions

View File

@@ -147,6 +147,14 @@ std::string Socket::name() const
return fallback_name;
}
std::string Socket::detailed_name() const
{
std::stringstream ss;
ss << node_->name() << ":" << (is_input_ ? "IN" : "OUT") << ":" << index_in_node_ << ":"
<< this->name();
return ss.str();
}
std::string Node::name() const
{
if (this->is_function()) {