00001 #ifndef __SGARCH_H_INCLUDED__ 00002 #define __SGARCH_H_INCLUDED__ 00003 00004 // $Id$ 00005 00006 //********************************************************************** 00007 // * 00008 // Description: Abstract base class defining interface used to * 00009 // store and retrieve instances of Signalman to and * 00010 // from archive. * 00011 // * 00012 // Author: Chris White (whitecf@bcs.org.uk) * 00013 // * 00014 // Copyright (C) 2002 Monitor Computing Services Ltd. * 00015 // * 00016 // This program is free software; you can redistribute it and/or * 00017 // modify it under the terms of the GNU General Public License * 00018 // as published by the Free Software Foundation; either version 2 * 00019 // of the License, or any later version. * 00020 // * 00021 // This program is distributed in the hope that it will be useful, * 00022 // but WITHOUT ANY WARRANTY; without even the implied warranty of * 00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00024 // GNU General Public License for more details. * 00025 // * 00026 // You should have received a copy of the GNU General Public * 00027 // License (http://www.gnu.org/copyleft/gpl.html) along with this * 00028 // program; if not, write to: * 00029 // The Free Software Foundation Inc., * 00030 // 59 Temple Place - Suite 330, * 00031 // Boston, MA 02111-1307, * 00032 // USA. * 00033 // * 00034 //********************************************************************** 00035 // * 00036 // Notes: * 00037 // * 00038 //********************************************************************** 00039 00040 00041 // Forward declerations 00042 class string; 00043 00044 00045 namespace Monitor { 00046 namespace BellMaster { 00047 00048 00049 // Forward declerations within namespace 00050 class Signalman; 00051 00052 00053 00054 class SignalmanArchive 00055 { 00056 public: 00057 SignalmanArchive(); 00058 00059 void 00060 store(const Signalman& target); 00061 00062 int 00063 retrieve(Signalman& target); 00064 00065 protected: 00066 virtual void 00067 storeName(const string& name) = 0; 00068 00069 virtual void 00070 storeBeatInterval(const unsigned& interval) = 0; 00071 00072 virtual void 00073 storeSetInterval(const unsigned& interval) = 0; 00074 00075 virtual int 00076 retrieveName(string& name) = 0; 00077 00078 virtual int 00079 retrieveBeatInterval(unsigned& interval) = 0; 00080 00081 virtual int 00082 retrieveSetInterval(unsigned& interval) = 0; 00083 }; // class SignalmanArchive 00084 00085 }; // namespace BellMaster 00086 }; // namespace Monitor 00087 00088 00089 #endif // __SGARCH_H_INCLUDED__