00001 /* 00002 * IndexManager.h 00003 * 00004 * Created on: Apr 4, 2010 00005 * Author: Mingmin Chen 00006 */ 00007 00008 #ifndef INDEXMANAGER_H_ 00009 #define INDEXMANAGER_H_ 00010 00011 #include "Common.h" 00012 #include "IndexHandle.h" 00013 00014 00025 class IndexManager { 00026 public: 00030 static IndexManager* getInstance(); 00031 00050 ReturnCode createIndex(const char *fileName, int attrNo, 00051 AttributeType attrType, int attrLength); 00052 00067 ReturnCode removeIndex(const char *fileName, int attrNo); 00068 00093 ReturnCode openIndex(const char *fileName, int attrNo, 00094 IndexHandle **indexHandle); 00095 00106 ReturnCode closeIndex(IndexHandle *indexHandle); 00107 00122 static bool getIndexFileName(const char *fileName, int attrNo, 00123 char *indexFileName, uint length); 00124 }; 00125 00126 #endif /* INDEXMANAGER_H_ */ 00127