00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00035
00036
00037 #pragma once
00038
00039 #ifndef _ARG_INFO_H_
00040 #define _ARG_INFO_H_
00041
00042 namespace mbo
00043 {
00044
00045
00046
00049 template<typename _Targ, typename _Tvar = _Targ>
00050 struct arg_info
00051 {
00052 typedef _Targ argument_t;
00053 typedef _Targ variable_t;
00054 };
00055
00058 template<typename _Targ, typename _Tvar>
00059 struct arg_info<_Targ*, _Tvar*>
00060 {
00061 typedef _Targ* argument_t;
00062 typedef _Tvar* variable_t;
00063 };
00064
00067 template<typename _Targ, typename _Tvar>
00068 struct arg_info<_Targ&, _Tvar&>
00069 {
00070 typedef _Targ& argument_t;
00071 typedef _Tvar& variable_t;
00072 };
00073
00076 template<>
00077 struct arg_info<void, void>
00078 {
00079 typedef void argument_t;
00080 typedef void variable_t;
00081 };
00082
00085 template<typename _Targ, typename _Tvar = _Targ>
00086 struct const_arg_info: arg_info<const _Targ, const _Tvar>
00087 {
00088 };
00089
00092 template<typename _Type>
00093 struct copy_arg_info: arg_info<_Type, _Type>
00094 {
00095 };
00096
00099 template<typename _Type>
00100 struct copy_arg_info<_Type*>: arg_info<const _Type*, _Type*>
00101 {
00102 };
00103
00106 template<typename _Type>
00107 struct copy_arg_info<_Type&>: arg_info<const _Type&, _Type>
00108 {
00109 };
00110
00113 template<typename _Type>
00114 struct copy_arg_info<const _Type*>: arg_info<const _Type*, const _Type*>
00115 {
00116 };
00117
00120 template<typename _Type>
00121 struct copy_arg_info<const _Type&>: arg_info<const _Type&, const _Type&>
00122 {
00123 };
00124
00125 };
00126
00127 #endif // _ARG_INFO_H_