src
commands
change_link_collision_enabled_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
#if (BOOST_VERSION >= 107400) && (BOOST_VERSION < 107500)
31
#include <boost/serialization/library_version_type.hpp>
32
#endif
33
#include <boost/serialization/unordered_map.hpp>
34
#include <string>
35
TESSERACT_COMMON_IGNORE_WARNINGS_POP
36
37
#include <
tesseract_common/utils.h
>
38
#include <
tesseract_environment/commands/change_link_collision_enabled_command.h
>
39
40
namespace
tesseract_environment
41
{
42
ChangeLinkCollisionEnabledCommand::ChangeLinkCollisionEnabledCommand
()
43
:
Command
(
CommandType
::
CHANGE_LINK_COLLISION_ENABLED
)
44
{
45
}
46
47
ChangeLinkCollisionEnabledCommand::ChangeLinkCollisionEnabledCommand
(std::string link_name,
bool
enabled)
48
:
Command
(
CommandType
::
CHANGE_LINK_COLLISION_ENABLED
), link_name_(std::move(link_name)), enabled_(enabled)
49
{
50
}
51
52
const
std::string&
ChangeLinkCollisionEnabledCommand::getLinkName
()
const
{
return
link_name_
; }
53
bool
ChangeLinkCollisionEnabledCommand::getEnabled
()
const
{
return
enabled_
; }
54
55
bool
ChangeLinkCollisionEnabledCommand::operator==
(
const
ChangeLinkCollisionEnabledCommand
& rhs)
const
56
{
57
bool
equal =
true
;
58
equal &=
Command::operator==
(rhs);
59
equal &=
link_name_
== rhs.
link_name_
;
60
equal &=
enabled_
== rhs.
enabled_
;
61
return
equal;
62
}
63
bool
ChangeLinkCollisionEnabledCommand::operator!=
(
const
ChangeLinkCollisionEnabledCommand
& rhs)
const
64
{
65
return
!
operator==
(rhs);
66
}
67
68
template
<
class
Archive>
69
void
ChangeLinkCollisionEnabledCommand::serialize
(Archive& ar,
const
unsigned
int
/*version*/
)
70
{
71
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Command
);
72
ar& BOOST_SERIALIZATION_NVP(
link_name_
);
73
ar& BOOST_SERIALIZATION_NVP(
enabled_
);
74
}
75
}
// namespace tesseract_environment
76
77
#include <
tesseract_common/serialization.h
>
78
TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE
(
tesseract_environment::ChangeLinkCollisionEnabledCommand
)
79
BOOST_CLASS_EXPORT_IMPLEMENT(
tesseract_environment::ChangeLinkCollisionEnabledCommand
)
tesseract_environment::Command::operator==
bool operator==(const Command &rhs) const
Definition:
command.cpp:60
tesseract_environment
Definition:
command.h:45
tesseract_environment::ChangeLinkCollisionEnabledCommand::getEnabled
bool getEnabled() const
Definition:
change_link_collision_enabled_command.cpp:53
tesseract_environment::ChangeLinkCollisionEnabledCommand
Definition:
change_link_collision_enabled_command.h:45
tesseract_environment::Command
Definition:
command.h:83
utils.h
tesseract_environment::ChangeLinkCollisionEnabledCommand::serialize
void serialize(Archive &ar, const unsigned int version)
Definition:
change_link_collision_enabled_command.cpp:69
TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE
#define TESSERACT_SERIALIZE_ARCHIVES_INSTANTIATE(Type)
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_environment::ChangeLinkCollisionEnabledCommand::ChangeLinkCollisionEnabledCommand
ChangeLinkCollisionEnabledCommand()
Definition:
change_link_collision_enabled_command.cpp:42
change_link_collision_enabled_command.h
Used to change a links collision enabled in environment.
serialization.h
tesseract_environment::ChangeLinkCollisionEnabledCommand::enabled_
bool enabled_
Definition:
change_link_collision_enabled_command.h:68
TESSERACT_COMMON_IGNORE_WARNINGS_POP
tesseract_environment::ChangeLinkCollisionEnabledCommand::operator!=
bool operator!=(const ChangeLinkCollisionEnabledCommand &rhs) const
Definition:
change_link_collision_enabled_command.cpp:63
tesseract_environment::CommandType::CHANGE_LINK_COLLISION_ENABLED
@ CHANGE_LINK_COLLISION_ENABLED
tesseract_environment::ChangeLinkCollisionEnabledCommand::getLinkName
const std::string & getLinkName() const
Definition:
change_link_collision_enabled_command.cpp:52
tesseract_environment::ChangeLinkCollisionEnabledCommand::link_name_
std::string link_name_
Definition:
change_link_collision_enabled_command.h:67
tesseract_environment::ChangeLinkCollisionEnabledCommand::operator==
bool operator==(const ChangeLinkCollisionEnabledCommand &rhs) const
Definition:
change_link_collision_enabled_command.cpp:55
macros.h
tesseract_environment::CommandType
CommandType
Definition:
command.h:47
tesseract_environment
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:02:21