summaryrefslogtreecommitdiff
authoralwin <alwin>2004-03-12 19:18:29 (UTC)
committer alwin <alwin>2004-03-12 19:18:29 (UTC)
commit874d5a34eca296263dcd1adf857aebe9981825a1 (patch) (unidiff)
treea7b60a4d2a4de379ee4370dada0a76a8b2b3b4ee
parent590587e74b908460a275b1f58654bcf4cce5d175 (diff)
downloadopie-874d5a34eca296263dcd1adf857aebe9981825a1.zip
opie-874d5a34eca296263dcd1adf857aebe9981825a1.tar.gz
opie-874d5a34eca296263dcd1adf857aebe9981825a1.tar.bz2
renaming
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/osmartpointer.h (renamed from libopie2/opiecore/osmart_pointer.h)27
1 files changed, 14 insertions, 13 deletions
diff --git a/libopie2/opiecore/osmart_pointer.h b/libopie2/opiecore/osmartpointer.h
index 2a2518f..9000e71 100644
--- a/libopie2/opiecore/osmart_pointer.h
+++ b/libopie2/opiecore/osmartpointer.h
@@ -30,9 +30,9 @@ _;:, .> :=|. This program is free software; you can
30*/ 30*/
31 31
32#ifndef _osmart_pointer_h 32#ifndef _OSmartPointer_h
33#define _osmart_pointer_h 33#define _OSmartPointer_h
34 34
35/*! 35/*!
36 * \file osmart_pointer.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
@@ -43,5 +43,5 @@ namespace Opie {
43 43
44//! simple reference counter class 44//! simple reference counter class
45class oref_count { 45class ORefCount {
46protected: 46protected:
47 //! reference count member 47 //! reference count member
@@ -49,7 +49,7 @@ protected:
49public: 49public:
50 //! first reference must be added after "new" via Pointer() 50 //! first reference must be added after "new" via Pointer()
51 oref_count() : m_RefCount(0) 51 ORefCount() : m_RefCount(0)
52 {} 52 {}
53 virtual ~oref_count() {} 53 virtual ~ORefCount() {}
54 //! add a reference 54 //! add a reference
55 void Incr() { 55 void Incr() {
@@ -65,5 +65,5 @@ public:
65 65
66//! reference counting wrapper class 66//! reference counting wrapper class
67template<class T> class osmart_pointer { 67template<class T> class OSmartPointer {
68 //! pointer to object 68 //! pointer to object
69 /*! 69 /*!
@@ -75,5 +75,5 @@ template<class T> class osmart_pointer {
75public: 75public:
76 //! standart constructor 76 //! standart constructor
77 osmart_pointer() { ptr = NULL; } 77 OSmartPointer() { ptr = NULL; }
78 //! standart destructor 78 //! standart destructor
79 /*! 79 /*!
@@ -81,5 +81,5 @@ public:
81 * ptr 81 * ptr
82 */ 82 */
83 ~osmart_pointer() 83 ~OSmartPointer()
84 { 84 {
85 if (ptr){ 85 if (ptr){
@@ -90,10 +90,10 @@ public:
90 } 90 }
91 //! construction 91 //! construction
92 osmart_pointer(T* t) { if (ptr = t) ptr->Incr(); } 92 OSmartPointer(T* t) { if (ptr = t) ptr->Incr(); }
93 //! Pointer copy 93 //! Pointer copy
94 osmart_pointer(const osmart_pointer<T>& p) 94 OSmartPointer(const OSmartPointer<T>& p)
95 { if (ptr = p.ptr) ptr->Incr(); } 95 { if (ptr = p.ptr) ptr->Incr(); }
96 //! pointer copy by assignment 96 //! pointer copy by assignment
97 osmart_pointer<T>& operator= (const osmart_pointer<T>& p) 97 OSmartPointer<T>& operator= (const OSmartPointer<T>& p)
98 { 98 {
99 // already same: nothing to do 99 // already same: nothing to do
@@ -105,5 +105,5 @@ public:
105 return *this; 105 return *this;
106 } 106 }
107 osmart_pointer<T>& operator= (T*p) 107 OSmartPointer<T>& operator= (T*p)
108 { 108 {
109 if (ptr==p)return *this; 109 if (ptr==p)return *this;
@@ -143,2 +143,3 @@ public:
143 143
144#endif 144#endif
145