00001 00009 /************************************************************************** 00010 00011 begin : Thu Aug 26 2004 00012 copyright : (C) 2002-2010 by Ewald Arnold 00013 email : mockpp at ewald-arnold dot de 00014 00015 This program is free software; you can redistribute it and/or modify 00016 it under the terms of the GNU Lesser General Public License as 00017 published by the Free Software Foundation; either version 2 of the License, 00018 or (at your option) any later version. 00019 00020 This program is distributed in the hope that it will be useful, 00021 but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 GNU General Public License for more details. 00024 00025 You should have received a copy of the GNU Lesser General Public License 00026 along with this program; if not, write to the Free Software 00027 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00028 00029 * 00030 * Original Java Sources: Copyright (c) 2000-2004, jMock.org 00031 * 00032 00033 **/ 00034 00035 #ifndef MOCKPP_STATELESSINVOCATIONMATCHER_H 00036 #define MOCKPP_STATELESSINVOCATIONMATCHER_H 00037 00038 00039 #include <mockpp/mockpp.h> // always first 00040 00041 #include <mockpp/matcher/InvocationMatcher.h> 00042 00043 00044 MOCKPP_NS_START 00045 00046 00050 template <typename I> // Invocation 00051 class StatelessInvocationMatcher : public InvocationMatcher<I> 00052 { 00053 public: 00054 00058 virtual void incInvoked( const I &invocation ) 00059 { 00060 MOCKPP_UNUSED(invocation); 00061 // Do nothing because state cannot change 00062 } 00063 00067 virtual void verify() 00068 { 00069 // Nothing to verify because state cannot change 00070 } 00071 00075 virtual bool hasDescription() 00076 { 00077 return true; 00078 } 00079 }; 00080 00081 00082 MOCKPP_NS_END 00083 00084 00085 #endif // MOCKPP_STATELESSINVOCATIONMATCHER_H 00086