1
2
3
4
5
6 #ifndef SNGCPP_SYMBOLS_NAMESPACE_SYMBOL_INCLUDED
7 #define SNGCPP_SYMBOLS_NAMESPACE_SYMBOL_INCLUDED
8 #include <sngcpp/symbols/ContainerSymbol.hpp>
9 #include <set>
10
11 namespace sngcpp { namespace symbols {
12
13 class NamespaceSymbol : public ContainerSymbol
14 {
15 public:
16 NamespaceSymbol(const Span& span_, const std::u32string& name_);
17 std::u32string KindStr() override { return U"namespace"; }
18 std::unique_ptr<sngxml::dom::Element> CreateElement() override;
19 bool IsNamespaceSymbol() const override { return true; }
20 bool IsParentSymbol() const override { return true; }
21 void AddProject(const std::u32string& projectName);
22 bool HasProject(const std::u32string& projectName) const;
23 std::u32string FirstProject() const;
24 private:
25 std::set<std::u32string> projects;
26 };
27
28 } }
29
30 #endif // SNGCPP_SYMBOLS_NAMESPACE_SYMBOL_INCLUDED