Planeshift

pscache.h

Go to the documentation of this file.
00001 /*
00002  * pscache.h
00003  *
00004  * Copyright (C) 2006 Atomic Blue ([email protected], http://www.atomicblue.org)
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation (version 2 of the License)
00009  * This program 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. See the
00012  * GNU General Public License for more details.
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program; if not, write to the Free Software
00015  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00016  *
00017  * Very simple base class for a cache mechanism, developed specifically for 
00018  * a client-side cache that requires synchronising from the server.
00019  */
00020 
00021 #ifndef PS_CACHE
00022 #define PS_CACHE
00023 
00033 class psCache
00034 {
00035     public:
00036         enum CACHE_STATUS
00037         {
00038             INVALID,
00039             VALID
00040         };
00041 
00042         psCache();
00043         ~psCache();
00044 
00048         CACHE_STATUS GetCacheStatus (void) { return cacheStatus; }
00049 
00053         void SetCacheStatus (CACHE_STATUS newStatus) { cacheStatus = newStatus; }
00054 
00055     protected:
00056         CACHE_STATUS cacheStatus;
00057 };
00058 
00061 #endif
00062