00001 /* 00002 * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG) 00003 * UNIVERSITAT POMPEU FABRA 00004 * 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00023 // Class Storage: The abstract class for storages. 00024 // Description: 00025 // An storage is a place where you can save and/or retrieve objects 00026 // state. Subclases of Storage will implement the way the storage 00027 // and the loading is done. 00029 00030 #ifndef _Storage_ 00031 #define _Storage_ 00032 00033 #include "Storable.hxx" 00034 #include "Err.hxx" 00035 00036 namespace CLAM { 00037 00038 00044 class ErrNotFound : public Err { 00045 }; 00046 00053 class Storage { 00054 // Construction/Destruction 00055 public: 00056 //* The required virtual destructor 00057 virtual ~Storage() {}; 00058 // Operators for the Storage interface 00059 public: 00073 virtual void Store(const Storable & object)=0; 00089 virtual bool Load (Storable & object)=0; 00090 }; 00091 } 00092 00093 #endif//_Storage_ 00094