]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsCache.C
Baruch's graphics-patch + minipage-support in tabular-cells.
[lyx.git] / src / graphics / GraphicsCache.C
1 // -*- C++ -*-
2 /* This file is part of
3  * =================================================
4  * 
5  *          LyX, The Document Processor
6  *          Copyright 1995 Matthias Ettrich.
7  *          Copyright 1995-2000 The LyX Team.
8  *
9  *          This file Copyright 2000 Baruch Even
10  * ================================================= */
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include <config.h>
17 #include "GraphicsCache.h"
18
19 GraphicsCache * 
20 GraphicsCache::getInstance()
21 {
22     if (! singleton) {
23         singleton = new GraphicsCache;
24     }
25
26     return singleton;
27 }
28
29
30 GraphicsCacheItem * 
31 GraphicsCache::addFile(string filename)
32 {
33     CacheType::const_iterator it = cache.find(filename);
34     
35     if (it != cache.end()) {
36         return (*it).second;
37     }
38     // INCOMPLETE!
39     return 0;
40 }
41
42 void
43 GraphicsCache::removeFile(string filename)
44 {
45     CacheType::const_iterator it = cache.find(filename);
46     
47     if (it != cache.end()) {
48         // INCOMPLETE!
49 //        cache.erase(it);
50     }
51 }