author | simon <simon> | 2002-04-30 14:26:53 (UTC) |
---|---|---|
committer | simon <simon> | 2002-04-30 14:26:53 (UTC) |
commit | 5dae945f8ec25a811efb10eb71d606ce8da4429f (patch) (unidiff) | |
tree | c12689435fbfb2abd6aedfcbd88208c1cb69407f | |
parent | 3c1b87ffa621f872c72228733a078511e56d2daf (diff) | |
download | opie-5dae945f8ec25a811efb10eb71d606ce8da4429f.zip opie-5dae945f8ec25a811efb10eb71d606ce8da4429f.tar.gz opie-5dae945f8ec25a811efb10eb71d606ce8da4429f.tar.bz2 |
- put the xml tree classes into the Opie namespace
-rw-r--r-- | libopie/tododb.cpp | 2 | ||||
-rw-r--r-- | libopie/xmltree.cc | 1 | ||||
-rw-r--r-- | libopie/xmltree.h | 5 | ||||
-rw-r--r-- | libopie2/opiecore/xmltree.cc | 1 | ||||
-rw-r--r-- | libopie2/opiecore/xmltree.h | 5 |
5 files changed, 14 insertions, 0 deletions
diff --git a/libopie/tododb.cpp b/libopie/tododb.cpp index 33fa177..fe8b8bf 100644 --- a/libopie/tododb.cpp +++ b/libopie/tododb.cpp | |||
@@ -1,20 +1,22 @@ | |||
1 | 1 | ||
2 | #include <qdir.h> | 2 | #include <qdir.h> |
3 | #include <opie/tododb.h> | 3 | #include <opie/tododb.h> |
4 | #include <opie/xmltree.h> | 4 | #include <opie/xmltree.h> |
5 | #include <opie/todoresource.h> | 5 | #include <opie/todoresource.h> |
6 | #include <qpe/palmtoprecord.h> | 6 | #include <qpe/palmtoprecord.h> |
7 | #include <qpe/global.h> | 7 | #include <qpe/global.h> |
8 | 8 | ||
9 | using namespace Opie; | ||
10 | |||
9 | namespace { | 11 | namespace { |
10 | 12 | ||
11 | class FileToDoResource : public ToDoResource { | 13 | class FileToDoResource : public ToDoResource { |
12 | public: | 14 | public: |
13 | FileToDoResource() {}; | 15 | FileToDoResource() {}; |
14 | bool save(const QString &name, const QValueList<ToDoEvent> &m_todos ){ | 16 | bool save(const QString &name, const QValueList<ToDoEvent> &m_todos ){ |
15 | // prepare the XML | 17 | // prepare the XML |
16 | XMLElement *tasks = new XMLElement( ); | 18 | XMLElement *tasks = new XMLElement( ); |
17 | tasks->setTagName("Tasks" ); | 19 | tasks->setTagName("Tasks" ); |
18 | for( QValueList<ToDoEvent>::ConstIterator it = m_todos.begin(); it != m_todos.end(); ++it ){ | 20 | for( QValueList<ToDoEvent>::ConstIterator it = m_todos.begin(); it != m_todos.end(); ++it ){ |
19 | XMLElement::AttributeMap map; | 21 | XMLElement::AttributeMap map; |
20 | XMLElement *task = new XMLElement(); | 22 | XMLElement *task = new XMLElement(); |
diff --git a/libopie/xmltree.cc b/libopie/xmltree.cc index 408e3c6..27db5b3 100644 --- a/libopie/xmltree.cc +++ b/libopie/xmltree.cc | |||
@@ -15,24 +15,25 @@ | |||
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qpe/stringutil.h> | 20 | #include <qpe/stringutil.h> |
21 | #include <opie/xmltree.h> | 21 | #include <opie/xmltree.h> |
22 | 22 | ||
23 | #include <qxml.h> | 23 | #include <qxml.h> |
24 | 24 | ||
25 | #include <assert.h> | 25 | #include <assert.h> |
26 | 26 | ||
27 | using namespace Opie; | ||
27 | 28 | ||
28 | XMLElement::XMLElement() | 29 | XMLElement::XMLElement() |
29 | : m_parent( 0 ), m_next( 0 ), m_prev( 0 ), m_first( 0 ), m_last( 0 ) | 30 | : m_parent( 0 ), m_next( 0 ), m_prev( 0 ), m_first( 0 ), m_last( 0 ) |
30 | { | 31 | { |
31 | } | 32 | } |
32 | 33 | ||
33 | XMLElement::~XMLElement() | 34 | XMLElement::~XMLElement() |
34 | { | 35 | { |
35 | XMLElement *n = m_first; | 36 | XMLElement *n = m_first; |
36 | 37 | ||
37 | while ( n ) | 38 | while ( n ) |
38 | { | 39 | { |
diff --git a/libopie/xmltree.h b/libopie/xmltree.h index ed93c23..4a6b6d9 100644 --- a/libopie/xmltree.h +++ b/libopie/xmltree.h | |||
@@ -16,24 +16,27 @@ | |||
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | 20 | ||
21 | #ifndef __bookmarks_h__ | 21 | #ifndef __bookmarks_h__ |
22 | #define __bookmarks_h__ | 22 | #define __bookmarks_h__ |
23 | 23 | ||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qmap.h> | 25 | #include <qmap.h> |
26 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
27 | 27 | ||
28 | namespace Opie | ||
29 | { | ||
30 | |||
28 | /** | 31 | /** |
29 | * A small xml lib written by Simon Hausmann. | 32 | * A small xml lib written by Simon Hausmann. |
30 | */ | 33 | */ |
31 | class XMLElement | 34 | class XMLElement |
32 | { | 35 | { |
33 | public: | 36 | public: |
34 | typedef QMap<QString, QString> AttributeMap; | 37 | typedef QMap<QString, QString> AttributeMap; |
35 | 38 | ||
36 | /** | 39 | /** |
37 | * The constructor of XMLElement | 40 | * The constructor of XMLElement |
38 | */ | 41 | */ |
39 | XMLElement(); | 42 | XMLElement(); |
@@ -100,13 +103,15 @@ private: | |||
100 | AttributeMap m_attributes; | 103 | AttributeMap m_attributes; |
101 | 104 | ||
102 | XMLElement *m_parent; | 105 | XMLElement *m_parent; |
103 | XMLElement *m_next; | 106 | XMLElement *m_next; |
104 | XMLElement *m_prev; | 107 | XMLElement *m_prev; |
105 | XMLElement *m_first; | 108 | XMLElement *m_first; |
106 | XMLElement *m_last; | 109 | XMLElement *m_last; |
107 | 110 | ||
108 | XMLElement( const XMLElement &rhs ); | 111 | XMLElement( const XMLElement &rhs ); |
109 | XMLElement &operator=( const XMLElement &rhs ); | 112 | XMLElement &operator=( const XMLElement &rhs ); |
110 | }; | 113 | }; |
111 | 114 | ||
115 | } // namespace Opie | ||
116 | |||
112 | #endif | 117 | #endif |
diff --git a/libopie2/opiecore/xmltree.cc b/libopie2/opiecore/xmltree.cc index 408e3c6..27db5b3 100644 --- a/libopie2/opiecore/xmltree.cc +++ b/libopie2/opiecore/xmltree.cc | |||
@@ -15,24 +15,25 @@ | |||
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qpe/stringutil.h> | 20 | #include <qpe/stringutil.h> |
21 | #include <opie/xmltree.h> | 21 | #include <opie/xmltree.h> |
22 | 22 | ||
23 | #include <qxml.h> | 23 | #include <qxml.h> |
24 | 24 | ||
25 | #include <assert.h> | 25 | #include <assert.h> |
26 | 26 | ||
27 | using namespace Opie; | ||
27 | 28 | ||
28 | XMLElement::XMLElement() | 29 | XMLElement::XMLElement() |
29 | : m_parent( 0 ), m_next( 0 ), m_prev( 0 ), m_first( 0 ), m_last( 0 ) | 30 | : m_parent( 0 ), m_next( 0 ), m_prev( 0 ), m_first( 0 ), m_last( 0 ) |
30 | { | 31 | { |
31 | } | 32 | } |
32 | 33 | ||
33 | XMLElement::~XMLElement() | 34 | XMLElement::~XMLElement() |
34 | { | 35 | { |
35 | XMLElement *n = m_first; | 36 | XMLElement *n = m_first; |
36 | 37 | ||
37 | while ( n ) | 38 | while ( n ) |
38 | { | 39 | { |
diff --git a/libopie2/opiecore/xmltree.h b/libopie2/opiecore/xmltree.h index ed93c23..4a6b6d9 100644 --- a/libopie2/opiecore/xmltree.h +++ b/libopie2/opiecore/xmltree.h | |||
@@ -16,24 +16,27 @@ | |||
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | 20 | ||
21 | #ifndef __bookmarks_h__ | 21 | #ifndef __bookmarks_h__ |
22 | #define __bookmarks_h__ | 22 | #define __bookmarks_h__ |
23 | 23 | ||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qmap.h> | 25 | #include <qmap.h> |
26 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
27 | 27 | ||
28 | namespace Opie | ||
29 | { | ||
30 | |||
28 | /** | 31 | /** |
29 | * A small xml lib written by Simon Hausmann. | 32 | * A small xml lib written by Simon Hausmann. |
30 | */ | 33 | */ |
31 | class XMLElement | 34 | class XMLElement |
32 | { | 35 | { |
33 | public: | 36 | public: |
34 | typedef QMap<QString, QString> AttributeMap; | 37 | typedef QMap<QString, QString> AttributeMap; |
35 | 38 | ||
36 | /** | 39 | /** |
37 | * The constructor of XMLElement | 40 | * The constructor of XMLElement |
38 | */ | 41 | */ |
39 | XMLElement(); | 42 | XMLElement(); |
@@ -100,13 +103,15 @@ private: | |||
100 | AttributeMap m_attributes; | 103 | AttributeMap m_attributes; |
101 | 104 | ||
102 | XMLElement *m_parent; | 105 | XMLElement *m_parent; |
103 | XMLElement *m_next; | 106 | XMLElement *m_next; |
104 | XMLElement *m_prev; | 107 | XMLElement *m_prev; |
105 | XMLElement *m_first; | 108 | XMLElement *m_first; |
106 | XMLElement *m_last; | 109 | XMLElement *m_last; |
107 | 110 | ||
108 | XMLElement( const XMLElement &rhs ); | 111 | XMLElement( const XMLElement &rhs ); |
109 | XMLElement &operator=( const XMLElement &rhs ); | 112 | XMLElement &operator=( const XMLElement &rhs ); |
110 | }; | 113 | }; |
111 | 114 | ||
115 | } // namespace Opie | ||
116 | |||
112 | #endif | 117 | #endif |