sot-core
4.11.6
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 "
sot/core/api.hh
"
23
#include <dynamic-graph/signal-caster.h>
24
25
/* --------------------------------------------------------------------- */
26
/* --- CLASS ----------------------------------------------------------- */
27
/* --------------------------------------------------------------------- */
28
29
namespace
dynamicgraph
{
30
namespace
sot {
31
32
class
SOT_CORE_EXPORT
Flags
{
33
protected
:
34
std::vector<bool>
flags
;
35
bool
outOfRangeFlag
;
36
37
public
:
38
Flags
(
const
bool
&b =
false
);
39
Flags
(
const
char
*flags);
40
Flags
(
const
std::vector<bool> &flags);
41
42
void
add(
const
bool
&b);
43
44
Flags
operator!(
void
)
const
;
45
SOT_CORE_EXPORT
friend
Flags
operator&(
const
Flags
&f1,
const
Flags
&f2);
46
SOT_CORE_EXPORT
friend
Flags
operator|(
const
Flags
&f1,
const
Flags
&f2);
47
Flags
&operator&=(
const
Flags
&f2);
48
Flags
&operator|=(
const
Flags
&f2);
49
50
SOT_CORE_EXPORT
friend
std::ostream &
operator<<
(std::ostream &os,
51
const
Flags
&fl);
52
SOT_CORE_EXPORT
friend
std::istream &
operator>>
(std::istream &is,
Flags
&fl);
53
bool
operator()(
const
int
&i)
const
;
54
55
operator
bool(
void
)
const
;
56
57
void
unset(
const
unsigned
int
&i);
58
void
set(
const
unsigned
int
&i);
59
};
60
61
}
// namespace sot
62
63
template
<>
64
struct
signal_io<sot::Flags> : signal_io_unimplemented<sot::Flags> {};
65
}
// namespace dynamicgraph
66
67
#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:35
api.hh
dynamicgraph::sot::Flags
Definition:
flags.hh:32
dynamicgraph::sot::Flags::flags
std::vector< bool > flags
Definition:
flags.hh:34
include
sot
core
flags.hh
Generated by
1.8.17