diff options
| -rw-r--r-- | project2/common/rowProcessor.cpp | 6 | ||||
| -rw-r--r-- | project2/common/rowProcessor.h | 3 | 
2 files changed, 8 insertions, 1 deletions
diff --git a/project2/common/rowProcessor.cpp b/project2/common/rowProcessor.cpp index e2ce6ba..a52efc5 100644 --- a/project2/common/rowProcessor.cpp +++ b/project2/common/rowProcessor.cpp @@ -4,6 +4,7 @@  #include "commonObjects.h"  #include "scopeObject.h"  #include <boost/foreach.hpp> +#include <boost/algorithm/string/predicate.hpp>  RowProcessor::RowProcessor(ScriptNodePtr p) :  	IHaveParameters(p), @@ -13,6 +14,7 @@ RowProcessor::RowProcessor(ScriptNodePtr p) :  	IRSE(p->value("ignoreRowSourceError", false))  {  	p->script->loader.addLoadTarget(p, Storer::into<ElementLoader>(&caches)); +	p->script->loader.addLoadTarget(p, Storer::into<ElementLoader>(&tests));  }  void @@ -78,6 +80,8 @@ RowProcessor::rowReadyInternal(const RowState * rs) const  		rs->foreachAttr(boost::bind(&RowSetPresenter::addAttribute, c->get<0>(), _1, _2));  		c->get<0>()->finishRow();  	} -	rowReady(rs); +	if (boost::algorithm::all(tests, boost::bind(&Test::passes, _1))) { +		rowReady(rs); +	}  } diff --git a/project2/common/rowProcessor.h b/project2/common/rowProcessor.h index cee9e41..cbbf6c3 100644 --- a/project2/common/rowProcessor.h +++ b/project2/common/rowProcessor.h @@ -6,6 +6,7 @@  #include "iHaveParameters.h"  #include "rowSet.h"  #include "cache.h" +#include "test.h"  #include "scriptStorage.h"  class Presenter; @@ -29,6 +30,8 @@ class RowProcessor : public IHaveParameters {  		friend class RowState;  		void rowReadyInternal(const RowState *) const;  		virtual void rowReady(const RowState *) const = 0; +		typedef ANONSTORAGEOF(Test) Tests; +		Tests tests;  		typedef ANONORDEREDSTORAGEOF(Cache) Caches;  		Caches caches;  		typedef boost::tuple<RowSetPresenterPtr, CachePtr> TargetCache;  | 
