Home | History | Annotate | Download | only in HidUtils

Lines Matching defs:TriState

24 class TriState {
27 TriState() : mIsSet(false) { }
28 TriState(const TriState<T> &other) : mIsSet(other.mIsSet), mValue(other.mValue) { }
29 explicit TriState(const T &value) : mIsSet(true), mValue(value) { }
49 TriState<T>& operator=(const TriState<T> &other) {
55 TriState<T>& operator=(const T& value) {
61 TriState<T>& operator++() {
68 TriState<T> operator++(int) {
69 TriState<T> tmp(*this);
74 TriState<T>& operator--() {
81 TriState<T> operator--(int) {
82 TriState<T> tmp(*this);
88 TriState<T> operator op() { \
89 TriState<T> tmp(*this); \
102 TriState<T>& operator op (const TriState<T>& rhs) { \
110 TriState<T>& operator op(const T& rhs) { \
127 TriState<T>& operator >>=(int i) {
134 TriState<T>& operator <<=(int i) {
141 TriState<T> operator <<(int i) { \
142 TriState<T> tmp(*this);
147 TriState<T> operator >>(int i) { \
148 TriState<T> tmp(*this);
154 friend TriState<T> operator op(TriState<T> lhs, const TriState<T>& rhs) { \
158 friend TriState<T> operator op(TriState<T> lhs, const T& rhs) { \
162 friend TriState<T> operator op(const T &lhs, const TriState<T>& rhs) { \
163 TriState<T> tmp(lhs); \
178 friend TriState<bool> operator op(const TriState<T>& lhs, const TriState<T>& rhs) { \
180 return TriState<bool>(lhs.mValue op rhs.mValue); \
182 return TriState<bool>(); \
185 friend TriState<bool> operator op(const TriState<T>& lhs, const T& rhs) { \
187 return TriState<bool>(lhs.mValue op rhs); \
189 return TriState<bool>(); \
192 friend TriState<bool> operator op(const T& lhs, const TriState<T>& rhs) { \
194 return TriState<bool>(lhs op rhs.mValue); \
196 return TriState<bool>(); \
208 friend TriState<bool> operator &&(TriState<T>& lhs, const TriState<T>& rhs) {
210 return TriState<bool>(lhs.mValue && rhs.mValue);
212 return TriState<bool>();
216 friend TriState<bool> operator ||(TriState<T>& lhs, const TriState<T>& rhs) {
218 return TriState<bool>(lhs.mValue || rhs.mValue);
220 return TriState<bool>();
224 friend std::ostream& operator <<(std::ostream &os, const TriState<T> &v) {
233 friend std::istream& operator >>(std::istream &is, const TriState<T> &v) {
236 v = TriState<T>(a);
245 typedef TriState<unsigned> tri_uint;
246 typedef TriState<int> tri_int;
248 typedef TriState<uint32_t> tri_uint32_t;
249 typedef TriState<int32_t> tri_int32_t;
250 typedef TriState<uint8_t> tri_uint8_t;
251 typedef TriState<uint16_t> tri_uint16_t;