mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Refactoring
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@479 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
4a128a0221
commit
cf264cd31e
9 changed files with 75 additions and 98 deletions
|
|
@ -14,7 +14,7 @@
|
|||
#include "object.hpp"
|
||||
#include "function.hpp"
|
||||
#include "detail/type_name.hpp"
|
||||
#include "detail/args.hpp"
|
||||
#include "detail/parameters.hpp"
|
||||
#include "detail/signature.hpp"
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/stringize.hpp>
|
||||
|
|
@ -66,6 +66,17 @@ namespace detail
|
|||
return t##_mock_; \
|
||||
}
|
||||
|
||||
#define MOCK_PARAM(z, n, d) \
|
||||
BOOST_PP_COMMA_IF(n) d::at< n >::type p##n
|
||||
|
||||
#define MOCK_PARAMS(n, S, tpn) \
|
||||
BOOST_PP_REPEAT(n, MOCK_PARAM, \
|
||||
tpn mock::detail::parameters< S BOOST_PP_COMMA() n >)
|
||||
|
||||
#define MOCK_DECL(M, n, S, c, tpn) \
|
||||
tpn boost::function_types::result_type< S >::type M( \
|
||||
MOCK_PARAMS(n, S, tpn) ) c
|
||||
|
||||
#define MOCK_METHOD_AUX(M, n, S, t, c, tpn) \
|
||||
MOCK_DECL(M, n, S, c, tpn) \
|
||||
{ \
|
||||
|
|
@ -119,7 +130,7 @@ namespace detail
|
|||
|
||||
#define MOCK_CONSTRUCTOR_AUX(T, n, A, t, tpn) \
|
||||
MOCK_FUNCTION_HELPER(void A, t, static) \
|
||||
T( MOCK_ARGS(n, void A, tpn) ) \
|
||||
T( MOCK_PARAMS(n, void A, tpn) ) \
|
||||
{ \
|
||||
MOCK_HELPER(t)( BOOST_PP_ENUM_PARAMS(n, p) ); \
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue