Query

This class represents the abstraction of a "text search query". A Query maintains two text strings, one representing a string of text to be searched for (the "search" string) and one representing the outcome of the search (the "result" string). The Query does not engage in the search but simply provides a container for the input to a search and the results. Get and set methods are provided for each of the two strings (the search string and the result string). In addition, the user may be asked to supply the search string through a modal dialogue.

[ Index | Source | Summary | Member Functions ]

Quick Index


Class Summary

class Query
{

public:
Query (char* searchText);
Query();
void SetSearch(char* searchText);
char* GetSearch();
void AskUser();
void SetResult(char* resultText);
char* GetResult();
~Query();
}; // Query

Back to the top of Query


Query (char* searchText);

Construct a Query object with a given search string.

  Query (char* searchText);

Back to the top of Query


Query();

Construct a Query object with an undefined search string. Presumably, the SetSearch method will be used later to define the search string.

  Query();

Back to the top of Query


void SetSearch(char* searchText);

Set the search string to a given text string. This method allows the search string, if any, given at the time of construction to be changed. The previous search string is deleted. This method also allows the same Query object to be used for different searches.

  void   SetSearch(char* searchText);

Back to the top of Query


char* GetSearch();

Return a copy of the current search string of the Query object. This method does not change the search string.

  char*  GetSearch();

Back to the top of Query


void AskUser();

Initiate a modal dialogue in which the user enters a text string that is assigned as the current search string. The method does not return until the user has finished with the dialogue.

  void AskUser();

Back to the top of Query


void SetResult(char* resultText);

Set the result string to a given text string. This method would be called by an object performing a search (see the File class). Any previous result string is deleted.

  void   SetResult(char* resultText);

Back to the top of Query


char* GetResult();

Return a copy of the current result string. This method does not change the Query object's result string.

  char*  GetResult();

Back to the top of Query


~Query();

Reclaim the resources (the search and result strings) when the Query object is deleted.

  ~Query();

Back to the top of Query


Member Functions

public:
void SetSearch(char* searchText);
char* GetSearch();
void AskUser();
void SetResult(char* resultText);
char* GetResult();

Back to the top of Query


Generated from source by the Cocoon utilities on Thu Apr 02 12:39:41 1998 .

Report problems to jkotula@unimax.com