1 /*
2  * This file is part of the FortranProject plugin for Code::Blocks IDE
3  * and licensed under the GNU General Public License, version 3
4  * http://www.gnu.org/licenses/gpl-3.0.html
5  *
6  * Author: Darius Markauskas
7  *
8  */
9 #ifndef CCSMARTFILTER_H
10 #define CCSMARTFILTER_H
11 
12 #include <sdk.h>
13 #ifndef CB_PRECOMP
14     #include <wx/string.h>
15     #include <wx/event.h>
16     #include <wx/file.h>
17 
18     #include <cbeditor.h>
19 #endif
20 #include <set>
21 #include <vector>
22 
23 #include "tokenizerf.h"
24 #include "tokenf.h"
25 
26 typedef std::vector<FortranSourceForm> ArrayOfFortranSourceForm;
27 typedef std::set<wxString> StringSet;
28 
29 enum kindOfCCList
30 {
31     kccUseAssocTokens = 1,
32     kccAccessList,
33     kccOther
34 };
35 
36 
37 class CCSmartFilter
38 {
39     public:
40         static void GetTokenKind(wxArrayString& words, int& kindFilter, bool& allowVariables, kindOfCCList& kindCC);
41         static bool FitsToContext(const wxString& kw, const wxArrayString& firstWords);
42 
43     protected:
44     private:
45         static bool hasWord(const wxString& word, const wxArrayString& wordArr);
46 
47 };
48 
49 #endif // CCSMARTFILTER_H
50