sot-core
4.11.8
Hierarchical task solver plug-in for dynamic-graph.
flags.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2010,
3
* François Bleibel,
4
* Olivier Stasse,
5
*
6
* CNRS/AIST
7
*
8
*/
9
10
#ifndef __SOT_FLAGS_H
11
#define __SOT_FLAGS_H
12
13
/* --------------------------------------------------------------------- */
14
/* --- INCLUDE --------------------------------------------------------- */
15
/* --------------------------------------------------------------------- */
16
17
/* STD */
18
#include <ostream>
19
#include <vector>
20
21
/* SOT */
22
#include <dynamic-graph/signal-caster.h>
23
24
#include "
sot/core/api.hh
"
25
26
/* --------------------------------------------------------------------- */
27
/* --- CLASS ----------------------------------------------------------- */
28
/* --------------------------------------------------------------------- */
29
30
namespace
dynamicgraph
{
31
namespace
sot {
32
33
class
SOT_CORE_EXPORT
Flags
{
34
protected
:
35
std::vector<bool>
flags
;
36
bool
outOfRangeFlag
;
37
38
public
:
39
Flags
(
const
bool
&b =
false
);
40
Flags
(
const
char
*flags);
41
Flags
(
const
std::vector<bool> &flags);
42
43
void
add(
const
bool
&b);
44
45
Flags
operator!(
void
)
const
;
46
SOT_CORE_EXPORT
friend
Flags
operator&(
const
Flags
&f1,
const
Flags
&f2);
47
SOT_CORE_EXPORT
friend
Flags
operator|(
const
Flags
&f1,
const
Flags
&f2);
48
Flags
&operator&=(
const
Flags
&f2);
49
Flags
&operator|=(
const
Flags
&f2);
50
51
SOT_CORE_EXPORT
friend
std::ostream &
operator<<
(std::ostream &os,
52
const
Flags
&fl);
53
SOT_CORE_EXPORT
friend
std::istream &
operator>>
(std::istream &is,
Flags
&fl);
54
bool
operator()(
const
int
&i)
const
;
55
56
operator
bool(
void
)
const
;
57
58
void
unset(
const
unsigned
int
&i);
59
void
set(
const
unsigned
int
&i);
60
};
61
62
}
// namespace sot
63
64
template
<>
65
struct
signal_io<sot::Flags> : signal_io_unimplemented<sot::Flags> {};
66
}
// namespace dynamicgraph
67
68
#endif
/* #ifndef __SOT_FLAGS_H */
dynamicgraph::sot::operator<<
SOT_CORE_EXPORT std::ostream & operator<<(std::ostream &os, const VectorMultiBound &v)
SOT_CORE_EXPORT
#define SOT_CORE_EXPORT
Definition:
api.hh:20
dynamicgraph
Definition:
abstract-sot-external-interface.hh:17
dynamicgraph::sot::operator>>
SOT_CORE_EXPORT std::istream & operator>>(std::istream &os, VectorMultiBound &v)
dynamicgraph::sot::Flags::outOfRangeFlag
bool outOfRangeFlag
Definition:
flags.hh:36
api.hh
dynamicgraph::sot::Flags
Definition:
flags.hh:33
dynamicgraph::sot::Flags::flags
std::vector< bool > flags
Definition:
flags.hh:35
include
sot
core
flags.hh
Generated by
1.8.17