Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

drinkdata.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Created: Sun Dec 26 22:00:00 2004
00003 **      by:  Paul Eggleton <bluelightning@bluelightning.org>
00004 **     copyright            : (C) 2004 by Paul Eggleton
00005     email                : bluelightning@bluelightning.org
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 
00012 #ifndef DRINKDATA_H
00013 #define DRINKDATA_H
00014 
00015 class DrinkItem;
00016 
00017 typedef QValueList<DrinkItem> DrinkList;
00018 
00019 class DrinkData {
00020 private:
00021     DrinkList items;
00022     QString filename;
00023 public:
00024     DrinkData(void);
00025     void setFile(const QString &filename);
00026     bool writeChanges(void);
00027     bool read(void);
00028     void addDrink(const QString &name, const QString &ingredients);
00029     DrinkList::Iterator getBegin(void);
00030     DrinkList::Iterator getEnd(void);
00031     DrinkList::Iterator findDrink(const QString &name);
00032 };
00033 
00034 class DrinkItem {
00035 private:
00036     QString name;
00037     QString ingredients;
00038 public:
00039     DrinkItem(void);
00040     DrinkItem(const QString &name, const QString &ingredients);
00041     const QString &getName(void);
00042     const QString &getIngredients(void);
00043     void setName(const QString &name);
00044     void setIngredients(const QString &ingredients);
00045 };
00046 
00047 #endif // DRINKDATA_H

Generated on Sat Nov 5 16:16:48 2005 for OPIE by  doxygen 1.4.2