top | up | prev | next

VariableSymbol Class

Definition at line 12 of VariableSymbol.hpp

Constructors

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

Member Functions

void AddSpecifiers(Specifier specifiers_)
std::unique_ptr<sngxml::dom::Element> CreateElement() override
TypeSymbol* GetType() override
bool IsVariableSymbol() const override
std::u32string KindStr() override
void SetType(TypeSymbol* type_)
Specifier Specifiers() const

Member Variables

Specifier specifiers
TypeSymbol* type

Constructor Details

VariableSymbol Constructor

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

Definition at line 10 of VariableSymbol.cpp :
10 : Symbol(span_name_)specifiers(Specifier::none)type(nullptr)
11 {
12 }


Declaration at line 15 of VariableSymbol.hpp


Member Function Details

AddSpecifiers Member Function

void sngcpp::symbols::VariableSymbol::AddSpecifiers(Specifier specifiers_)

Definition at line 14 of VariableSymbol.cpp :
15 {
16     specifiers = specifiers | specifiers_;
17 }


Declaration at line 19 of VariableSymbol.hpp


CreateElement Member Function

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

Definition at line 19 of VariableSymbol.cpp :
20 {
21     std::unique_ptr<sngxml::dom::Element> variableElement(new sngxml::dom::Element(U"variable"));
22     variableElement->SetAttribute(U"type"type->Id());
23     if (specifiers != Specifier::none)
24     {
25         variableElement->SetAttribute(U"specifiers"SpecifierStr(specifiers));
26     }
27     return variableElement;
28 }


Declaration at line 17 of VariableSymbol.hpp

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

Calls: sngcpp::symbols::Symbol::Id


GetType Member Function

TypeSymbol * sngcpp::symbols::VariableSymbol::GetType() override

Definition at line 21 of VariableSymbol.hpp :
21 { return type; }

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


IsVariableSymbol Member Function

bool sngcpp::symbols::VariableSymbol::IsVariableSymbol() const override

Definition at line 18 of VariableSymbol.hpp :
18 { return true; }

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


KindStr Member Function

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

Definition at line 16 of VariableSymbol.hpp :
16 { return U"variable"; }

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


SetType Member Function

void sngcpp::symbols::VariableSymbol::SetType(TypeSymbol * type_)

Definition at line 22 of VariableSymbol.hpp :
22 { type = type_; }


Specifiers Member Function

Specifier sngcpp::symbols::VariableSymbol::Specifiers() const

Definition at line 20 of VariableSymbol.hpp :
20 { return specifiers; }


top | up | prev | next