OSDN Git Service

roast/arith Delete.
authormyun2 <myun2@nwhite.info>
Tue, 26 Jun 2012 08:18:30 +0000 (17:18 +0900)
committermyun2 <myun2@nwhite.info>
Tue, 26 Jun 2012 08:18:30 +0000 (17:18 +0900)
roast/include/roast/arith/arith.hpp [deleted file]
roast/include/roast/arith/constvalue_expression.hpp [deleted file]
roast/include/roast/arith/expression.hpp [deleted file]
roast/include/roast/arith/int_const_value.hpp [deleted file]
roast/include/roast/arith/ope/binary_operation.hpp [deleted file]
roast/include/roast/arith/ope/operations.hpp [deleted file]
roast/include/roast/arith/ope/unary_operation.hpp [deleted file]

diff --git a/roast/include/roast/arith/arith.hpp b/roast/include/roast/arith/arith.hpp
deleted file mode 100644 (file)
index 4a5d854..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-//     Roast+ License
-
-/*
-       
-*/
-#ifndef __SFJP_ROAST__arith__arith_HPP__
-#define __SFJP_ROAST__arith__arith_HPP__
-
-#include "roast/_common.hpp"
-
-#define _ROAST_ARITH_NS_START          _ROAST_NS_START namespace arith {
-#define _ROAST_ARITH_NS_END                    _ROAST_NS_END   }
-
-#define _ROAST_ARITH_METHOD_NAME       operator()
-
-#include "roast/arith/expression.hpp"
-#include "roast/arith/ope/operations.hpp"
-
-
-#endif//__SFJP_ROAST__arith__arith_HPP__
diff --git a/roast/include/roast/arith/constvalue_expression.hpp b/roast/include/roast/arith/constvalue_expression.hpp
deleted file mode 100644 (file)
index 5dfef8a..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-//     Roast+ License
-
-/*
-       
-*/
-#ifndef __SFJP_ROAST__arith__constvalue_expression_HPP__
-#define __SFJP_ROAST__arith__constvalue_expression_HPP__
-
-_ROAST_ARITH_NS_START
-
-
-///////////////////////////////////////////////
-
-//     Const(Value1) Binary Expression
-template <typename OPE, typename CONST_VALUE_T>
-class constv1_binary_expression
-{
-public:
-       template <typename RET, typename T>
-       RET calc(const T &var2){
-               OPE o;
-               return o.calc<RET>((T)CONST_VALUE_T(),var2);
-       }
-};
-template <typename OPE, typename CONST_VALUE_T>
-class c1be : public constv1_binary_expression<OPE, CONST_VALUE_T> {};
-
-
-///////////////////////////////////////////////
-
-//     Const(Value2) Binary Expression
-template <typename OPE, typename CONST_VALUE_T>
-class constv2_binary_expression
-{
-public:
-       template <typename RET, typename T>
-       RET calc(const T &var2){
-               OPE o;
-               return o.calc(var2, (T)CONST_VALUE_T());
-       }
-};
-template <typename OPE, typename CONST_VALUE_T>
-class c2be : public constv2_binary_expression<OPE, CONST_VALUE_T> {};
-
-
-///////////////////////////////////////////////
-
-
-template <typename OPE, typename CONST_VALUE_T>
-class cibe : public c2be<OPE, CONST_VALUE_T> {};
-template <typename OPE, typename CONST_VALUE_T>
-class cbe : public c2be<OPE, CONST_VALUE_T> {};
-
-
-/*******************************************************/
-
-_ROAST_ARITH_NS_END
-
-#include "roast/arith/int_const_value.hpp"
-
-_ROAST_ARITH_NS_START
-
-/*******************************************************/
-
-#ifdef _ROAST_VALID_TEMPLATE_GTGT
-template <typename OPE, int CONSTV1>
-class constv1_binary_expression_int : public constv1_binary_expression<OPE, int_const_value<CONSTV1> > {};
-template <typename OPE, int CONSTV2>
-class constv2_binary_expression_int : public constv2_binary_expression<OPE, int_const_value<CONSTV2> > {};
-
-template <typename OPE, int CONSTV1>
-class c1bei : public constv1_binary_expression_int<OPE, CONSTV1> {};
-template <typename OPE, int CONSTV2>
-class c2bei : public constv2_binary_expression_int<OPE, CONSTV2> {};
-
-#else
-_ROAST_ARITH_NS_END
-
-#include "roast/arith/constvalue_expression_int_OLDCP.hpp"
-
-_ROAST_ARITH_NS_START
-#endif
-///////////////////////////////////////////////
-
-
-_ROAST_ARITH_NS_END
-
-#endif//__SFJP_ROAST__arith__constvalue_expression_HPP__
diff --git a/roast/include/roast/arith/expression.hpp b/roast/include/roast/arith/expression.hpp
deleted file mode 100644 (file)
index 549f56f..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-//     Roast+ License
-
-/*
-       
-*/
-#ifndef __SFJP_ROAST__arith__expression_HPP__
-#define __SFJP_ROAST__arith__expression_HPP__
-
-
-_ROAST_ARITH_NS_START
-
-
-///////////////////////////////////////////////
-
-//     Binary Expression
-template <typename OPE>
-class binary_expression
-{
-public:
-       template <typename T1, typename T2>
-       T1 operator()(const T1 &var1, const T2 &var2){
-               OPE o;
-               return o(var1,var2);
-       }
-};
-template <typename OPE>
-class be : public binary_expression<OPE> {};
-
-
-template <typename OPE, typename T1, typename T2>
-T1 calc_binary(const T1 &var1, const T2 &var2){
-       OPE o;
-       return o(var1,var2);
-}
-
-template <typename OPE, typename T1, typename T2>
-T1 calc_be(const T1 &var1, const T2 &var2){
-       OPE o;
-       return o(var1,var2);
-}
-
-
-///////////////////////////////////////////////
-
-//     Poly-expression
-template <typename OPE1, typename OPE2>
-class poly_expression
-{
-
-};
-template <typename OPE1, typename OPE2>
-class pe : public poly_expression<OPE1,OPE2> {};
-
-
-///////////////////////////////////////////////
-
-
-
-//**********************************************************//
-
-
-class is_zero
-{
-public:
-       template <typename T>
-       bool operator ()(const T& t) const
-       {
-               return t == 0;
-       }
-};
-
-class is_not_zero
-{
-public:
-       template <typename T>
-       bool operator ()(const T& t) const
-       {
-               return t != 0;
-       }
-};
-
-//**********************************************************//
-
-
-_ROAST_ARITH_NS_END
-
-#include "roast/arith/constvalue_expression.hpp"
-
-
-#endif//__SFJP_ROAST__arith__expression_HPP__
diff --git a/roast/include/roast/arith/int_const_value.hpp b/roast/include/roast/arith/int_const_value.hpp
deleted file mode 100644 (file)
index 2954f56..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-//     Roast+ License
-
-/*
-       
-*/
-#ifndef __SFJP_ROAST__arith__int_const_value_HPP__
-#define __SFJP_ROAST__arith__int_const_value_HPP__
-
-
-namespace roast
-{
-       ////////////////////////////
-
-       template <int CONSTV>
-       class int_const_value
-       {
-       public:
-               int_const_value(){}
-               operator int ()
-               {
-                       return CONSTV;
-               }
-       };
-
-       template <unsigned int CONSTV>
-       class uint_const_value
-       {
-       public:
-               uint_const_value(){}
-               operator unsigned int ()
-               {
-                       return CONSTV;
-               }
-       };
-
-       ////////////////////////////
-
-       template <long CONSTV>
-       class long_const_value
-       {
-       public:
-               long_const_value(){}
-               operator long ()
-               {
-                       return CONSTV;
-               }
-       };
-
-       template <unsigned long CONSTV>
-       class ulong_const_value
-       {
-       public:
-               ulong_const_value(){}
-               operator unsigned long ()
-               {
-                       return CONSTV;
-               }
-       };
-
-       ////////////////////////////
-
-       template <char CONSTV>
-       class char_const_value
-       {
-       public:
-               char_const_value(){}
-               operator char ()
-               {
-                       return CONSTV;
-               }
-       };
-
-       template <unsigned char CONSTV>
-       class uchar_const_value
-       {
-       public:
-               uchar_const_value(){}
-               operator unsigned char ()
-               {
-                       return CONSTV;
-               }
-       };
-
-       ////////////////////////////
-
-       template <short CONSTV>
-       class short_const_value
-       {
-       public:
-               short_const_value(){}
-               operator short ()
-               {
-                       return CONSTV;
-               }
-       };
-
-       template <unsigned int CONSTV>
-       class ushort_const_value
-       {
-       public:
-               ushort_const_value(){}
-               operator unsigned short ()
-               {
-                       return CONSTV;
-               }
-       };
-       
-}//end of namespace roast
-
-#endif//__SFJP_ROAST__arith__int_const_value_HPP__
diff --git a/roast/include/roast/arith/ope/binary_operation.hpp b/roast/include/roast/arith/ope/binary_operation.hpp
deleted file mode 100644 (file)
index d1c9362..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-//     Roast+ License
-
-#ifndef __SFJP_ROAST__arith__binary_operation_HPP__
-#define __SFJP_ROAST__arith__binary_operation_HPP__
-
-
-_ROAST_ARITH_OPE_NS_START
-
-
-///////////////////////////////////////////////
-
-class add
-{
-public:
-       template <typename T1, typename T2>
-       T1 _ROAST_ARITH_METHOD_NAME(const T1 &var1, const T2 &var2) {
-               return var1 + var2;
-       }
-};
-
-///////////////////////////////////////////////
-
-class sub
-{
-public:
-       template <typename RET, typename T1, typename T2>
-       RET _ROAST_ARITH_METHOD_NAME(const T1 &var1, const T2 &var2) {
-               return var1 - var2;
-       }
-};
-
-///////////////////////////////////////////////
-
-class mul
-{
-public:
-       template <typename RET, typename T1, typename T2>
-       RET _ROAST_ARITH_METHOD_NAME(const T1 &var1, const T2 &var2) {
-               return var1 * var2;
-       }
-};
-
-///////////////////////////////////////////////
-
-class div
-{
-public:
-       template <typename RET, typename T1, typename T2>
-       RET _ROAST_ARITH_METHOD_NAME(const T1 &var1, const T2 &var2) {
-               return var1 / var2;
-       }
-};
-
-///////////////////////////////////////////////
-
-class mod
-{
-public:
-       template <typename RET, typename T1, typename T2>
-       RET _ROAST_ARITH_METHOD_NAME(const T1 &var1, const T2 &var2) {
-               return var1 % var2;
-       }
-};
-
-///////////////////////////////////////////////
-
-class lshift
-{
-public:
-       template <typename RET, typename T1, typename T2>
-       RET _ROAST_ARITH_METHOD_NAME(const T1 &var1, const T2 &var2) {
-               return var1 << var2;
-       }
-};
-
-///////////////////////////////////////////////
-
-class rshift
-{
-public:
-       template <typename RET, typename T1, typename T2>
-       RET _ROAST_ARITH_METHOD_NAME(const T1 &var1, const T2 &var2) {
-               return var1 >> var2;
-       }
-};
-
-///////////////////////////////////////////////
-
-class xor
-{
-public:
-       template <typename RET, typename T1, typename T2>
-       RET _ROAST_ARITH_METHOD_NAME(const T1 &var1, const T2 &var2) {
-               return var1 ^ var2;
-       }
-};
-
-///////////////////////////////////////////////
-
-_ROAST_ARITH_OPE_NS_END
-
-
-#endif//__SFJP_ROAST__arith__binary_operation_HPP__
diff --git a/roast/include/roast/arith/ope/operations.hpp b/roast/include/roast/arith/ope/operations.hpp
deleted file mode 100644 (file)
index f5e9300..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//     Roast+ License
-
-#ifndef __SFJP_ROAST__arith__operations_HPP__
-#define __SFJP_ROAST__arith__operations_HPP__
-
-#define _ROAST_ARITH_OPE_NS_START              _ROAST_ARITH_NS_START namespace ope{
-#define _ROAST_ARITH_OPE_NS_END                        _ROAST_ARITH_NS_END   }
-//#define _ROAST_ARITH_OPE_NS_START            _ROAST_ARITH_NS_START class ope{ public:
-//#define _ROAST_ARITH_OPE_NS_END              _ROAST_ARITH_NS_END   };
-
-
-#include "roast/arith/ope/binary_operation.hpp"
-#include "roast/arith/ope/unary_operation.hpp"
-
-
-#endif//__SFJP_ROAST__arith__operations_HPP__
diff --git a/roast/include/roast/arith/ope/unary_operation.hpp b/roast/include/roast/arith/ope/unary_operation.hpp
deleted file mode 100644 (file)
index 537fc32..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-//     Roast+ License
-
-#ifndef __SFJP_ROAST__arith__unary_operation_HPP__
-#define __SFJP_ROAST__arith__unary_operation_HPP__
-
-
-_ROAST_ARITH_OPE_NS_START
-
-
-///////////////////////////////////////////////
-
-class increment
-{
-public:
-       template <typename T>
-       T _ROAST_ARITH_METHOD_NAME(T &var1) {
-               T var_ = var1;
-               var_ ++;
-               return var_;
-       }
-};
-
-///////////////////////////////////////////////
-
-class decrement
-{
-public:
-       template <typename T>
-       T _ROAST_ARITH_METHOD_NAME(T &var1) {
-               T var_ = var1;
-               var_ --;
-               return var_;
-       }
-};
-
-///////////////////////////////////////////////
-
-class not
-{
-public:
-       template <typename T>
-       T _ROAST_ARITH_METHOD_NAME(const T &var1) {
-               return ! var1;
-       }
-};
-
-///////////////////////////////////////////////
-
-class bit_not
-{
-public:
-       template <typename T>
-       T _ROAST_ARITH_METHOD_NAME(const T &var1) {
-               return ~ var1;
-       }
-};
-
-///////////////////////////////////////////////
-
-template <typename RET>
-class cast
-{
-public:
-       typedef RET _RetType;
-public:
-       template <typename T>
-       RET _ROAST_ARITH_METHOD_NAME(const T &var1) {
-               return (RET)var1;
-       }
-};
-
-//     ref_cast
-template <typename RET=NullType>
-class ref_cast
-{
-public:
-       typedef RET& _RetType;
-public:
-       template <typename T>
-       T& _ROAST_ARITH_METHOD_NAME(T &var1) {
-               return var1;
-       }
-};
-
-//     cref_cast
-template <typename RET=NullType>
-class cref_cast
-{
-public:
-       typedef const RET& _RetType;
-public:
-       template <typename T>
-       const T& _ROAST_ARITH_METHOD_NAME(T &var1) {
-               return var1;
-       }
-};
-
-//     ptr_cast
-template <typename RET=NullType>
-class ptr_cast
-{
-public:
-       typedef const RET& _RetType;
-public:
-       template <typename T>
-       T* _ROAST_ARITH_METHOD_NAME(T &var1) {
-               return &var1;
-       }
-};
-
-///////////////////////////////////////////////
-
-template <typename RET>
-class construct
-{
-public:
-       
-public:
-       template <typename T>
-       RET _ROAST_ARITH_METHOD_NAME(const T &var1) {
-               return RET(var1);
-       }
-};
-
-///////////////////////////////////////////////
-
-
-_ROAST_ARITH_OPE_NS_END
-
-
-#endif//__SFJP_ROAST__arith__unary_operation_HPP__