+++ /dev/null
-// Roast+ License
-
-/*
-*/
-#ifndef __SFJP_ROAST__adapter__add_sub_HPP__
-#define __SFJP_ROAST__adapter__add_sub_HPP__
-
-#include "roast/adapter/operator/arith/inc_decl.hpp"
-
-namespace roast
-{
- namespace adapter
- {
- namespace op
- {
- /////////////////////////////////////////////////////////////////////////
-
- template <typename _Base, typename _ValueType, typename _FacadeType>
- class add_sub : public inc_decl<_Base, _ValueType, _FacadeType>
- {
- private:
- _ValueType& m_value;
- public:
- add_sub(_ValueType& value) : m_value(value), inc_decl<_Base, _ValueType, _FacadeType>(value) {}
-
- _FacadeType& operator +=(int n){ m_value+=n; return _facade_ref(); }
- _FacadeType& operator -=(int n){ m_value-=n; return _facade_ref(); }
- _FacadeType operator +(int n){ _Facade work=_facade_ref(); work+=n; return work; }
- _FacadeType operator -(int n){ _Facade work=_facade_ref(); work-=n; return work; }
- };
- }
- }
-}
-
-#endif//__SFJP_ROAST__adapter__add_sub_HPP__
--- /dev/null
+// Roast+ License
+
+/*
+*/
+#ifndef __SFJP_ROAST__adapter__operator__bit__bitwise_HPP__
+#define __SFJP_ROAST__adapter__operator__bit__bitwise_HPP__
+
+#include "roast/adapter/operator/bit/and.hpp"
+#include "roast/adapter/operator/bit/or.hpp"
+#include "roast/adapter/operator/bit/xor.hpp"
+#include "roast/adapter/operator/bit/not.hpp"
+
+#include "roast/adapter/operator/bit/lshift.hpp"
+#include "roast/adapter/operator/bit/rshift.hpp"
+
+namespace roast
+{
+ namespace adapter
+ {
+ /////////////////////////////////////////////////////////////////////////
+
+ // Bit AND, OR, XOR, NOT
+ template <typename _Facade, typename _ValueType>
+ class bit_logical_adapter :
+ public bit_and_adapter<_Facade, _ValueType>,
+ public bit_or_adapter<_Facade, _ValueType>,
+ public bit_xor_adapter<_Facade, _ValueType>,
+ public bit_not_adapter<_ValueType>
+ {};
+
+ /////////////
+
+ template <typename _Facade, typename _ValueType>
+ class value_bit_logical_adapter :
+ public value_bit_and_adapter<_Facade, _ValueType>,
+ public value_bit_or_adapter<_Facade, _ValueType>,
+ public value_bit_xor_adapter<_Facade, _ValueType>,
+ public value_bit_not_adapter<_Facade, _ValueType>
+ {
+ public:
+ value_bit_logical_adapter(_ValueType& value_ref) :
+ value_bit_and_adapter<_Facade, _ValueType>(value_ref),
+ value_bit_or_adapter<_Facade, _ValueType>(value_ref),
+ value_bit_xor_adapter<_Facade, _ValueType>(value_ref),
+ value_bit_not_adapter<_Facade, _ValueType>(value_ref)
+ {}
+ };
+
+ /////////////////////////////////////////////////////////////////////////
+
+ // Bit Shift
+ template <typename _Facade, typename _ValueType>
+ class bit_shift_adapter :
+ public lshift_adapter<_Facade, _ValueType>,
+ public rshift_adapter<_Facade, _ValueType>
+ {};
+
+ ///////////////////////////////////////////////
+
+ template <typename _Facade, typename _ValueType>
+ class value_bit_shift_adapter :
+ public value_lshift_adapter<_Facade, _ValueType>,
+ public value_rshift_adapter<_Facade, _ValueType>
+ {
+ public:
+ value_bit_shift_adapter(_ValueType& value_ref) :
+ value_lshift_adapter<_Facade, _ValueType>(value_ref),
+ value_rshift_adapter<_Facade, _ValueType>(value_ref)
+ {}
+ };
+
+ /////////////////////////////////////////////////////////////////////////
+
+ // Full Bit Operators
+ template <typename _Facade, typename _ValueType>
+ class full_bitwise_adapter :
+ public bit_logical_adapter<_Facade, _ValueType>,
+ public bit_shift_adapter<_Facade, _ValueType>
+ {};
+
+ ///////////////////////////////////////////////
+
+ template <typename _Facade, typename _ValueType>
+ class value_full_bitwise_adapter :
+ public value_bit_logical_adapter<_Facade, _ValueType>,
+ public value_bit_shift_adapter<_Facade, _ValueType>
+ {
+ public:
+ value_full_bitwise_adapter(_ValueType& value_ref) :
+ value_bit_logical_adapter<_Facade, _ValueType>(value_ref),
+ value_bit_shift_adapter<_Facade, _ValueType>(value_ref)
+ {}
+ };
+
+ /////////////////////////////////////////////////////////////////////////
+ }
+ using namespace adapter;
+}
+
+#endif//__SFJP_ROAST__adapter__operator__bit__bitwise_HPP__