summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2014-06-02 12:33:13 +0000
committerrandomdan <randomdan@localhost>2014-06-02 12:33:13 +0000
commit498ebe7d0cef4b22f57cf48aac9ad61ff7d3ba63 (patch)
tree9ab2466ccf846cd9db1e347b4177c8e7d1e267d9
parentSplit out ICE support from project jam file, add support for slicer (diff)
downloadproject2-498ebe7d0cef4b22f57cf48aac9ad61ff7d3ba63.tar.bz2
project2-498ebe7d0cef4b22f57cf48aac9ad61ff7d3ba63.tar.xz
project2-498ebe7d0cef4b22f57cf48aac9ad61ff7d3ba63.zip
Fix naming clash with 'cache'
-rw-r--r--project2/basics/caches/memoryCache.cpp6
-rw-r--r--project2/common/rowProcessor.cpp2
-rw-r--r--project2/common/rowProcessor.h6
-rw-r--r--project2/common/rowSetCache.cpp (renamed from project2/common/cache.cpp)8
-rw-r--r--project2/common/rowSetCache.h (renamed from project2/common/cache.h)10
-rw-r--r--project2/sql/sqlCache.cpp6
-rw-r--r--project2/xml/xmlCache.cpp6
7 files changed, 22 insertions, 22 deletions
diff --git a/project2/basics/caches/memoryCache.cpp b/project2/basics/caches/memoryCache.cpp
index 7ab271e..ee4f9b3 100644
--- a/project2/basics/caches/memoryCache.cpp
+++ b/project2/basics/caches/memoryCache.cpp
@@ -1,6 +1,6 @@
#include <pch.hpp>
#include "logger.h"
-#include "cache.h"
+#include "rowSetCache.h"
#include <boost/foreach.hpp>
#include "options.h"
#include "rowSet.h"
@@ -10,7 +10,7 @@
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/ordered_index.hpp>
-class MemoryCache : public Cache {
+class MemoryCache : public RowSetCache {
public:
typedef std::vector<VariableType> Key;
class CachedRowSet : public RowSet, public RowSetPresenter {
@@ -96,7 +96,7 @@ class MemoryCache : public Cache {
> > CacheStore;
MemoryCache(ScriptNodePtr p) :
- Cache(p)
+ RowSetCache(p)
{
}
diff --git a/project2/common/rowProcessor.cpp b/project2/common/rowProcessor.cpp
index 7ffaf7f..85cd698 100644
--- a/project2/common/rowProcessor.cpp
+++ b/project2/common/rowProcessor.cpp
@@ -32,7 +32,7 @@ RowProcessor::execute(ExecContext * ec, const RowProcessorCallback & cb) const
boost::bind(&RowProcessor::saveCaches, this, ec),
boost::bind((CROE ? &RowProcessor::saveCaches : &RowProcessor::discardCaches), this, ec),
boost::bind(&TargetCaches::clear, &tc));
- BOOST_FOREACH(const CachePtr & c, caches) {
+ BOOST_FOREACH(const auto & c, caches) {
if (c->checkAndExecute(ec, source->name, filter, this, cb)) {
return;
}
diff --git a/project2/common/rowProcessor.h b/project2/common/rowProcessor.h
index 70f453c..ca36b32 100644
--- a/project2/common/rowProcessor.h
+++ b/project2/common/rowProcessor.h
@@ -5,7 +5,7 @@
#include "sourceObject.h"
#include "iHaveParameters.h"
#include "rowSet.h"
-#include "cache.h"
+#include "rowSetCache.h"
#include "test.h"
#include "scriptStorage.h"
@@ -33,9 +33,9 @@ class RowProcessor : public IHaveParameters {
void rowReadyInternal(const RowState *, const RowProcessorCallback &, ExecContext *) const;
typedef ANONSTORAGEOF(Test) Tests;
Tests tests;
- typedef ANONORDEREDSTORAGEOF(Cache) Caches;
+ typedef ANONORDEREDSTORAGEOF(RowSetCache) Caches;
Caches caches;
- typedef boost::tuple<RowSetPresenterPtr, CachePtr> TargetCache;
+ typedef boost::tuple<RowSetPresenterPtr, RowSetCachePtr> TargetCache;
typedef boost::shared_ptr<TargetCache> TargetCachePtr;
typedef std::set<TargetCachePtr> TargetCaches;
mutable TargetCaches tc;
diff --git a/project2/common/cache.cpp b/project2/common/rowSetCache.cpp
index 2a1d410..23ae177 100644
--- a/project2/common/cache.cpp
+++ b/project2/common/rowSetCache.cpp
@@ -1,19 +1,19 @@
#include <pch.hpp>
-#include "cache.h"
+#include "rowSetCache.h"
#include "rowSet.h"
#include "rowProcessor.h"
#include "logger.h"
#include <boost/foreach.hpp>
#include <glibmm/exception.h>
-Cache::Cache(ScriptNodePtr p) :
+RowSetCache::RowSetCache(ScriptNodePtr p) :
IHaveParameters(p),
SourceObject(p),
inherit(p->value("inherit", true, NULL).as<bool>())
{
}
-bool Cache::checkAndExecute(ExecContext * ec, const Glib::ustring & n, const Glib::ustring & f, const IHaveParameters * p, const RowProcessorCallback & rp)
+bool RowSetCache::checkAndExecute(ExecContext * ec, const Glib::ustring & n, const Glib::ustring & f, const IHaveParameters * p, const RowProcessorCallback & rp)
{
RowSetCPtr cached = getCachedRowSet(ec, n, f, p);
if (cached) {
@@ -36,7 +36,7 @@ bool Cache::checkAndExecute(ExecContext * ec, const Glib::ustring & n, const Gli
}
void
-Cache::applyKeys(ExecContext * ec, const KeyApplier & f, const IHaveParameters * ps) const
+RowSetCache::applyKeys(ExecContext * ec, const KeyApplier & f, const IHaveParameters * ps) const
{
BOOST_FOREACH(const IHaveParameters::Parameters::value_type & p, allParameters()) {
f(p.first, p.second(ec));
diff --git a/project2/common/cache.h b/project2/common/rowSetCache.h
index 0806c6f..055b07e 100644
--- a/project2/common/cache.h
+++ b/project2/common/rowSetCache.h
@@ -1,5 +1,5 @@
-#ifndef CACHE_H
-#define CACHE_H
+#ifndef ROWSETCACHE_H
+#define ROWSETCACHE_H
#include "sourceObject.h"
#include "presenter.h"
@@ -10,9 +10,9 @@ class RowSet;
class RowState;
typedef boost::intrusive_ptr<const RowSet> RowSetCPtr;
-class Cache : public IHaveParameters, public SourceObject {
+class RowSetCache : public IHaveParameters, public SourceObject {
public:
- Cache(ScriptNodePtr p);
+ RowSetCache(ScriptNodePtr p);
bool checkAndExecute(ExecContext *, const Glib::ustring &, const Glib::ustring &, const IHaveParameters *, const RowProcessorCallback &);
virtual RowSetPresenterPtr openFor(ExecContext *, const Glib::ustring &, const Glib::ustring &, const IHaveParameters *) = 0;
@@ -25,7 +25,7 @@ class Cache : public IHaveParameters, public SourceObject {
void applyKeys(ExecContext * ec, const KeyApplier & f, const IHaveParameters * ps) const;
const bool inherit;
};
-typedef boost::intrusive_ptr<Cache> CachePtr;
+typedef boost::intrusive_ptr<RowSetCache> RowSetCachePtr;
#endif
diff --git a/project2/sql/sqlCache.cpp b/project2/sql/sqlCache.cpp
index 2d40bdd..c495528 100644
--- a/project2/sql/sqlCache.cpp
+++ b/project2/sql/sqlCache.cpp
@@ -1,5 +1,5 @@
#include <pch.hpp>
-#include "cache.h"
+#include "rowSetCache.h"
#include "sqlVariableBinder.h"
#include "sqlHandleAsVariableType.h"
#include "buffer.h"
@@ -20,10 +20,10 @@
typedef boost::shared_ptr<DB::SelectCommand> SelectPtr;
typedef boost::shared_ptr<DB::ModifyCommand> ModifyPtr;
-class SqlCache : public Cache {
+class SqlCache : public RowSetCache {
public:
SqlCache(ScriptNodePtr p) :
- Cache(p),
+ RowSetCache(p),
db(NULL)
{
}
diff --git a/project2/xml/xmlCache.cpp b/project2/xml/xmlCache.cpp
index 85ef689..bfa9c91 100644
--- a/project2/xml/xmlCache.cpp
+++ b/project2/xml/xmlCache.cpp
@@ -1,5 +1,5 @@
#include <pch.hpp>
-#include "cache.h"
+#include "rowSetCache.h"
#include "logger.h"
#include "scriptLoader.h"
#include "iHaveParameters.h"
@@ -12,10 +12,10 @@
#include <boost/filesystem/convenience.hpp>
#include <libxml++/document.h>
-class XmlCache : public Cache {
+class XmlCache : public RowSetCache {
public:
XmlCache(ScriptNodePtr p) :
- Cache(p)
+ RowSetCache(p)
{
}