Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Attributes | List of all members
WsSearch Class Reference

Instanciates the search. More...

#include <WsSearch.h>

Collaboration diagram for WsSearch:
Collaboration graph

Public Member Functions

 WsSearch (FileSystemTreePtr fst, const std::string &query)
 Constructor for the Search object. More...
 
 ~WsSearch ()
 
int load ()
 Loads all search results. More...
 
int getSize ()
 Loads all search results. More...
 
vector< WsResultItemgetResults (const std::set< std::string > &groups)
 Get list of documents readable by person member of all groups passed in parameter. More...
 
int loadModule ()
 loads the search module. More...
 

Private Attributes

WsAbstractSearchm_searchImpl
 
FileSystemTreePtr m_fst
 
string m_query
 

Detailed Description

Instanciates the search.

When a search is performed, this class is instanciated with the correct params, the search module is then loaded and search performed

Definition at line 34 of file WsSearch.h.

Constructor & Destructor Documentation

WsSearch::WsSearch ( FileSystemTreePtr  fst,
const std::string &  query 
)

Constructor for the Search object.

Parameters
fstthe file system tree in memory
querythe search query to perform

Definition at line 15 of file WsSearch.cpp.

WsSearch::~WsSearch ( )

Definition at line 22 of file WsSearch.cpp.

Member Function Documentation

vector< WsResultItem > WsSearch::getResults ( const std::set< std::string > &  groups)

Get list of documents readable by person member of all groups passed in parameter.

Parameters
groupsset of group names
Returns
an instance of list<ResultItem>

Definition at line 41 of file WsSearch.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int WsSearch::getSize ( )

Loads all search results.

Returns
the total number (unfiltered by access right) of document corresponding to the search query

Definition at line 36 of file WsSearch.cpp.

Here is the call graph for this function:

int WsSearch::load ( )

Loads all search results.

Returns
the number of items found, -1 in case of error

Definition at line 27 of file WsSearch.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int WsSearch::loadModule ( )

loads the search module.

Returns
-1 if failed, other value otherwise

Definition at line 46 of file WsSearch.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

FileSystemTreePtr WsSearch::m_fst
private

Definition at line 73 of file WsSearch.h.

string WsSearch::m_query
private

Definition at line 74 of file WsSearch.h.

WsAbstractSearch* WsSearch::m_searchImpl
private

Definition at line 72 of file WsSearch.h.


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