#ifndef __SFJP_ROAST_EX__graphics__directx__shader_param_HPP__
#define __SFJP_ROAST_EX__graphics__directx__shader_param_HPP__
+#include "roast/graphics/directx/tuple_ul.hpp"
+
namespace roast
{
namespace directx
{
float1,
float2,
+ float3,
float4,
float4x4,
- __end
+ _null
};
+
+ template <::roast::directx::graphics::shader_param_type::_ e>
+ struct to_type{ typedef _internal::null_type type; };
+
+ template<> struct to_type<float1>{ typedef float type; };
+ template<> struct to_type<float2>{ typedef float type[2]; };
+ template<> struct to_type<float3>{ typedef float type[3]; };
+ template<> struct to_type<float4>{ typedef float type[4]; };
}
typedef shader_param_type::_ shader_param_type_e;
- ///////////
+ ///////////////////
+
+ ///////////////////
- template <shader_param_type_e T1>
- struct shader_param_ {};
+ template <shader_param_type_e T1,
+ shader_param_type_e T2=shader_param_type::_null,
+ shader_param_type_e T3=shader_param_type::_null,
+ shader_param_type_e T4=shader_param_type::_null,
+ shader_param_type_e T5=shader_param_type::_null,
+ shader_param_type_e T6=shader_param_type::_null,
+ shader_param_type_e T7=shader_param_type::_null,
+ shader_param_type_e T8=shader_param_type::_null,
+ shader_param_type_e T9=shader_param_type::_null,
+ shader_param_type_e T10=shader_param_type::_null,
+ shader_param_type_e T11=shader_param_type::_null,
+ shader_param_type_e T12=shader_param_type::_null,
+ shader_param_type_e T13=shader_param_type::_null,
+ shader_param_type_e T14=shader_param_type::_null,
+ shader_param_type_e T15=shader_param_type::_null,
+ shader_param_type_e T16=shader_param_type::_null,
+ shader_param_type_e T17=shader_param_type::_null,
+ shader_param_type_e T18=shader_param_type::_null,
+ shader_param_type_e T19=shader_param_type::_null,
+ shader_param_type_e T20=shader_param_type::_null,
+ shader_param_type_e T21=shader_param_type::_null,
+ shader_param_type_e T22=shader_param_type::_null,
+ shader_param_type_e T23=shader_param_type::_null,
+ shader_param_type_e T24=shader_param_type::_null,
+ shader_param_type_e T25=shader_param_type::_null,
+ shader_param_type_e T26=shader_param_type::_null,
+ shader_param_type_e T27=shader_param_type::_null,
+ shader_param_type_e T28=shader_param_type::_null,
+ shader_param_type_e T29=shader_param_type::_null,
+ shader_param_type_e T30=shader_param_type::_null,
+ shader_param_type_e T31=shader_param_type::_null,
+ shader_param_type_e T32=shader_param_type::_null>
+ struct shader_param_ : public _internal::tuple<
+ typename shader_param_type::to_type<T1>::type,
+ typename shader_param_type::to_type<T2>::type
+ > {
+ //typename to_type<T1>::type v1;
+ };
//////////////////////////////////////////////////////
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+ /*
+ template <typename T>
+ struct initial_value_type{ typedef T type; };
+ template <typename T, int N>
+ struct initial_value_type<T[N]>{ typedef T type[N]; T value[N]; };
+
+ template <typename T>
+ T _initial_value(const T &n){ return T(); }
+
+ template <typename T, int N>
+ T[N] /typename initial_value_type<T[N]>::type/ _initial_value(const T n[N]){
+ initial_value_type<T[N]> t;
+ return t.value;
+ }
+ */
// tuple
template <
//typedef _tuple_ll_to_ul_t<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> _Base, _Ll, _LlType;
typedef typename _tuple_ll_to_ul_t<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::_Type _Base, _Ll, _LlType;
public:
+ // 0 paramater Constructer
+ tuple(){}
+ // 1 paramater Constructer
+ tuple(T1 t1) : _Base(t1){}
+ // 2 paramater Constructer
tuple(
T1 t1,
- T2 t2,
- T3 t3 = null_type(),
- T4 t4 = null_type(),
- T5 t5 = null_type(),
- T6 t6 = null_type(),
- T7 t7 = null_type(),
- T8 t8 = null_type(),
- T9 t9 = null_type(),
- T10 t10 = null_type())
+ T2 t2)
:
- _Base(t1, _tuple_ll_to_ul_t<T2,T3,T4,T5,T6,T7,T8,T9,T10>::make(t2, t3, t4, t5, t6, t7, t8, t9, t10) )
+ _Base(t1, _tuple_ll_to_ul_t<T2>::make(t2) )
{}
-
+
tuple(
- T1 t1 = null_type())
+ T1 t1,
+ T2 t2,
+ T3 t3,
+ T4 t4,
+ T5 t5,
+ T6 t6,
+ T7 t7,
+ T8 t8,
+ T9 t9,
+ T10 t10)
:
- _Base(t1)
+ _Base(t1, _tuple_ll_to_ul_t<T2,T3,T4,T5,T6,T7,T8,T9,T10>::make(t2, t3, t4, t5, t6, t7, t8, t9, t10) )
{}
tuple operator = ( _tuple_ll_to_ul_t<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> &from )