Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
unity::scopes::SearchListenerBase Class Referenceabstract

Abstract base interface that a scope specializes to receive the results of a query. More...

#include <unity/scopes/SearchListenerBase.h>

Inheritance diagram for unity::scopes::SearchListenerBase:

Public Member Functions

virtual void push (DepartmentList const &departments, std::string const &current_department_id)
 Called at most once by the scopes run time for a list of departments returned by a query. More...
 
virtual void push (CategorisedResult result)=0
 Called once by the scopes run time for each result that is returned by a query().
 
virtual void push (Annotation annotation)
 Called once by the scopes run time for each annotation that is returned by a query(). More...
 
virtual void push (Category::SCPtr category)
 Called once by the scopes run time for each category that is returned by a query(). More...
 
virtual void push (Filters const &filters, FilterState const &filter_state)
 Called once by the scopes to send all the filters and their state. More...
 
- Public Member Functions inherited from unity::scopes::ListenerBase
virtual void finished (Reason r, std::string const &error_message)=0
 Called once by the scopes run time after the final result for a query() was sent. More...
 

Additional Inherited Members

- Public Types inherited from unity::scopes::ListenerBase
enum  Reason { Finished, Cancelled, Error }
 Indicates the cause of a call to finished(). More...
 

Detailed Description

Abstract base interface that a scope specializes to receive the results of a query.

An instance of this interface must be passed to Scope::create_query(). Results for the query are delivered to the instance by the scopes run time by invoking the appropriate push method.

If a scope throw an exception from one of the push() methods, the scopes run time calls ListenerBase::finished() with an 'Error' reason.

Member Function Documentation

virtual void unity::scopes::SearchListenerBase::push ( DepartmentList const &  departments,
std::string const &  current_department_id 
)
virtual

Called at most once by the scopes run time for a list of departments returned by a query.

The default implementation does nothing.

virtual void unity::scopes::SearchListenerBase::push ( Annotation  annotation)
virtual

Called once by the scopes run time for each annotation that is returned by a query().

The default implementation does nothing.

virtual void unity::scopes::SearchListenerBase::push ( Category::SCPtr  category)
virtual

Called once by the scopes run time for each category that is returned by a query().

The default implementation does nothing. Receipt of categories may be interleaved with the receipt of results, that is, there is no guarantee that the complete set of categories will be provided before the first query result.

virtual void unity::scopes::SearchListenerBase::push ( Filters const &  filters,
FilterState const &  filter_state 
)
virtual

Called once by the scopes to send all the filters and their state.

The default implementation does nothing.


The documentation for this class was generated from the following file: