top | up | prev | next

NamespaceSymbol Class

Definition at line 13 of NamespaceSymbol.hpp

Constructors

NamespaceSymbol(const Span& span_, const std::u32string& name_)

Member Functions

void AddProject(const std::u32string& projectName)
std::unique_ptr<sngxml::dom::Element> CreateElement() override
std::u32string FirstProject() const
bool HasProject(const std::u32string& projectName) const
bool IsNamespaceSymbol() const override
bool IsParentSymbol() const override
std::u32string KindStr() override

Member Variables

std::set<std::u32string> projects

Constructor Details

NamespaceSymbol Constructor

sngcpp::symbols::NamespaceSymbol::NamespaceSymbol(const Span& span_, const std::u32string& name_)

Definition at line 10 of NamespaceSymbol.cpp :
10 : ContainerSymbol(span_name_)
11 {
12 }


Declaration at line 16 of NamespaceSymbol.hpp


Member Function Details

AddProject Member Function

void sngcpp::symbols::NamespaceSymbol::AddProject(const std::u32string& projectName)

Definition at line 31 of NamespaceSymbol.cpp :
32 {
33     projects.insert(projectName);
34 }


Declaration at line 21 of NamespaceSymbol.hpp

Called by: sngcpp::symbols::SymbolTable::AddTypedef , sngcpp::symbols::SymbolTable::AddVariable , sngcpp::symbols::SymbolTable::BeginNamespace , sngcpp::symbols::SymbolTable::EndClass , sngcpp::symbols::SymbolTable::EndEnumType , sngcpp::symbols::SymbolTable::EndFunction , sngcpp::symbols::SymbolTable::EndGrammar


CreateElement Member Function

std::unique_ptr<sngxml::dom::Element> sngcpp::symbols::NamespaceSymbol::CreateElement() override

Definition at line 14 of NamespaceSymbol.cpp
Declaration at line 18 of NamespaceSymbol.hpp

Base class overridden functions: sngcpp::symbols::Symbol::CreateElement


FirstProject Member Function

std::u32string sngcpp::symbols::NamespaceSymbol::FirstProject() const

Definition at line 45 of NamespaceSymbol.cpp :
46 {
47     if (projects.empty()) return std::u32string();
48     return *projects.begin();
49 }


Declaration at line 23 of NamespaceSymbol.hpp


HasProject Member Function

bool sngcpp::symbols::NamespaceSymbol::HasProject(const std::u32string& projectName) const

Definition at line 36 of NamespaceSymbol.cpp :
37 {
38     for (const auto& project : projects)
39     {
40         if (project == projectName) return true;
41     }
42     return false;
43 }


Declaration at line 22 of NamespaceSymbol.hpp


IsNamespaceSymbol Member Function

bool sngcpp::symbols::NamespaceSymbol::IsNamespaceSymbol() const override

Definition at line 19 of NamespaceSymbol.hpp :
19 { return true; }

Base class overridden functions: sngcpp::symbols::Symbol::IsNamespaceSymbol


IsParentSymbol Member Function

bool sngcpp::symbols::NamespaceSymbol::IsParentSymbol() const override

Definition at line 20 of NamespaceSymbol.hpp :
20 { return true; }

Base class overridden functions: sngcpp::symbols::Symbol::IsParentSymbol


KindStr Member Function

std::u32string sngcpp::symbols::NamespaceSymbol::KindStr() override

Definition at line 17 of NamespaceSymbol.hpp :
17 { return U"namespace"; }

Base class overridden functions: sngcpp::symbols::Symbol::KindStr


top | up | prev | next