00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 1999-2009 Soeren Sonnenburg 00008 * Written (W) 1999-2008 Gunnar Raetsch 00009 * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society 00010 */ 00011 00012 #ifndef _CPREPROC__H__ 00013 #define _CPREPROC__H__ 00014 00015 #include "lib/common.h" 00016 #include "base/SGObject.h" 00017 00018 00019 enum EPreProcType 00020 { 00021 P_UNKNOWN=0, 00022 P_NORMONE=10, 00023 P_LOGPLUSONE=20, 00024 P_SORTWORDSTRING=30, 00025 P_SORTULONGSTRING=40, 00026 P_SORTWORD=50, 00027 P_PRUNEVARSUBMEAN=60 00028 }; 00029 00030 00031 #include "features/Features.h" 00032 class CFeatures; 00033 00034 00049 class CPreProc : public CSGObject 00050 { 00051 public: 00057 CPreProc(const char* name, const char* id); 00058 virtual ~CPreProc(); 00059 00061 virtual bool init(CFeatures* f)=0; 00062 00064 virtual bool load_init_data(FILE* src)=0; 00065 00067 virtual bool save_init_data(FILE* dst)=0; 00068 00070 virtual void cleanup()=0; 00071 00074 virtual EFeatureType get_feature_type()=0; 00075 00079 virtual EFeatureClass get_feature_class()=0; 00080 00082 const char * get_name() const { return preproc_name; } 00083 00085 const char * get_id() const { return preproc_id; } 00086 00087 protected: 00089 const char* preproc_name; 00091 const char* preproc_id; 00092 }; 00093 #endif