/************************************************************************ Copyright Notice Copyright (c) MCNC, Clearinghouse for Networked Information Discovery and Retrieval, 1994. Permission to use, copy, modify, distribute, and sell this software and its documentation, in whole or in part, for any purpose is hereby granted without fee, provided that 1. The above copyright notice and this permission notice appear in all copies of the software and related documentation. Notices of copyright and/or attribution which appear at the beginning of any file included in this distribution must remain intact. 2. Users of this software agree to make their best efforts (a) to return to MCNC any improvements or extensions that they make, so that these may be included in future releases; and (b) to inform MCNC/CNIDR of noteworthy uses of this software. 3. The names of MCNC and Clearinghouse for Networked Information Discovery and Retrieval may not be used in any advertising or publicity relating to the software without the specific, prior written permission of MCNC/CNIDR. THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MCNC/CNIDR BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ************************************************************************/ /*@@@ File: result.hxx Version: 1.00 Description: Class RESULT - Search Result Author: Nassib Nassar, nrn@cnidr.org @@@*/ #ifndef RESULT_HXX #define RESULT_HXX #include #include #include "defs.hxx" #include "string.hxx" #include "vlist.hxx" #include "attr.hxx" #include "attrlist.hxx" #include "mdtrec.hxx" #include "mdt.hxx" #include "dfd.hxx" #include "dfdt.hxx" #include "fc.hxx" #ifdef DO_HIGHLIGHTING #include "fct.hxx" #endif class RESULT { public: RESULT(); RESULT& operator=(const RESULT& OtherResult); void SetKey(const STRING& NewKey); void GetVKey(STRING* StringBuffer) const; void GetKey(STRING* StringBuffer) const; void SetDocumentType(const STRING& NewDocumentType); void GetDocumentType(STRING* StringBuffer) const; void SetPathName(const STRING& NewPathName); void GetPathName(STRING* StringBuffer) const; void SetFileName(const STRING& NewFileName); void GetFileName(STRING* StringBuffer) const; void GetFullFileName(STRING* StringBuffer) const; void SetRecordStart(const GPTYPE NewRecordStart); GPTYPE GetRecordStart() const; void SetRecordEnd(const GPTYPE NewRecordEnd); GPTYPE GetRecordEnd() const; void SetScore(const DOUBLE NewScore); DOUBLE GetScore() const; #ifdef DO_HIGHLIGHTING void SetHitTable(const FCT& NewHitTable); void GetHitTable(PFCT HitTableBuffer) const; #endif LONG GetRecordSize() const; void GetRecordData(STRING* StringBuffer) const; void GetHighlightedRecord(const STRING& BeforeTerm, const STRING& AfterTerm, STRING* Buffer) const; void SetDbNum(const INT NewDbNum); // Added for virtual databases INT GetDbNum() const; // Added for virtual databases void SetMdt(MDT& NewMdt); MDT* GetMdt() const; ~RESULT(); private: INT DbNum; // Added for virtual databases STRING Key; STRING DocumentType; STRING PathName; STRING FileName; GPTYPE RecordStart; GPTYPE RecordEnd; DOUBLE Score; MDT* MyMdt; // Save the MDT pointer so we can retrieve the headline // from the right virtual database #ifdef DO_HIGHLIGHTING PFCT HitTable; #endif }; typedef RESULT* PRESULT; #endif