00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _LIBRSTP_INC_FILTER_H
00029 #define _LIBRSTP_INC_FILTER_H
00030
00031 #include <string>
00032 #include <set>
00033
00034 namespace libradar_stp {
00035
00050 class Filter {
00051 public:
00052
00053 Filter();
00054 Filter( const Filter& f );
00055 ~Filter();
00056
00057 bool setFile( const std::string& file );
00058 void addRule( const std::string& id );
00059
00060 bool check( const std::string& data, unsigned int wmo_index );
00061
00062 std::string getLastWMO() const;
00063 std::string getLastAWIPS() const;
00064
00065 Filter& operator= ( const Filter& f );
00066
00067 private:
00068
00069 std::string m_file;
00070 int m_modtime;
00071 int m_stat_counter;
00072
00073 std::string m_last_wmo;
00074 std::string m_last_awips;
00075
00076 std::set< std::string > m_idset;
00077
00078 };
00079
00080 };
00081
00082 #endif
00083