OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Filter.hpp
Go to the documentation of this file.
1 #ifndef __OPENTREP_BOM_FILTER_HPP
2 #define __OPENTREP_BOM_FILTER_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // OpenTrep
9 
10 namespace OPENTREP {
11 
21  struct Filter {
22  public:
23  // /////////// Business support methods /////////
42  static void trim (std::string& ioPhrase, const NbOfLetters_T& iMinWordLength = 4);
43 
64  static bool shouldKeep (const std::string& iPhrase,
65  const std::string& iWord);
66 
67 
68  private:
69  // //////////////// Constructors and Destructors /////////////
73  Filter();
74 
78  Filter (const Filter&);
79 
83  ~Filter();
84  };
85 
86 }
87 #endif // __OPENTREP_BOM_FILTER_HPP
Class filtering out the words not suitable for indexing and/or searching, when part of greater string...
Definition: Filter.hpp:21
unsigned int NbOfLetters_T
static void trim(std::string &ioPhrase, const NbOfLetters_T &iMinWordLength=4)
Definition: Filter.cpp:131
static bool shouldKeep(const std::string &iPhrase, const std::string &iWord)
Definition: Filter.cpp:144