23 #include "ocilibcpp/core.hpp"
32 Flags<T>::Flags() : _flags(static_cast<T>(0))
37 Flags<T>::Flags(T flag) : _flags(flag)
42 Flags<T>::Flags(
const Flags& other) : _flags(other._flags)
47 Flags<T>::Flags(
unsigned int flag) : _flags(static_cast<T>(flag))
52 Flags<T>& Flags<T>::operator = (
const Flags<T>& other) noexcept
56 _flags = other._flags;
63 Flags<T> Flags<T>::operator~ ()
const
65 return Flags<T>(~_flags);
69 Flags<T> Flags<T>::operator | (
const Flags& other)
const
71 return Flags<T>(_flags | other._flags);
75 Flags<T> Flags<T>::operator & (
const Flags& other)
const
77 return Flags<T>(_flags & other._flags);
81 Flags<T> Flags<T>::operator ^ (
const Flags& other)
const
83 return Flags<T>(_flags ^ other._flags);
87 Flags<T> Flags<T>::operator | (T other)
const
89 return Flags<T>(_flags | other);
93 Flags<T> Flags<T>::operator & (T other)
const
95 return Flags<T>(_flags & other);
99 Flags<T> Flags<T>::operator ^ (T other)
const
101 return Flags<T>(_flags ^ other);
105 Flags<T>& Flags<T>::operator |= (
const Flags<T>& other)
107 _flags |= other._flags;
112 Flags<T>& Flags<T>::operator &= (
const Flags<T>& other)
114 _flags &= other._flags;
119 Flags<T>& Flags<T>::operator ^= (
const Flags<T>& other)
121 _flags ^= other._flags;
126 Flags<T>& Flags<T>::operator |= (T other)
133 Flags<T>& Flags<T>::operator &= (T other)
140 Flags<T>& Flags<T>::operator ^= (T other)
147 bool Flags<T>::operator == (T other)
const
149 return _flags ==
static_cast<unsigned int>(other);
153 bool Flags<T>::operator == (
const Flags& other)
const
155 return _flags == other._flags;
159 bool Flags<T>::IsSet(T other)
const
161 return ((_flags & other) == _flags);
165 unsigned int Flags<T>::GetValues()
const