Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

com::cosylab::logging::search::SearchEngine Class Reference

List of all members.

Public Member Functions

 SearchEngine (LogEntryTable let)
int find (String searchString, boolean caseSensitive, boolean wholeWord, boolean forwardSearch, boolean[] cols)
int find (Pattern regExp, boolean forwardSearch, boolean[] cols)

Private Member Functions

int find (Pattern regExp, String searchString, boolean caseSensitive, boolean wholeWord, boolean forwardSearch, boolean[] cols)
boolean matches (Object obj, Pattern regExp, String searchString, boolean caseSensitive, boolean wholeWord)
int getStartingRow (boolean forward)

Private Attributes

LogTableDataModel logTableDataModel
LogEntryTable logEntryTable

Detailed Description

Author:
acaproni
Objects of this class search the logs for a string The method that activates the search is find (overloaded)


Constructor & Destructor Documentation

com::cosylab::logging::search::SearchEngine::SearchEngine LogEntryTable  let  )  [inline]
 

The constructor

Parameters:
ltdm The LogTableDataModel of the main window


Member Function Documentation

int com::cosylab::logging::search::SearchEngine::find Pattern  regExp,
String  searchString,
boolean  caseSensitive,
boolean  wholeWord,
boolean  forwardSearch,
boolean[]  cols
[inline, private]
 

The method executes the search for both the public overloaded find methods.

Parameters:
regExp The regular expression to look for in the logs null if the method search for a string
searchString The string to look for in the logs null if the method search for a reg exp
caseSensitive If true performs a CaseSensitive search Ignored for reg exp searchs (it is coded in the Pattern)
wholeWord If true look for the whole word int the column Ignored for reg exp searchs
forwardSearch If true search forward otherwise backward
cols The columns of each log tool for the string
Returns:
-1 if no log is found otherwise the row containing the string/reg exp

int com::cosylab::logging::search::SearchEngine::find Pattern  regExp,
boolean  forwardSearch,
boolean[]  cols
[inline]
 

Search the log for a regular expression

Parameters:
regExp The regular expression to look for in the logs
forwardSearch If true search forward otherwise backward
cols The columns of each log tool for the string
Returns:
-1 if no log is found otherwise the row containing the log

int com::cosylab::logging::search::SearchEngine::find String  searchString,
boolean  caseSensitive,
boolean  wholeWord,
boolean  forwardSearch,
boolean[]  cols
[inline]
 

Search the logs for a string

Parameters:
searchString The string to look for in the logs
caseSensitive If true performs a CaseSensitive search
wholeWord If true look for the whole word int the column
forwardSearch If true search forward otherwise backward
cols The columns of each log tool for the string
Returns:
-1 if no log is found otherwise the row containing the log

int com::cosylab::logging::search::SearchEngine::getStartingRow boolean  forward  )  [inline, private]
 

Get the starting row number for a search.

Returns:
The selected row in the table of the main window or the first/last row if no row is selected by the user (depending if the search is backward or forward)

boolean com::cosylab::logging::search::SearchEngine::matches Object  obj,
Pattern  regExp,
String  searchString,
boolean  caseSensitive,
boolean  wholeWord
[inline, private]
 

Check if the given object matches the search criteria

Parameters:
obj The object to check (it should be a string or a way to convert the obj to a string must be known)
regExp The regular expression to look for in the logs null if the method search for a string
searchString The string to look for in the logs null if the method search for a reg exp
caseSensitive If true performs a CaseSensitive search Ignored for reg exp searchs (it is coded in the Pattern)
wholeWord If true look for the whole word int the column Ignored for reg exp searchs
Returns:
true if the object matches the serach criteria


Member Data Documentation

LogEntryTable com::cosylab::logging::search::SearchEngine::logEntryTable [private]
 

The JTable of the logs

LogTableDataModel com::cosylab::logging::search::SearchEngine::logTableDataModel [private]
 

The reference to the table data model


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:13:14 2009 for ACS Java API by doxygen 1.3.8