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

collection_comparer.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_COMPARER_INC_GUARD_H
00022 #define EASYSOK_COLLECTION_COMPARER_INC_GUARD_H
00023 
00024 
00025 class Collection;
00026 
00027 
00028 
00029 
00037 class CollectionComparer
00038 {
00039 
00040 public:
00041 
00048     CollectionComparer(Collection const & collection1, Collection const & collection2);
00049 
00050 
00055     bool areEqual() const;
00056 
00057 
00062     bool areUnrelated() const;
00063 
00064 
00069     bool onlyTrivialChanges() const;
00070 
00071 
00076     bool onlyCollectionNameChanged() const;
00077 
00078 
00083     bool addsLevels() const;
00084 
00085 
00090     bool removesLevels() const;
00091 
00092 
00097     bool changesProperties() const;
00098 
00099 
00104     bool reordersLevels() const;
00105 
00106 
00114     bool operator < (CollectionComparer const & other) const;
00115 
00116 
00117 private:
00118 
00123     int m_nr_reordered;
00124 
00125 
00130     int m_nr_removed;
00131 
00132 
00137     int m_nr_added;
00138 
00139 
00144     bool m_are_equal;
00145 
00146 
00151     bool m_are_unrelated;
00152 
00153 
00158     bool m_only_collection_name_changed;
00159 
00160 
00165     bool m_adds_levels;
00166 
00167 
00172     bool m_removes_levels;
00173 
00174 
00179     bool m_changes_properties;
00180 
00181 
00186     bool m_reorders_levels;
00187 
00188 
00193     bool m_not_trivial_changes;
00194 };
00195 
00196 
00197 #endif
00198 

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