map2d_widget
cache.h
Go to the documentation of this file.
1 
12 /*
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 */
27 #ifndef CACHE_H
28 #define CACHE_H
29 
30 #include "pureimagecache.h"
31 #include "debugheader.h"
32 
33 namespace core {
34  class Cache
35  {
36  public:
37  static Cache* Instance();
38 
39 
41  QString CacheLocation();
42  void setCacheLocation(const QString& value);
43  void CacheGeocoder(const QString &urlEnd,const QString &content);
44  QString GetGeocoderFromCache(const QString &urlEnd);
45  void CachePlacemark(const QString &urlEnd,const QString &content);
46  QString GetPlacemarkFromCache(const QString &urlEnd);
47  void CacheRoute(const QString &urlEnd,const QString &content);
48  QString GetRouteFromCache(const QString &urlEnd);
49 
50  private:
51  Cache();
52  Cache(Cache const&){}
53  Cache& operator=(Cache const&){ return *this; }
54  static Cache* m_pInstance;
55  QString cache;
56  QString routeCache;
57  QString geoCache;
58  QString placemarkCache;
59  };
60 
61 }
62 #endif // CACHE_H
QString CacheLocation()
Definition: cache.cpp:48
QString GetGeocoderFromCache(const QString &urlEnd)
Definition: cache.cpp:60
PureImageCache ImageCache
Definition: cache.h:40
Definition: accessmode.h:35
void CacheRoute(const QString &urlEnd, const QString &content)
void CacheGeocoder(const QString &urlEnd, const QString &content)
Definition: cache.cpp:89
QString GetPlacemarkFromCache(const QString &urlEnd)
Definition: cache.cpp:128
void setCacheLocation(const QString &value)
Definition: cache.cpp:40
Definition: cache.h:34
QString GetRouteFromCache(const QString &urlEnd)
static Cache * Instance()
Definition: cache.cpp:33
void CachePlacemark(const QString &urlEnd, const QString &content)
Definition: cache.cpp:157
Definition: pureimagecache.h:46