Debian Codegraph @

CodeLite/CxxUsingNamespaceCollector.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // Copyright : (C) 2015 Eran Ifrah
5 // File name : CxxUsingNamespaceCollector.h
6 //
7 // -------------------------------------------------------------------------
8 // A
9 // _____ _ _ _ _
10 // / __ \ | | | | (_) |
11 // | / \/ ___ __| | ___| | _| |_ ___
12 // | | / _ \ / _ |/ _ \ | | | __/ _ )
13 // | \__/\ (_) | (_| | __/ |___| | || __/
14 // \____/\___/ \__,_|\___\_____/_|\__\___|
15 //
16 // F i l e
17 //
18 // This program is free software; you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation; either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 //////////////////////////////////////////////////////////////////////////////
24 //////////////////////////////////////////////////////////////////////////////
25
26 #ifndef CXXUSINGNAMESPACECOLLECTOR_H
27 #define CXXUSINGNAMESPACECOLLECTOR_H
28
29 #include "CxxScannerBase.h"
30 #include "codelite_exports.h"
31
32 class WXDLLIMPEXP_CL CxxUsingNamespaceCollector : public CxxScannerBase
33 {
34 wxArrayString m_usingNamespaces;
35 std::unordered_set<wxString>& m_visitedFiles;
36
37 private:
38 void ParseUsingNamespace();
39
40 public:
41 virtual void OnToken(CxxLexerToken& token);
42
43 void SetUsingNamespaces(const wxArrayString& usingNamespaces)
44 {
45 this->m_usingNamespaces = usingNamespaces;
46 }
47 const wxArrayString& GetUsingNamespaces() const
48 {
49 return m_usingNamespaces;
50 }
51 CxxUsingNamespaceCollector(CxxPreProcessor* preProcessor, const wxFileName& filename,
52 std::unordered_set<wxString>& visitedFiles);
53 virtual ~CxxUsingNamespaceCollector();
54 };
55
56 #endif // CXXUSINGNAMESPACECOLLECTOR_H