Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dotgraph label nojustify #486

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ TaskComposerDataStorage::TaskComposerDataStorage(const TaskComposerDataStorage&
std::shared_lock rhs_lock(other.mutex_, std::defer_lock);
std::scoped_lock lock{ lhs_lock, rhs_lock };

name_ = other.name_;
name_ = other.name_; // NOLINT(cppcoreguidelines-prefer-member-initializer)
data_ = other.data_; // NOLINT(cppcoreguidelines-prefer-member-initializer)
}

Expand All @@ -57,7 +57,7 @@ TaskComposerDataStorage& TaskComposerDataStorage::operator=(const TaskComposerDa
std::shared_lock rhs_lock(other.mutex_, std::defer_lock);
std::scoped_lock lock{ lhs_lock, rhs_lock };

name_ = other.name_;
name_ = other.name_; // NOLINT(cppcoreguidelines-prefer-member-initializer)
data_ = other.data_; // NOLINT(cppcoreguidelines-prefer-member-initializer)
return *this;
}
Expand All @@ -69,7 +69,7 @@ TaskComposerDataStorage::TaskComposerDataStorage(TaskComposerDataStorage&& other
std::unique_lock rhs_lock(other.mutex_, std::defer_lock);
std::scoped_lock lock{ lhs_lock, rhs_lock };

name_ = std::move(other.name_);
name_ = std::move(other.name_); // NOLINT(cppcoreguidelines-prefer-member-initializer)
data_ = std::move(other.data_); // NOLINT(cppcoreguidelines-prefer-member-initializer)
}

Expand All @@ -80,7 +80,7 @@ TaskComposerDataStorage& TaskComposerDataStorage::operator=(TaskComposerDataStor
std::unique_lock rhs_lock(other.mutex_, std::defer_lock);
std::scoped_lock lock{ lhs_lock, rhs_lock };

name_ = std::move(other.name_);
name_ = std::move(other.name_); // NOLINT(cppcoreguidelines-prefer-member-initializer)
data_ = std::move(other.data_); // NOLINT(cppcoreguidelines-prefer-member-initializer)
return *this;
}
Expand Down
6 changes: 4 additions & 2 deletions tesseract_task_composer/core/src/task_composer_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ TaskComposerGraph::dump(std::ostream& os,

std::ostringstream sub_graphs;
const std::string tmp = toString(uuid_);
os << "subgraph cluster_" << tmp << " {\n color=black;\n label = \"" << name_ << "\\nUUID: " << uuid_str_ << "\\n";
os << "subgraph cluster_" << tmp << " {\n color=black;\n nojustify=true label = \"" << name_
<< "\\nUUID: " << uuid_str_ << "\\l";
os << "Inputs:\\l" << input_keys_;
os << "Outputs:\\l" << output_keys_;
os << "Conditional: " << ((conditional_) ? "True" : "False") << "\\l";
Expand All @@ -378,7 +379,8 @@ TaskComposerGraph::dump(std::ostream& os,
const TaskComposerKeys& input_keys = node->getInputKeys();
const TaskComposerKeys& output_keys = node->getOutputKeys();
os << std::endl
<< tmp << " [shape=box3d, label=\"Subgraph: " << node->name_ << "\\nUUID: " << node->uuid_str_ << "\\n";
<< tmp << " [shape=box3d, nojustify=true label=\"Subgraph: " << node->name_ << "\\nUUID: " << node->uuid_str_
<< "\\l";
os << "Inputs:\\l" << input_keys;
os << "Outputs:\\l" << output_keys;
os << "Conditional: " << ((node->isConditional()) ? "True" : "False") << "\\l";
Expand Down
8 changes: 4 additions & 4 deletions tesseract_task_composer/core/src/task_composer_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ TaskComposerNode::dump(std::ostream& os,

if (conditional_)
{
os << std::endl << tmp << " [shape=diamond, label=\"" << name_ << "\\n";
os << "UUID: " << uuid_str_ << "\\n";
os << std::endl << tmp << " [shape=diamond, nojustify=true label=\"" << name_ << "\\n";
os << "UUID: " << uuid_str_ << "\\l";
os << "Namespace: " << ns_ << "\\l";
os << "Inputs:\\l" << input_keys_;
os << "Outputs:\\l" << output_keys_;
Expand All @@ -386,8 +386,8 @@ TaskComposerNode::dump(std::ostream& os,
}
else
{
os << std::endl << tmp << " [label=\"" << name_ << "\\n";
os << "UUID: " << uuid_str_ << "\\n";
os << std::endl << tmp << " [nojustify=true label=\"" << name_ << "\\n";
os << "UUID: " << uuid_str_ << "\\l";
os << "Namespace: " << ns_ << "\\l";
os << "Inputs:\\l" << input_keys_;
os << "Outputs:\\l" << output_keys_;
Expand Down
Loading