Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
e
f
g
h
i
j
l
m
n
q
s
u
v
Functions
b
c
e
f
g
h
i
l
n
q
s
u
v
Variables
Typedefs
Enumerations
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Related Functions
Files
File List
File Members
All
c
f
g
h
i
m
Functions
h
Variables
Typedefs
g
h
Enumerations
h
Enumerator
h
Macros
include
hebi_cpp_api
util.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
5
// clang-format off
6
#define HEBI_DISABLE_COPY_MOVE(Class) \
7
/* Disable copy constructor. */
\
8
Class(const Class& other) = delete; \
9
/* Disable move constructor. */
\
10
Class(Class&& other) = delete; \
11
/* Disable copy assigment operator. */
\
12
Class& operator= (const Class& other) = delete; \
13
/* Disable move assigment operator. */
\
14
Class& operator= (Class&& other) = delete;
15
16
#define HEBI_DISABLE_COPY(Class) \
17
/* Disable copy constructor. */
\
18
Class(const Class& other) = delete; \
19
/* Disable copy assigment operator. */
\
20
Class& operator= (const Class& other) = delete;
21
// clang-format on
22
23
namespace
hebi
{
24
28
class
FunctionCallResult
{
29
public
:
30
explicit
FunctionCallResult
(
bool
success
) :
ok_
(
success
),
failure_message_
(
""
) {}
31
FunctionCallResult
(
bool
success
,
const
std::string& failure) :
ok_
(
success
),
failure_message_
(failure) {}
32
FunctionCallResult
(
FunctionCallResult
&&) =
default
;
33
FunctionCallResult
&
operator=
(
FunctionCallResult
&&) =
default
;
34
35
operator
bool()
const
{
return
ok_
; }
36
bool
success
()
const
{
return
ok_
; }
37
43
const
std::string&
failureMessage
()
const
{
return
failure_message_
; }
44
private
:
45
bool
ok_
;
46
std::string
failure_message_
;
47
};
48
49
}
hebi::FunctionCallResult::FunctionCallResult
FunctionCallResult(bool success)
Definition:
util.hpp:30
hebi::FunctionCallResult
Used as a return.
Definition:
util.hpp:28
hebi::FunctionCallResult::success
bool success() const
Definition:
util.hpp:36
hebi
Definition:
arm.cpp:5
hebi::FunctionCallResult::ok_
bool ok_
Definition:
util.hpp:45
hebi::FunctionCallResult::operator=
FunctionCallResult & operator=(FunctionCallResult &&)=default
hebi::FunctionCallResult::FunctionCallResult
FunctionCallResult(bool success, const std::string &failure)
Definition:
util.hpp:31
hebi::FunctionCallResult::failureMessage
const std::string & failureMessage() const
Definition:
util.hpp:43
hebi::FunctionCallResult::failure_message_
std::string failure_message_
Definition:
util.hpp:46
hebi_cpp_api_ros
Author(s): Chris Bollinger
, Matthew Tesch
autogenerated on Fri Aug 2 2024 08:35:18