author | llornkcor <llornkcor> | 2004-12-29 18:27:00 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-12-29 18:27:00 (UTC) |
commit | e3fa443e845e76707171c6fae79125892a369b75 (patch) (unidiff) | |
tree | f2214ae1c6e1297109b4dcef4759b2c0aca27595 | |
parent | e2d6f156eacc312f270a1b5c3830e58be8941460 (diff) | |
download | opie-e3fa443e845e76707171c6fae79125892a369b75.zip opie-e3fa443e845e76707171c6fae79125892a369b75.tar.gz opie-e3fa443e845e76707171c6fae79125892a369b75.tar.bz2 |
patch to remove stl, from hrw
-rw-r--r-- | noncore/apps/opie-bartender/drinkdata.cpp | 9 | ||||
-rw-r--r-- | noncore/apps/opie-bartender/drinkdata.h | 1 |
2 files changed, 0 insertions, 10 deletions
diff --git a/noncore/apps/opie-bartender/drinkdata.cpp b/noncore/apps/opie-bartender/drinkdata.cpp index 8856e46..53e7b8d 100644 --- a/noncore/apps/opie-bartender/drinkdata.cpp +++ b/noncore/apps/opie-bartender/drinkdata.cpp | |||
@@ -13,17 +13,16 @@ | |||
13 | #include <qfile.h> | 13 | #include <qfile.h> |
14 | #include <qtextstream.h> | 14 | #include <qtextstream.h> |
15 | #include <qvaluelist.h> | 15 | #include <qvaluelist.h> |
16 | 16 | ||
17 | /* STD */ | 17 | /* STD */ |
18 | #include <fcntl.h> | 18 | #include <fcntl.h> |
19 | #include <unistd.h> | 19 | #include <unistd.h> |
20 | #include <stdlib.h> | 20 | #include <stdlib.h> |
21 | #include <iostream> | ||
22 | #include <errno.h> | 21 | #include <errno.h> |
23 | 22 | ||
24 | #include "drinkdata.h" | 23 | #include "drinkdata.h" |
25 | 24 | ||
26 | // ----- DrinkData ----- | 25 | // ----- DrinkData ----- |
27 | 26 | ||
28 | DrinkData::DrinkData() { | 27 | DrinkData::DrinkData() { |
29 | } | 28 | } |
@@ -61,24 +60,16 @@ bool DrinkData::read(void) { | |||
61 | } | 60 | } |
62 | } | 61 | } |
63 | 62 | ||
64 | dbFile.close(); | 63 | dbFile.close(); |
65 | 64 | ||
66 | return true; | 65 | return true; |
67 | } | 66 | } |
68 | 67 | ||
69 | void DrinkData::print(void) { | ||
70 | DrinkList::Iterator it = items.begin(); | ||
71 | while ( it != items.end() ) { | ||
72 | std::cout << (*it).getName() << '\n'; | ||
73 | ++it; | ||
74 | } | ||
75 | } | ||
76 | |||
77 | void DrinkData::addDrink(const QString &name, const QString &ingredients) { | 68 | void DrinkData::addDrink(const QString &name, const QString &ingredients) { |
78 | DrinkItem item(name, ingredients); | 69 | DrinkItem item(name, ingredients); |
79 | items.append(item); | 70 | items.append(item); |
80 | } | 71 | } |
81 | 72 | ||
82 | DrinkList::Iterator DrinkData::findDrink(const QString &name) { | 73 | DrinkList::Iterator DrinkData::findDrink(const QString &name) { |
83 | DrinkList::Iterator it = items.begin(); | 74 | DrinkList::Iterator it = items.begin(); |
84 | while ( it != items.end() ) { | 75 | while ( it != items.end() ) { |
diff --git a/noncore/apps/opie-bartender/drinkdata.h b/noncore/apps/opie-bartender/drinkdata.h index bcc3022..2b96d1d 100644 --- a/noncore/apps/opie-bartender/drinkdata.h +++ b/noncore/apps/opie-bartender/drinkdata.h | |||
@@ -20,17 +20,16 @@ class DrinkData { | |||
20 | private: | 20 | private: |
21 | DrinkList items; | 21 | DrinkList items; |
22 | QString filename; | 22 | QString filename; |
23 | public: | 23 | public: |
24 | DrinkData(void); | 24 | DrinkData(void); |
25 | void setFile(const QString &filename); | 25 | void setFile(const QString &filename); |
26 | bool writeChanges(void); | 26 | bool writeChanges(void); |
27 | bool read(void); | 27 | bool read(void); |
28 | void print(void); | ||
29 | void addDrink(const QString &name, const QString &ingredients); | 28 | void addDrink(const QString &name, const QString &ingredients); |
30 | DrinkList::Iterator getBegin(void); | 29 | DrinkList::Iterator getBegin(void); |
31 | DrinkList::Iterator getEnd(void); | 30 | DrinkList::Iterator getEnd(void); |
32 | DrinkList::Iterator findDrink(const QString &name); | 31 | DrinkList::Iterator findDrink(const QString &name); |
33 | }; | 32 | }; |
34 | 33 | ||
35 | class DrinkItem { | 34 | class DrinkItem { |
36 | private: | 35 | private: |