@@ -31,59 +31,37 @@ namespace sot {
31
31
32
32
class SOT_CORE_EXPORT Flags {
33
33
protected:
34
- std::vector<char > flags;
35
- bool reverse;
36
-
37
- char operator [](const unsigned int &i) const ;
34
+ std::vector<bool > flags;
35
+ bool outOfRangeFlag;
38
36
39
37
public:
40
38
Flags (const bool &b = false );
41
- Flags (const char &c );
42
- Flags (const int &c4 );
39
+ Flags (const char *flags );
40
+ Flags (std::vector< bool > &&flags );
43
41
44
- void add (const char &c);
45
- void add (const int &c4);
42
+ void add (const bool &b);
46
43
47
44
Flags operator !(void ) const ;
48
45
SOT_CORE_EXPORT friend Flags operator &(const Flags &f1, const Flags &f2);
49
46
SOT_CORE_EXPORT friend Flags operator |(const Flags &f1, const Flags &f2);
50
47
Flags &operator &=(const Flags &f2);
51
48
Flags &operator |=(const Flags &f2);
52
49
53
- SOT_CORE_EXPORT friend Flags operator &(const Flags &f1, const bool &b);
54
- SOT_CORE_EXPORT friend Flags operator |(const Flags &f1, const bool &b);
55
- Flags &operator &=(const bool &b);
56
- Flags &operator |=(const bool &b);
57
-
58
50
SOT_CORE_EXPORT friend std::ostream &operator <<(std::ostream &os,
59
51
const Flags &fl);
60
- SOT_CORE_EXPORT friend char operator >>(const Flags &flags, const int &i);
61
52
SOT_CORE_EXPORT friend std::istream &operator >>(std::istream &is, Flags &fl);
62
53
bool operator ()(const int &i) const ;
63
54
64
55
operator bool (void ) const ;
65
56
66
57
void unset (const unsigned int &i);
67
58
void set (const unsigned int &i);
68
-
69
- public: /* Selec "matlab-style" : 1:15, 1:, :45 ... */
70
- static void readIndexMatlab (std::istream &iss, unsigned int &indexStart,
71
- unsigned int &indexEnd, bool &unspecifiedEnd);
72
- static Flags readIndexMatlab (std::istream &iss);
73
59
};
74
60
75
- SOT_CORE_EXPORT extern const Flags FLAG_LINE_1;
76
- SOT_CORE_EXPORT extern const Flags FLAG_LINE_2;
77
- SOT_CORE_EXPORT extern const Flags FLAG_LINE_3;
78
- SOT_CORE_EXPORT extern const Flags FLAG_LINE_4;
79
- SOT_CORE_EXPORT extern const Flags FLAG_LINE_5;
80
- SOT_CORE_EXPORT extern const Flags FLAG_LINE_6;
81
- SOT_CORE_EXPORT extern const Flags FLAG_LINE_7;
82
- SOT_CORE_EXPORT extern const Flags FLAG_LINE_8;
83
-
84
61
} // namespace sot
85
62
86
- template <> struct signal_io <sot::Flags> : signal_io_unimplemented<sot::Flags> {};
63
+ template <>
64
+ struct signal_io <sot::Flags> : signal_io_unimplemented<sot::Flags> {};
87
65
} // namespace dynamicgraph
88
66
89
67
#endif /* #ifndef __SOT_FLAGS_H */
0 commit comments