akregator/src

shared.h

00001 /*
00002  * tools_p.h
00003  *
00004  * Copyright (c) 2001, 2002, 2003 Frerich Raabe <raabe@kde.org>
00005  *
00006  * This program is distributed in the hope that it will be useful, but WITHOUT
00007  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00008  * FOR A PARTICULAR PURPOSE. For licensing and distribution details, check the
00009  * accompanying file 'COPYING'.
00010  */
00011 #ifndef AKREGATOR_SHARED_H
00012 #define AKREGATOR_SHARED_H
00013 
00014 namespace Akregator
00015 {
00016     struct Shared
00017     {
00018         Shared() : count(1) { }
00019         void ref() { count++; }
00020         bool deref() { return !--count; }
00021         unsigned int count;
00022     };
00023 
00024 }
00025 
00026 #endif // AKREGATOR_SHARED_H
00027 
KDE Home | KDE Accessibility Home | Description of Access Keys