00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SWSEARCHABLE_H
00024 #define SWSEARCHABLE_H
00025
00026 #include <defs.h>
00027
00028 SWORD_NAMESPACE_START
00029
00030 class ListKey;
00031 class SWKey;
00032
00035 class SWDLLEXPORT SWSearchable {
00036 public:
00037 SWSearchable();
00038 virtual ~SWSearchable();
00039
00046 static void nullPercent(char percent, void *userData);
00047
00048
00049
00069 virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0,
00070 SWKey * scope = 0,
00071 bool * justCheckIfSupported = 0,
00072 void (*percent) (char, void *) = &nullPercent,
00073 void *percentUserData = 0) = 0;
00074
00078 virtual signed char createSearchFramework(
00079 void (*percent) (char, void *) = &nullPercent,
00080 void *percentUserData = 0);
00081
00082 virtual void deleteSearchFramework();
00083
00087 virtual bool hasSearchFramework() { return false; }
00088
00097 virtual bool isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope);
00098 };
00099
00100 SWORD_NAMESPACE_END
00101 #endif