draft test to verify behaviour
but doesn't work; somehow the filterfunciton of the baseclass gets installed
This commit is contained in:
parent
a8dcd9f494
commit
fab1c699ea
2 changed files with 13 additions and 2 deletions
|
|
@ -87,7 +87,7 @@ namespace session {
|
|||
typedef function<bool(Pla)> ContentFilter;
|
||||
|
||||
/** yield an additional filter to be applied
|
||||
* on the result set. */
|
||||
* to the result set. */
|
||||
virtual ContentFilter buildContentFilter() const =0;
|
||||
};
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ namespace session {
|
|||
ContentFilter
|
||||
contentFilter () const
|
||||
{
|
||||
return buildContentFilter();
|
||||
return buildContentFilter(); ////////////////////////FIXME why isn't this dispatched via VTABLE?????
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,15 @@ namespace test {
|
|||
using std::string;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
namespace {
|
||||
bool
|
||||
filterfunk (Placement<DummyMO> const& candidate)
|
||||
{
|
||||
string desc = candidate->operator string();
|
||||
cout << "prüfe..." << desc << endl;
|
||||
return desc == "TestSubMO2";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************************************
|
||||
|
|
@ -73,6 +82,8 @@ namespace test {
|
|||
discover (ScopeQuery<DummyMO> (resolver,scope, CONTENTS) , "contents depth-first, filtered to DummyMO"); ////////////////////// TICKET #532
|
||||
discover (ScopeQuery<TestSubMO1> (resolver,scope, CONTENTS) , "contents depth-first, filtered to TestSubMO1");
|
||||
discover (ScopeQuery<TestSubMO2> (resolver,scope, CONTENTS) , "contents depth-first, filtered to TestSubMO2");
|
||||
|
||||
discover (SpecificContentsQuery<DummyMO> (resolver,scope, &filterfunk) , "contents depth-first, custom filtered DummyMO");
|
||||
|
||||
ScopeQuery<TestSubMO21> specialEl(resolver,scope, CONTENTS);
|
||||
++specialEl; // step in to second solution found...
|
||||
|
|
|
|||
Loading…
Reference in a new issue