Base class for DFileConverter, DIndexJob, DIndexMergeJob, DIndexListJob, DSearchJob, and DSearchReportJob.
File
File: dtsfc.h
Namespace: dtSearch
Syntax
Group
Members
Methods
Show:
No members matching the current filter
Method |
Description |
---|---|
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. | |
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. | |
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. The reason parameter is purely for diagnostic purposes. | |
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. The reason parameter is purely for diagnostic purposes. | |
Called to execute a job. | |
Returns non-zero if the job failed | |
Format all errors that occurred during execution as a single string, with line breaks separating the errors | |
Returns the number of errors recorded during execution | |
Returns a dtsErrorInfo with any errors that occurred during execution | |
Returns true if the job has been cancelled | |
Returns true if the job has started and is not yet done. | |
Called while a job is executing every time the dtSearch Engine checks to see if the job has been cancelled. | |
Called while a job is executing if an error is encountered, with the error code and message. | |
Not used | |
SetTimeout() causes a job to cancel automatically after the specified number of seconds | |
Do not pump waiting windows messages during callbacks | |
Optional reason for job cancellation, purely for diagnostic purposes Checks to make sure the reason is not already present, and also guards against excessive string size in case of repetitive cancellations. | |
Write an error message to the error handler object attached to this job |
Methods
Show:
No members matching the current filter
Method |
Description |
---|---|
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. | |
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. | |
Requests immediate termination of the job in progress. Indexing jobs will be halted without saving anything in the index. The reason parameter is purely for diagnostic purposes. | |
Requests termination of the job in progress. For indexing jobs, the job will be halted after information in documents already indexed is saved in the index. The reason parameter is purely for diagnostic purposes. | |
Called to execute a job. | |
Returns non-zero if the job failed | |
Format all errors that occurred during execution as a single string, with line breaks separating the errors | |
Returns the number of errors recorded during execution | |
Returns a dtsErrorInfo with any errors that occurred during execution | |
Returns true if the job has been cancelled | |
Returns true if the job has started and is not yet done. | |
Called while a job is executing every time the dtSearch Engine checks to see if the job has been cancelled. | |
Called while a job is executing if an error is encountered, with the error code and message. | |
Not used | |
SetTimeout() causes a job to cancel automatically after the specified number of seconds | |
Do not pump waiting windows messages during callbacks | |
Optional reason for job cancellation, purely for diagnostic purposes Checks to make sure the reason is not already present, and also guards against excessive string size in case of repetitive cancellations. | |
Write an error message to the error handler object attached to this job |
Remarks
DJobBase provides common task-management functions for starting, monitoring, and cancelling a job, and for obtaining error information after a job completes.
The Job classes include several callback methods implemented as virtual functions, such as OnCheckAbort and OnError (in all classes), OnProgressUpdate (DIndexJob), and OnFound (DSearchJob). To use these methods, create a class based on the underlying Job class and override the virtual function you want to implement.
class CMySearchJob : public DSearchJob {
public:
...
virtual void OnError(long errorCode, const char *msg) {
// First call base class implementation
DSearchJob::OnError(errorCode, msg);
// Now show the message to the user
CString csMsg = GetMyErrorForErrorCode(errorCode);
ShowMessageToUser(csMsg);
}
virtual void OnFound(long totalFiles,
long totalHits, const char *name, long hitsInFile, dtsSearchResultsItem& item) {
// First call base class implementation
DSearchJob::OnFound(totalFiles, totalHits, name, hitsInFile, item);
// Now show the file to the user
ShowFoundFileToUser(name);
}
};
Class Hierarchy
dtSearch::DJobBase