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 */
23 
24 #include "sot/core/api.hh"
25 
26 /* --------------------------------------------------------------------- */
27 /* --- CLASS ----------------------------------------------------------- */
28 /* --------------------------------------------------------------------- */
29 
30 namespace dynamicgraph {
31 namespace sot {
32 
34  protected:
35  std::vector<bool> flags;
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 size_type &i) const;
55 
56  operator bool(void) const;
57 
58  void unset(const std::size_t &i);
59  void set(const std::size_t &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 */
operator&=
CollisionRequestFlag & operator&=(CollisionRequestFlag &a, CollisionRequestFlag b)
dynamicgraph::sot::operator>>
SOT_CORE_EXPORT std::istream & operator>>(std::istream &os, VectorMultiBound &v)
Definition: multi-bound.cpp:238
SOT_CORE_EXPORT
#define SOT_CORE_EXPORT
Definition: api.hh:20
dynamicgraph
operator|=
CollisionRequestFlag & operator|=(CollisionRequestFlag &a, CollisionRequestFlag b)
b
Vec3f b
dynamicgraph::sot::operator|
Flags operator|(const Flags &f1, const Flags &f2)
Definition: flags.cpp:97
dynamicgraph::sot::Flags::outOfRangeFlag
bool outOfRangeFlag
Definition: flags.hh:36
api.hh
set
void set(bool ownStorage, Vec3f *points_, unsigned int num_points_)
dynamicgraph::signal_io
dynamicgraph::size_type
Matrix::Index size_type
signal-caster.h
dynamicgraph::sot::operator<<
SOT_CORE_EXPORT std::ostream & operator<<(std::ostream &os, const VectorMultiBound &v)
Definition: multi-bound.cpp:228
dynamicgraph::signal_io_unimplemented
dynamicgraph::sot::Flags
Definition: flags.hh:33
dynamicgraph::sot::Flags::flags
std::vector< bool > flags
Definition: flags.hh:35
dynamicgraph::sot::operator&
Flags operator&(const Flags &f1, const Flags &f2)
Definition: flags.cpp:91


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31