src
commands
change_link_visibility_command.cpp
Go to the documentation of this file.
1
26
#include <
tesseract_common/macros.h
>
27
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
28
#include <boost/serialization/access.hpp>
29
#include <boost/serialization/nvp.hpp>
30
#include <string>
31
TESSERACT_COMMON_IGNORE_WARNINGS_POP
32
33
#include <
tesseract_common/utils.h
>
34
#include <
tesseract_environment/commands/change_link_visibility_command.h
>
35
36
namespace
tesseract_environment
37
{
38
ChangeLinkVisibilityCommand::ChangeLinkVisibilityCommand
() :
Command
(
CommandType
::
CHANGE_LINK_VISIBILITY
) {}
39
40
ChangeLinkVisibilityCommand::ChangeLinkVisibilityCommand
(std::string link_name,
bool
enabled)
41
:
Command
(
CommandType
::
CHANGE_LINK_VISIBILITY
), link_name_(std::move(link_name)), enabled_(enabled)
42
{
43
}
44
45
const
std::string&
ChangeLinkVisibilityCommand::getLinkName
()
const
{
return
link_name_
; }
46
bool
ChangeLinkVisibilityCommand::getEnabled
()
const
{
return
enabled_
; }
47
48
bool
ChangeLinkVisibilityCommand::operator==
(
const
ChangeLinkVisibilityCommand
& rhs)
const
49
{
50
bool
equal =
true
;
51
equal &=
Command::operator==
(rhs);
52
equal &=
link_name_
== rhs.
link_name_
;
53
equal &=
enabled_
== rhs.
enabled_
;
54
return
equal;
55
}
56
bool
ChangeLinkVisibilityCommand::operator!=
(
const
ChangeLinkVisibilityCommand
& rhs)
const
{
return
!
operator==
(rhs); }
57
58
template
<
class
Archive>
59
void
ChangeLinkVisibilityCommand::serialize
(Archive& ar,
const
unsigned
int
/*version*/
)
60
{
61
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Command
);
62
ar& BOOST_SERIALIZATION_NVP(
link_name_
);
63
ar& BOOST_SERIALIZATION_NVP(
enabled_
);
64
}
65
}
// namespace tesseract_environment
66
67
#include <
tesseract_common/serialization.h
>
68
TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE
(
tesseract_environment::ChangeLinkVisibilityCommand
)
69
BOOST_CLASS_EXPORT_IMPLEMENT(
tesseract_environment::ChangeLinkVisibilityCommand
)
tesseract_environment::Command::operator==
bool operator==(const Command &rhs) const
Definition:
command.cpp:60
tesseract_environment
Definition:
command.h:45
tesseract_environment::ChangeLinkVisibilityCommand::ChangeLinkVisibilityCommand
ChangeLinkVisibilityCommand()
Definition:
change_link_visibility_command.cpp:38
tesseract_environment::Command
Definition:
command.h:83
utils.h
tesseract_environment::ChangeLinkVisibilityCommand::operator!=
bool operator!=(const ChangeLinkVisibilityCommand &rhs) const
Definition:
change_link_visibility_command.cpp:56
TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE
#define TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE(Type)
tesseract_environment::ChangeLinkVisibilityCommand::getEnabled
bool getEnabled() const
Definition:
change_link_visibility_command.cpp:46
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
change_link_visibility_command.h
Used to change a links visibility in environment.
tesseract_environment::ChangeLinkVisibilityCommand::enabled_
bool enabled_
Definition:
change_link_visibility_command.h:68
tesseract_environment::ChangeLinkVisibilityCommand::operator==
bool operator==(const ChangeLinkVisibilityCommand &rhs) const
Definition:
change_link_visibility_command.cpp:48
serialization.h
TESSERACT_COMMON_IGNORE_WARNINGS_POP
tesseract_environment::CommandType::CHANGE_LINK_VISIBILITY
@ CHANGE_LINK_VISIBILITY
tesseract_environment::ChangeLinkVisibilityCommand::serialize
void serialize(Archive &ar, const unsigned int version)
Definition:
change_link_visibility_command.cpp:59
tesseract_environment::ChangeLinkVisibilityCommand::getLinkName
const std::string & getLinkName() const
Definition:
change_link_visibility_command.cpp:45
macros.h
tesseract_environment::CommandType
CommandType
Definition:
command.h:47
tesseract_environment::ChangeLinkVisibilityCommand
Definition:
change_link_visibility_command.h:45
tesseract_environment::ChangeLinkVisibilityCommand::link_name_
std::string link_name_
Definition:
change_link_visibility_command.h:67
tesseract_environment
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:02:21