From a7cdc82a59a3bfeda5964bdecbbac99c9e180b14 Mon Sep 17 00:00:00 2001 From: mat007 Date: Fri, 8 Mar 2013 08:01:34 +0000 Subject: [PATCH] Updated documentation git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@606 860be788-9bd5-4423-9f1e-828f051e677b --- build/boost/doc/changelog.qbk | 1 + build/boost/doc/reference.qbk | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/build/boost/doc/changelog.qbk b/build/boost/doc/changelog.qbk index 9224fa2..b419c78 100644 --- a/build/boost/doc/changelog.qbk +++ b/build/boost/doc/changelog.qbk @@ -6,6 +6,7 @@ Not yet released * Added variadic macro support for MOCK_FUNCTION and the MOCK_METHOD family * Added variadic macro support for MOCK_BASE_CLASS and MOCK_FUNCTOR * Added round parenthesis support for signatures for MOCK_FUNCTION, MOCK_FUNCTOR and the MOCK_METHOD family +* Added MOCK_CONVERSION_OPERATOR_TPL, MOCK_CONST_CONVERSION_OPERATOR_TPL and MOCK_NON_CONST_CONVERSION_OPERATOR_TPL [endsect] diff --git a/build/boost/doc/reference.qbk b/build/boost/doc/reference.qbk index 5a2a072..9d7b9e0 100644 --- a/build/boost/doc/reference.qbk +++ b/build/boost/doc/reference.qbk @@ -312,6 +312,10 @@ Synopsis : MOCK_CONVERSION_OPERATOR( type, identifier ) // this generates both const and non-const operators MOCK_CONST_CONVERSION_OPERATOR( type, identifier ) MOCK_NON_CONST_CONVERSION_OPERATOR( type, identifier ) + + MOCK_CONVERSION_OPERATOR_TPL( type, identifier ) // must be used if the signature uses a template parameter of the class + MOCK_CONST_CONVERSION_OPERATOR_TPL( type, identifier ) // must be used if the signature uses a template parameter of the class + MOCK_NON_CONST_CONVERSION_OPERATOR_TPL( type, identifier ) // must be used if the signature uses a template parameter of the class Example : @@ -321,6 +325,16 @@ Example : MOCK_CONST_CONVERSION_OPERATOR( const std::string&, conversion_to_string ) }; +Example : + + template< typename T > + MOCK_CLASS( mock_class ) + { + MOCK_CONVERSION_OPERATOR_TPL( T, conversion_to_T ) // the _TPL variants must be used if the signature includes a template parameter of the class + MOCK_CONST_CONVERSION_OPERATOR( const std::string&, const_conversion_to_string ) + MOCK_NON_CONST_CONVERSION_OPERATOR( const std::string&, const_conversion_to_string ) + }; + [endsect] [section Functor]