Moved some components into a detail sub-directory

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@478 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-07-22 06:51:19 +00:00
parent dc2d66245f
commit 4a128a0221
28 changed files with 188 additions and 145 deletions

View file

@ -13,46 +13,16 @@
#include "cleanup.hpp"
#include "object.hpp"
#include "function.hpp"
#include "args.hpp"
#include "type_name.hpp"
#include "detail/type_name.hpp"
#include "detail/args.hpp"
#include "detail/signature.hpp"
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <boost/function_types/parameter_types.hpp>
#include <boost/function_types/function_type.hpp>
#include <boost/function_types/result_type.hpp>
#include <boost/mpl/joint_view.hpp>
#include <boost/mpl/single_view.hpp>
#include <boost/mpl/pop_front.hpp>
#define BOOST_TYPEOF_SILENT
#include <boost/typeof/typeof.hpp>
#include <boost/type_traits.hpp>
namespace mock
{
namespace detail
{
template< typename M >
struct signature :
boost::function_types::function_type<
boost::mpl::joint_view<
boost::mpl::single_view<
BOOST_DEDUCED_TYPENAME
boost::function_types::result_type< M >::type
>,
BOOST_DEDUCED_TYPENAME boost::mpl::pop_front<
BOOST_DEDUCED_TYPENAME
boost::function_types::parameter_types< M >
>::type
>
>
{};
template< typename T >
struct base
{
typedef T base_type;
};
template< typename S >
struct functor : mock::function< S >
{
@ -69,11 +39,6 @@ namespace detail
}
};
}
// if an error is generated by the line below it means
// the method is ambiguous : use MOCK_METHOD_EXT instead
template< typename T >
T& ambiguous_method_name_use_MOCK_METHOD_EXT_instead( const T& );
} // mock
#define MOCK_BASE_CLASS(T, I) \
@ -101,13 +66,6 @@ namespace detail
return t##_mock_; \
}
#define MOCK_SIGNATURE(M) \
mock::detail::signature< \
BOOST_TYPEOF( \
mock::ambiguous_method_name_use_MOCK_METHOD_EXT_instead( \
&base_type::M ) ) \
>::type
#define MOCK_METHOD_AUX(M, n, S, t, c, tpn) \
MOCK_DECL(M, n, S, c, tpn) \
{ \