Links
dtSearch Text Retrieval Engine Programmer's Reference
dtsOutputInfo Structure
Data Members | Classes | Legend | Members | Methods | Send Feedback

Describes how you want a dtSearch search report to be generated.

struct dtsOutputInfo {
  const char * outputFile;
  char * outputBuf;
  long outputBufLen;
  int DTPROC (* pOutputFn)(void *pData, const char *text, int len);
  void * pData;
  long outputFormat;
  const char * beforeHit;
  const char * afterHit;
  const char * header;
  const char * footer;
  const char * htmlHead;
  const char * baseHref;
};
File

dtsearch.h

Remarks

dtsOutputInfo provides ways to control the format (HTML, RTF, plain text) and appearance of the output (file format, headers, footers, etc.) as well as the manner in which the output is provided (in memory, to a file, or through a callback function). 

The header, footer, beforeHit, and afterHit markings should be in the format of the output. For example, if the output format is HTML, then beforeHit and afterHit markings could be <b> and </b>. 

beforeHit, afterHit, header, and footer control the appearance of converted text. 

The header and footer strings are inserted before and after the body of the document. 

The beforeHit and afterHit markers are inserted before and after each hit word. The beforeHit and afterHit markers can contain hypertext links. 

To facilitate creation of hit navigation markers, the strings "%%ThisHit%%", "%%NextHit%%", and "%%PrevHit%%" will be replaced with ordinals representing the current hit, the next hit, and the previous hit in the document. 

For example, the following code makes the beforeHit and nextHit marks act as HTML "Previous Hit" and "Next Hit" buttons.

    job.beforeHit =
                 "<A NAME="hit%%ThisHit%%">"
                       "<A HREF="#hit%%PrevHit%%">"
                 "<IMG SRC="hit1.gif" ALIGN="middle" ALT="[Prev Hit]" BORDER=0>";
    job.afterHit =
                    "<A HREF="#hit%%NextHit%%">"
                    "<IMG SRC="hit2.gif" ALIGN="middle" ALT="[Next Hit]" BORDER=0>";
Data Members
Data Member 
Description 
Text inserted after each hit 
For HTML output, an HREF for a BASE tag to be inserted in the header
Text inserted before each hit 
Text inserted at the end of the file 
Text inserted at the start of the file 
Tags to insert after the HEAD tag in HTML output 
Buffer to store output. 
Size of the buffer pointed to by outputBuf
Name of file to create, if the output is to be written to a file. 
OutputFormat identifing the format of the output -- itHTML, itRTF, itUtf8 (Unicode), itUnformattedHTML, or itAnsi. 
pData parameter passed to the pOutputFn callback. 
Callback function to receive output. 
Group
Methods
Method 
Description 
Clear all data from a dtsOutputInfo 
copy 
Copy another dtsOutputInfo (shallow copy) 
Constructor 
Legend
 
Data Member 
 
Method 
Links
You are here: C++ API > Classes > dtsOutputInfo Structure
Copyright (c) 1995-2008 dtSearch Corp. All rights reserved.