Debian Codegraph @

Framework/Pantomime/CWCacheManager.m

raw
1 /*
2 ** CWCacheManager.m
3 **
4 ** Copyright (c) 2004-2007 Ludovic Marcotte
5 ** Copyright (C) 2013-2020 Riccardo Mottola
6 **
7 ** Author: Ludovic Marcotte <[email protected]>
8 ** Riccardo Mottola
9 **
10 ** This library is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU Lesser General Public
12 ** License as published by the Free Software Foundation; either
13 ** version 2.1 of the License, or (at your option) any later version.
14 **
15 ** This library is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** Lesser General Public License for more details.
19 **
20 ** You should have received a copy of the GNU General Public License
21 ** along with this program. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24 #import <Pantomime/CWCacheManager.h>
25 #import <Pantomime/CWConstants.h>
26
27 #import <Foundation/NSArchiver.h>
28 #import <Foundation/NSException.h>
29
30 @implementation CWCacheManager
31
32 - (id) initWithPath: (NSString *) thePath
33 {
34 if ((self = [super init]))
35 {
36 ASSIGN(_path, thePath);
37 }
38
39 return self;
40 }
41
42
43 //
44 //
45 //
46 - (void) dealloc
47 {
48 RELEASE(_path);
49 [super dealloc];
50 }
51
52 //
53 //
54 //
55 - (NSString *) path
56 {
57 return _path;
58 }
59
60 - (void) setPath: (NSString *) thePath
61 {
62 ASSIGN(_path, thePath);
63 }
64
65
66 //
67 //
68 //
69 - (void) invalidate
70 {
71 //[_cache removeAllObjects];
72 }
73
74 //
75 //
76 //
77 - (BOOL) synchronize
78 {
79 [self subclassResponsibility: _cmd];
80 return NO;
81 }
82
83 //
84 //
85 //
86 - (void) expunge
87 {
88 [self subclassResponsibility: _cmd];
89 }
90
91 //
92 //
93 //
94 - (NSUInteger) count
95 {
96 return _count;
97 }
98
99 @end