1
2
3
4
5
6 #ifndef CMAJOR_SYMBOLS_NAMESPACE_SYMBOL_INCLUDED
7 #define CMAJOR_SYMBOLS_NAMESPACE_SYMBOL_INCLUDED
8 #include <cmajor/symbols/ContainerSymbol.hpp>
9
10 namespace cmajor { namespace symbols {
11
12 class NamespaceSymbol : public ContainerSymbol
13 {
14 public:
15 NamespaceSymbol(const Span& span_, const boost::uuids::uuid& sourceModuleId_, const std::u32string& name_);
16 std::string TypeString() const override { return "namespace"; }
17 std::u32string Id() const override { return U"ns_" + FullName(); }
18 bool IsParentSymbol() const override { return true; }
19 void Import(NamespaceSymbol* that, SymbolTable& symbolTable);
20 bool IsGlobalNamespace() const { return Name().empty(); }
21 std::unique_ptr<sngxml::dom::Element> CreateDomElement(TypeMap& typeMap) override;
22 std::u32string Info() const override { return Name(); }
23 const char* ClassName() const override { return "NamespaceSymbol"; }
24 std::string GetSymbolCategoryStr() const override { return "NS"; }
25 std::string GetSymbolCategoryDescription() const override { return "namespace"; }
26 };
27
28 } }
29
30 #endif // CMAJOR_SYMBOLS_NAMESPACE_SYMBOL_INCLUDED