Planeshift
pscache.h
Go to the documentation of this file.
1
/*
2
* pscache.h
3
*
4
* Copyright (C) 2006 Atomic Blue (info@planeshift.it, http://www.atomicblue.org)
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation (version 2 of the License)
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
*
17
* Very simple base class for a cache mechanism, developed specifically for
18
* a client-side cache that requires synchronising from the server.
19
*/
20
21
#ifndef PS_CACHE
22
#define PS_CACHE
23
33
class
psCache
34
{
35
public
:
36
enum
CACHE_STATUS
37
{
38
INVALID
,
39
VALID
40
};
41
42
psCache
();
43
~psCache
();
44
48
CACHE_STATUS
GetCacheStatus
(
void
) {
return
cacheStatus
; }
49
53
void
SetCacheStatus
(
CACHE_STATUS
newStatus) {
cacheStatus
= newStatus; }
54
55
protected
:
56
CACHE_STATUS
cacheStatus
;
57
};
58
61
#endif
62
psCache::psCache
psCache()
psCache::~psCache
~psCache()
psCache::cacheStatus
CACHE_STATUS cacheStatus
Definition:
pscache.h:56
psCache::VALID
Definition:
pscache.h:39
psCache::CACHE_STATUS
CACHE_STATUS
Definition:
pscache.h:36
psCache::SetCacheStatus
void SetCacheStatus(CACHE_STATUS newStatus)
Set cache status.
Definition:
pscache.h:53
psCache
psCache
Definition:
pscache.h:33
psCache::INVALID
Definition:
pscache.h:38
psCache::GetCacheStatus
CACHE_STATUS GetCacheStatus(void)
Return cache status.
Definition:
pscache.h:48
common
util
pscache.h
Generated on Sat Jun 19 2021 05:00:30 for Planeshift by
1.8.11