Skip to content

Commit

Permalink
Make dotgraph label nojustify
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Jul 25, 2024
1 parent e9a6a01 commit c57f460
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
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

0 comments on commit c57f460

Please sign in to comment.