00001 /******************************************************************************* 00002 00003 Copyright (C) 2007 by Brendon Costa 00004 00005 This library is free software; you can redistribute it and/or modify 00006 it under the terms of the "LGPL Like" License defined in the file COPYING 00007 that should have been distributed along with this source. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 You should have received a copy of the "LGPL Like" License 00014 along with this library; see the file COPYING. if not, it can be 00015 obtained from the EDoc++ website: 00016 http://edoc.sourceforge.net/license.html 00017 00018 *******************************************************************************/ 00019 #ifndef EDOC_MANAGEDFILECLEANUPIFACE_H 00020 #define EDOC_MANAGEDFILECLEANUPIFACE_H 00021 00022 namespace EDoc 00023 { 00024 class ManagedFile; 00025 00026 00027 //=========================================================================== 00028 /** \brief 00029 */ 00030 class ManagedFileCleanupIFace 00031 { 00032 friend class ManagedFile; 00033 00034 public: 00035 00036 //------------------------------------------------------------------------ 00037 /** \brief Create a new Managed file with a ref count of 0. 00038 */ 00039 ManagedFileCleanupIFace() : 00040 ref_count(0) 00041 { 00042 } 00043 00044 //------------------------------------------------------------------------ 00045 /** \brief Derived classes cleanup on destruction. 00046 */ 00047 virtual ~ManagedFileCleanupIFace() {} 00048 00049 //------------------------------------------------------------------------ 00050 00051 private: 00052 00053 //------------------------------------------------------------------------ 00054 /** \brief The current reference count for the managed file cleanup object. 00055 */ 00056 int ref_count; 00057 00058 //------------------------------------------------------------------------ 00059 00060 }; 00061 //=========================================================================== 00062 } 00063 00064 #endif // EDOC_MANAGEDFILECLEANUPIFACE_H