Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

collection_holder.h

00001 /*
00002  *   EasySok --- A(nother) sokoban game for KDE.
00003  *
00004  *   Copyright (C) 2001 by Ralf Schmelter (ralfs@pc2a.chemie.uni-dortmund.de).
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 version 2 as
00008  *   published by the Free Software Foundation.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with this program; if not, write to the Free Software
00017  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 
00021 #ifndef EASYSOK_COLLECTION_HOLDER_INC_GUARD_H
00022 #define EASYSOK_COLLECTION_HOLDER_INC_GUARD_H
00023 
00024 
00025 #include <vector>
00026 
00027 
00028 class Collection;
00029 class CompressedMap;
00030 class QDateTime;
00031 class QString;
00032 class QStringList;
00033 
00034 
00035 
00036 
00044 class CollectionHolder
00045 {
00046 
00047 public:
00048 
00053     static void load();
00054 
00055 
00060     static void save();
00061 
00062 
00067     static int numberOfCollections();
00068 
00069 
00074     static int numberOfPermanentCollections();
00075 
00076 
00081     static int numberOfTemporaryCollections();
00082 
00083 
00090     static int indexFromName(QString const & name);
00091 
00092 
00099     static Collection * collection(int index);
00100 
00101 
00108     static bool isTemporary(int index);
00109 
00110 
00118     static void setTemporary(int index, bool temporary);
00119 
00120 
00133     static int addCollection(Collection * collection, bool temporary);
00134 
00135 
00144     static void removeCollection(int index);
00145 
00146 
00151     static void setModified();
00152 
00153 
00164     static void findCompressedMap(CompressedMap const & compressed_map, int & collection_nr, int & level_nr);
00165 
00166 
00175     static bool updateCollections(QDateTime const & min_date, bool show_trival_changes);
00176 
00177 
00178 private:
00179 
00186     static void getCollections(QString const & filename);
00187 
00188 
00195     static void getCollections(QStringList const & files);
00196 
00197 
00202     static std::vector<Collection *> s_collections;
00203 
00204 
00209     static std::vector<int> s_temporary;
00210 
00211 
00216     static bool s_modified;
00217 
00218 
00223     static bool s_initialized;
00224 };
00225 
00226 
00227 #endif

Generated at Sun Jan 6 18:49:09 2002 for EasySok by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001