Modules |
Files |
Inheritance Tree |
Inheritance Graph |
Name Index |
Config
File: Synopsis/Parser/C++/syn/scopeinfo.hh
1| // Synopsis C++ Parser: scopeinfo.hh header file
2| // Definition of the ScopeInfo class which stores info about each scope for
3| // Builder and Lookup to use
4|
5| // $Id: scopeinfo.hh,v 1.4 2002/11/17 12:11:44 chalky Exp $
6| //
7| // This file is a part of Synopsis.
8| // Copyright (C) 2002 Stephen Davies
9| //
10| // Synopsis is free software; you can redistribute it and/or modify it
11| // under the terms of the GNU General Public License as published by
12| // the Free Software Foundation; either version 2 of the License, or
13| // (at your option) any later version.
14| //
15| // This program is distributed in the hope that it will be useful,
16| // but WITHOUT ANY WARRANTY; without even the implied warranty of
17| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18| // General Public License for more details.
19| //
20| // You should have received a copy of the GNU General Public License
21| // along with this program; if not, write to the Free Software
22| // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
23| // 02111-1307, USA.
24|
25| #ifndef H_SYNOPSIS_CPP_SCOPEINFO
26| #define H_SYNOPSIS_CPP_SCOPEINFO
27|
28| #include <string>
29| #include <map>
30| #include <vector>
31| #include "common.hh"
32|
33| class Dictionary;
34|
35|
36| class ScopeInfo;
37|
38|
39| typedef std::vector<ScopeInfo*> ScopeSearch;
40|
41|
42|
43|
44|
45|
46|
47|
48|
49|
50|
51|
52|
53|
54|
55|
56| struct ScopeInfo : public cleanup
57| {
58|
59| ScopeInfo(AST::Scope* s);
60|
61|
62| ScopeInfo(ScopeInfo* s);
63|
64|
65| ~ScopeInfo();
66|
67|
68| Dictionary* dict;
69|
70|
71|
72|
73| AST::Scope* scope_decl;
74|
75|
76| ScopeSearch search;
77|
78|
79| ScopeSearch using_scopes;
80|
81|
82| ScopeSearch used_by;
83|
84|
85|
86| bool is_using;
87|
88|
89| AST::Access access;
90|
91|
92|
93|
94|
95| std::map<std::string, int> nscounts;
96| int getCount(const std::string& name);
97| };
98|
99| #endif
100|