SCV  4.2.1
Simple Components for Visual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TextFilter.h
Go to the documentation of this file.
1 
7 #ifndef __SCV_TEXT_FILTER_H__
8 #define __SCV_TEXT_FILTER_H__
9 
10 namespace scv {
11 
16 class TextFilter {
17 public:
18 
19  TextFilter(void);
20 
23  void allowAll(void);
26  void allowNumbers(void);
29  void allowLetters(void);
33  void allowThese(const std::string &filter);
36  void denyAll(void);
39  void denyNumbers(void);
42  void denyLetters(void);
46  void denyThese(const std::string &filter);
50  bool checkFilter(char character);
51 
52 protected:
53 
54 private:
55 
56  static const int s_printableCharacters = 94;
57  static const int s_vectorDisplacement = 32;
58  bool _filter[s_printableCharacters + 1];
59 };
60 
61 } // namespace scv
62 
63 #endif // __SCV_TEXT_FILTER_H__