view common/Matcher.h @ 28:7d8a6167febb classical-rdf

* Begin new text entry / search widget & test utility for it * Improve typing matching methods * Update code to use ObjectLoader/Storer instead of old-style ObjectMapper
author Chris Cannam
date Mon, 01 Mar 2010 16:51:14 +0000
parents
children 8bed05455706
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */

#ifndef _CLASSICAL_DATA_MATCHER_H_
#define _CLASSICAL_DATA_MATCHER_H_

#include <dataquay/Uri.h>

namespace ClassicalData {

class Composer;

class Matcher
{
public:
    virtual Dataquay::UriList match(QString text, int maxResults) const = 0;
};

class ComposerTypingQuickMatcher : public Matcher
{
public:
    ComposerTypingQuickMatcher(QList<Composer *> cl) :
	m_composers(cl) { }
    
    virtual Dataquay::UriList match(QString text, int maxResults) const;

private:
    QList<Composer *> m_composers;
};

class ComposerTypingThoroughMatcher : public Matcher
{
public:
    ComposerTypingThoroughMatcher(QList<Composer *> cl) :
	m_composers(cl) { }
    
    virtual Dataquay::UriList match(QString text, int maxResults) const;

private:
    QList<Composer *> m_composers;
};



}

#endif