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

osmartpointer.cpp

Go to the documentation of this file.
00001 // -*- Mode: C++; -*-
00002 /*
00003                             This file is part of the Opie Project
00004                             Copyright (C) 2004 Rajko Albrecht <alwin@handhelds.org>
00005                             Copyright (C) The Opie Team <opie-devel@handhelds.org>
00006              =.
00007            .=l.
00008           .>+-=
00009 _;:,     .>    :=|.         This program is free software; you can
00010 .> <`_,   >  .   <=         redistribute it and/or  modify it under
00011 :`=1 )Y*s>-.--   :          the terms of the GNU Library General Public
00012 .="- .-=="i,     .._        License as published by the Free Software
00013 - .   .-<_>     .<>         Foundation; either version 2 of the License,
00014     ._= =}       :          or (at your option) any later version.
00015    .%`+i>       _;_.
00016    .i_,=:_.      -<s.       This program is distributed in the hope that
00017     +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00018    : ..    .:,     . . .    without even the implied warranty of
00019    =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00020  _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00021 ..}^=.=       =       ;     Library General Public License for more
00022 ++=   -.     .`     .:      details.
00023 :     =  ...= . :.=-
00024 -.   .:....=;==+<;          You should have received a copy of the GNU
00025  -_. . .   )=.  =           Library General Public License along with
00026    --        :-=`           this library; see the file COPYING.LIB.
00027                             If not, write to the Free Software Foundation,
00028                             Inc., 59 Temple Place - Suite 330,
00029                             Boston, MA 02111-1307, USA.
00030 */
00031 
00032 #include "osmartpointer.h"
00033 
00034 namespace Opie {
00035 namespace Core {
00036 
00037 ORefCount::ORefCount()
00038     : m_RefCount(0)
00039 {}
00040 
00041 ORefCount::~ORefCount()
00042 {}
00043 
00044 void ORefCount::Incr() {
00045     ++m_RefCount;
00046 }
00047 
00048 void ORefCount::Decr() {
00049     --m_RefCount;
00050 }
00051 
00052 bool ORefCount::Shared() {
00053     return (m_RefCount > 0);
00054 }
00055 
00056 }
00057 }

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