[Mockpp-commits] mockpp/mockpp/production TimeServer.cpp,1.7,1.8 TimeServer.h,1.2,1.3 mockpp_product
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-12-29 19:30:01
|
Update of /cvsroot/mockpp/mockpp/mockpp/production In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12933/mockpp/production Modified Files: TimeServer.cpp TimeServer.h mockpp_production.h Log Message: update copyright date Index: TimeServer.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/production/TimeServer.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TimeServer.h 30 Apr 2005 21:15:45 -0000 1.2 +++ TimeServer.h 29 Dec 2005 19:29:51 -0000 1.3 @@ -1,79 +1,79 @@ -/** @file - @brief Time dependent objects - - $Id$ - - **************************************************************************/ - -/************************************************************************** - - begin : Sat Apr 30 2005 - copyright : (C) 2002-2005 by Ewald Arnold - email : mockpp at ewald-arnold dot de - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - **/ - -#ifndef MOCKPP_TimeServer_H -#define MOCKPP_TimeServer_H - -#include <mockpp/mockpp.h> // always first - -#include <ctime> - - -namespace mockpp { - - -/** Base class for time serving purposes - * \ingroup grp_production - * @see MockTimeServer - */ -class TimeServer -{ - public: - - /** Destroys the time server. - */ - virtual ~TimeServer(); - - /** Returns the current unix time - * @return unix time - */ - virtual std::time_t getUnixTime() = 0; -}; - - -/** Real time serving. - * \ingroup grp_production - */ -class RealTimeServer : public TimeServer -{ - public: - - /** Returns the current unix time - * @return unix time - */ - virtual std::time_t getUnixTime(); -}; - - -} // namespace mockpp - - -#endif // MOCKPP_TimeServer_H - - +/** @file + @brief Time dependent objects + + $Id$ + + **************************************************************************/ + +/************************************************************************** + + begin : Sat Apr 30 2005 + copyright : (C) 2002-2006 by Ewald Arnold + email : mockpp at ewald-arnold dot de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + **/ + +#ifndef MOCKPP_TimeServer_H +#define MOCKPP_TimeServer_H + +#include <mockpp/mockpp.h> // always first + +#include <ctime> + + +namespace mockpp { + + +/** Base class for time serving purposes + * \ingroup grp_production + * @see MockTimeServer + */ +class TimeServer +{ + public: + + /** Destroys the time server. + */ + virtual ~TimeServer(); + + /** Returns the current unix time + * @return unix time + */ + virtual std::time_t getUnixTime() = 0; +}; + + +/** Real time serving. + * \ingroup grp_production + */ +class RealTimeServer : public TimeServer +{ + public: + + /** Returns the current unix time + * @return unix time + */ + virtual std::time_t getUnixTime(); +}; + + +} // namespace mockpp + + +#endif // MOCKPP_TimeServer_H + + Index: mockpp_production.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/production/mockpp_production.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mockpp_production.h 27 May 2005 08:20:59 -0000 1.3 +++ mockpp_production.h 29 Dec 2005 19:29:51 -0000 1.4 @@ -1,49 +1,49 @@ -/** @file - @brief Support in production code - - $Id$ - - **************************************************************************/ - -/************************************************************************** - - begin : Dat Apr 30 2005 - copyright : (C) 2002-2005 by Ewald Arnold - email : mockpp at ewald-arnold dot de - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - **/ - -#ifndef MOCKPP_PRODUCTION_H -#define MOCKPP_PRODUCTION_H - -#include <mockpp/mockpp.h> // always first - -/** @defgroup grp_production Support in production code - * This module contains classes that help to prepare production code - * for testing with mock objects. This code is placed in a library - * of its own. So it is still possible to run production code - * without the bloat of the testing environment. - */ - -namespace mockpp { - -} // namespace mockpp - - -#endif // MOCKPP_PRODUCTION_H - - +/** @file + @brief Support in production code + + $Id$ + + **************************************************************************/ + +/************************************************************************** + + begin : Dat Apr 30 2005 + copyright : (C) 2002-2006 by Ewald Arnold + email : mockpp at ewald-arnold dot de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + **/ + +#ifndef MOCKPP_PRODUCTION_H +#define MOCKPP_PRODUCTION_H + +#include <mockpp/mockpp.h> // always first + +/** @defgroup grp_production Support in production code + * This module contains classes that help to prepare production code + * for testing with mock objects. This code is placed in a library + * of its own. So it is still possible to run production code + * without the bloat of the testing environment. + */ + +namespace mockpp { + +} // namespace mockpp + + +#endif // MOCKPP_PRODUCTION_H + + Index: TimeServer.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/production/TimeServer.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- TimeServer.cpp 8 Dec 2005 17:30:18 -0000 1.7 +++ TimeServer.cpp 29 Dec 2005 19:29:51 -0000 1.8 @@ -1,59 +1,59 @@ -/** @file - @brief Time dependent objects - - $Id$ - - **************************************************************************/ - -/************************************************************************** - - begin : Sat Apr 30 2005 - copyright : (C) 2002-2005 by Ewald Arnold - email : mockpp at ewald-arnold dot de - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2 of the License, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - **/ - -#include <mockpp/mockpp.h> // always first - -#include <mockpp/production/TimeServer.h> - - -namespace mockpp { - - -MOCKPP_EXPORT TimeServer::~TimeServer() -{ -} - - -/////////////////////////////////////////////////////////////// - - -std::time_t MOCKPP_EXPORT RealTimeServer::getUnixTime() -{ - return std::time(NULL); -} - - -} // namespace mockpp - - - - - - - +/** @file + @brief Time dependent objects + + $Id$ + + **************************************************************************/ + +/************************************************************************** + + begin : Sat Apr 30 2005 + copyright : (C) 2002-2006 by Ewald Arnold + email : mockpp at ewald-arnold dot de + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + **/ + +#include <mockpp/mockpp.h> // always first + +#include <mockpp/production/TimeServer.h> + + +namespace mockpp { + + +MOCKPP_EXPORT TimeServer::~TimeServer() +{ +} + + +/////////////////////////////////////////////////////////////// + + +std::time_t MOCKPP_EXPORT RealTimeServer::getUnixTime() +{ + return std::time(NULL); +} + + +} // namespace mockpp + + + + + + + |