home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-04-16 | 1.4 KB | 58 lines | [TEXT/CWIE] |
- /// DemoIndex.h
- // Copyright: © 1994 - 1998 by Apple Computer, Inc., all rights reserved.
-
-
- #pragma once
- #include <Types.h>
-
- /// choose a storage implementation
- #ifndef DEMOSTORAGE
- //#pragma import on
- #include "HFSStorage.h"
- #define DEMOSTORAGE(FILENAME) MakeHFSStorage(0,0,FILENAME)
- //#pragma import off
- #endif
-
- /// choose a corpus implementation
- //#pragma import on
- #include "HFSTextFolderCorpus.h"
- #define DEMOCORPUS(ROOTFOLDERNAME) HFSTextFolderCorpus(ROOTFOLDERNAME)
-
- /// choose an analysis implementation
- #include "SimpleAnalysis.h"
- #define DEMOANALYSIS() SimpleAnalysis()
- //#pragma import off
- /// choose an index implementation -- inverted, vector or both
- #define DEMOINDEXISINVERTED
- #define DEMOINDEXISVECTOR
-
- #ifdef DEMOINDEXISINVERTED
- #ifdef DEMOINDEXISVECTOR
- // InVecIndex: inverted and vector
- #define DEMOINDEXCLASS InVecIndex
- #include "InVecIndex.h"
- #define DEMOINDEXFILENAME "\pinvec.index"
- #else
- // InvertedIndex
- #define DEMOINDEXCLASS InvertedIndex
- #include "InvertedIndex.h"
- #define DEMOINDEXFILENAME "\pinverted.index"
- #endif
- #else
- #ifdef DEMOINDEXISVECTOR
- // VectorIndex
- #define DEMOINDEXCLASS VectorIndex
- #include "VectorIndex.h"
- #define DEMOINDEXFILENAME "\pvector.index"
- #endif
- #endif
-
- /// define index subclass
-
- class DemoIndex : public DEMOINDEXCLASS {
- public:
- DemoIndex(IAStorage* storage, StringPtr rootFolder = NULL);
- void AddDoc(IADoc* doc);
- void DeleteDoc(const IADoc* doc);
- };
-