Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsAbstractSearch.h
Go to the documentation of this file.
1 /*
2  *
3  * Filename: WsAbstractSearch.h
4  *
5  * Description:
6  *
7  * Created: 03/08/2012 02:22:18 PM
8  *
9  * Author: Benoit Daccache, ben.daccache@gmail.com
10  *
11  */
12 #ifndef WS_ABSTRACT_SEARCH_H__
13 #define WS_ABSTRACT_SEARCH_H__
14 
15 
16 #include "WsResultItem.h"
17 #include <Logger/WsLogger.h>
19 
20 #include <iostream>
21 #include <stdio.h>
22 #include <list>
23 #include <set>
24 
25 
32 
33 public:
37  virtual ~WsAbstractSearch();
38 
43  virtual int load(FileSystemTreePtr fs, std::string q) = 0;
44 
48  virtual int getSize() = 0;
49 
57  virtual vector<WsResultItem> getResults(const std::set<std::string>& groups) = 0;
58 
59 };
60 
61 #endif
62 
63 
virtual vector< WsResultItem > getResults(const std::set< std::string > &groups)=0
return the results found for the query filtered for the user
virtual int load(FileSystemTreePtr fs, std::string q)=0
load the results (execute the search query)
virtual int getSize()=0
return the number of results found
Abstract class for search.
boost::shared_ptr< WsFileSystemTree > FileSystemTreePtr
virtual ~WsAbstractSearch()
virtual destructor
Structure representing all the fs tree from the root.