00001 /*************************************************************************** 00002 interface.h - interface class for file access 00003 00004 ------------------- 00005 begin : Sun 2 Jan 2005 00006 copyright : (C) 2002-2010 by Ewald Arnold 00007 email : mockpp at ewald-arnold dot de 00008 00009 $Id: interface.h 1491 2010-01-02 22:21:45Z ewald-arnold $ 00010 00011 ***************************************************************************/ 00012 00013 /************************************************************************** 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 00031 #include <mockpp/mockpp.h> 00032 00033 #include <string> 00034 00041 class Interface 00042 { 00043 public: 00044 00047 virtual ~Interface() 00048 {} 00049 00053 virtual void open(const MOCKPP_STL::string &name) = 0; 00054 00058 virtual MOCKPP_STL::string read() = 0; 00059 00063 virtual void write(const MOCKPP_STL::string &s) = 0; 00064 00069 virtual unsigned calculate(unsigned input) = 0; 00070 00073 virtual void close() = 0; 00074 }; 00075