summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/osmartpointer.h
authorzecke <zecke>2004-03-13 19:51:45 (UTC)
committer zecke <zecke>2004-03-13 19:51:45 (UTC)
commit6d08277737e22b7a1527124623f3571969073ddf (patch) (unidiff)
tree4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opiecore/osmartpointer.h
parent8e28911f7199f4450ac5eef09482069f9b9caea2 (diff)
downloadopie-6d08277737e22b7a1527124623f3571969073ddf.zip
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2
Move XML class to internal PIM
Add namespaces!!! Opie::Core and Opie::Core::Private Opie::Net and Opie::Net::Private Opie::Ui and Opie::Ui::Private Opie::MM and Opie::MM::Private Opie::DB and Opie::DB::Private PIM classes are not yet converted because we will do other work on it as well
Diffstat (limited to 'libopie2/opiecore/osmartpointer.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/osmartpointer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiecore/osmartpointer.h b/libopie2/opiecore/osmartpointer.h
index 9000e71..8f9da7f 100644
--- a/libopie2/opiecore/osmartpointer.h
+++ b/libopie2/opiecore/osmartpointer.h
@@ -31,24 +31,25 @@ _;:, .> :=|. This program is free software; you can
31 31
32#ifndef _OSmartPointer_h 32#ifndef _OSmartPointer_h
33#define _OSmartPointer_h 33#define _OSmartPointer_h
34 34
35/*! 35/*!
36 * \file OSmartPointer.h 36 * \file OSmartPointer.h
37 * \brief smart pointer and reference counter 37 * \brief smart pointer and reference counter
38 * \author Rajko Albrecht 38 * \author Rajko Albrecht
39 * 39 *
40 */ 40 */
41 41
42namespace Opie { 42namespace Opie {
43namespace Core {
43 44
44//! simple reference counter class 45//! simple reference counter class
45class ORefCount { 46class ORefCount {
46protected: 47protected:
47 //! reference count member 48 //! reference count member
48 long m_RefCount; 49 long m_RefCount;
49public: 50public:
50 //! first reference must be added after "new" via Pointer() 51 //! first reference must be added after "new" via Pointer()
51 ORefCount() : m_RefCount(0) 52 ORefCount() : m_RefCount(0)
52 {} 53 {}
53 virtual ~ORefCount() {} 54 virtual ~ORefCount() {}
54 //! add a reference 55 //! add a reference
@@ -131,15 +132,16 @@ public:
131 //! supports "if (pointer)" 132 //! supports "if (pointer)"
132 operator bool () const { return (ptr != NULL); } 133 operator bool () const { return (ptr != NULL); }
133 //! "if (pointer)" as non const 134 //! "if (pointer)" as non const
134 operator bool () { return ptr != NULL;} 135 operator bool () { return ptr != NULL;}
135 136
136 //! support if (!pointer)" 137 //! support if (!pointer)"
137 bool operator! () const { return (ptr == NULL); } 138 bool operator! () const { return (ptr == NULL); }
138 //! support if (!pointer)" as non const 139 //! support if (!pointer)" as non const
139 bool operator! () { return (ptr == NULL); } 140 bool operator! () { return (ptr == NULL); }
140}; 141};
141 142
142} 143}
144}
143 145
144#endif 146#endif
145 147