Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
change_link_visibility_command.h
Go to the documentation of this file.
1
26#ifndef TESSERACT_ENVIRONMENT_CHANGE_LINK_VISIBILITY_COMMAND_H
27#define TESSERACT_ENVIRONMENT_CHANGE_LINK_VISIBILITY_COMMAND_H
28
31#include <boost/serialization/access.hpp>
32#include <memory>
34
36
38{
40{
41public:
42 using Ptr = std::shared_ptr<ChangeLinkVisibilityCommand>;
43 using ConstPtr = std::shared_ptr<const ChangeLinkVisibilityCommand>;
44
46
52 ChangeLinkVisibilityCommand(std::string link_name, bool enabled)
53 : Command(CommandType::CHANGE_LINK_VISIBILITY), link_name_(std::move(link_name)), enabled_(enabled)
54 {
55 }
56
57 const std::string& getLinkName() const { return link_name_; }
58 bool getEnabled() const { return enabled_; }
59
60 bool operator==(const ChangeLinkVisibilityCommand& rhs) const;
61 bool operator!=(const ChangeLinkVisibilityCommand& rhs) const;
62
63private:
64 std::string link_name_;
65 bool enabled_{ false };
66
68 template <class Archive>
69 void serialize(Archive& ar, const unsigned int version); // NOLINT
70};
71} // namespace tesseract_environment
72
73#include <boost/serialization/export.hpp>
74#include <boost/serialization/tracking.hpp>
75BOOST_CLASS_EXPORT_KEY2(tesseract_environment::ChangeLinkVisibilityCommand, "ChangeLinkVisibilityCommand")
76#endif // TESSERACT_ENVIRONMENT_CHANGE_LINK_VISIBILITY_COMMAND_H
Definition: change_link_visibility_command.h:40
ChangeLinkVisibilityCommand(std::string link_name, bool enabled)
Set a links visibility.
Definition: change_link_visibility_command.h:52
bool getEnabled() const
Definition: change_link_visibility_command.h:58
std::shared_ptr< const ChangeLinkVisibilityCommand > ConstPtr
Definition: change_link_visibility_command.h:43
bool enabled_
Definition: change_link_visibility_command.h:65
std::shared_ptr< ChangeLinkVisibilityCommand > Ptr
Definition: change_link_visibility_command.h:42
void serialize(Archive &ar, const unsigned int version)
Definition: change_link_visibility_command.cpp:50
bool operator==(const ChangeLinkVisibilityCommand &rhs) const
Definition: change_link_visibility_command.cpp:39
ChangeLinkVisibilityCommand()
Definition: change_link_visibility_command.h:45
bool operator!=(const ChangeLinkVisibilityCommand &rhs) const
Definition: change_link_visibility_command.cpp:47
std::string link_name_
Definition: change_link_visibility_command.h:64
friend class boost::serialization::access
Definition: change_link_visibility_command.h:67
const std::string & getLinkName() const
Definition: change_link_visibility_command.h:57
Definition: command.h:76
This contains classes for recording operations applied to the environment for tracking changes....
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: command.h:39
CommandType
Definition: command.h:41