top | up | prev | next

RuleSymbol Class

Definition at line 12 of RuleSymbol.hpp

Constructors

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

Member Functions

sngxml::dom::Element* Body()
std::unique_ptr<sngxml::dom::Element> CreateElement() override
bool IsRuleSymbol() const override
std::u32string KindStr() override

Member Variables

std::unique_ptr<sngxml::dom::Element> ruleBody

Constructor Details

RuleSymbol Constructor

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

Definition at line 10 of RuleSymbol.cpp :
10 : Symbol(span_name_)
11 {
12     SetAccess(Specifier::public_);
13     ruleBody.reset(new sngxml::dom::Element(U"span"));
14     ruleBody->SetAttribute(U"xml:space"U"preserve");
15 }


Declaration at line 15 of RuleSymbol.hpp


Member Function Details

Body Member Function

sngxml::dom::Element* sngcpp::symbols::RuleSymbol::Body()

Definition at line 19 of RuleSymbol.hpp :
19 { return ruleBody.get(); }


CreateElement Member Function

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

Definition at line 22 of RuleSymbol.cpp :
23 {
24     std::unique_ptr<sngxml::dom::Element> ruleElement(new sngxml::dom::Element(U"rule"));
25     ruleElement->AppendChild(std::unique_ptr<sngxml::dom::Node>(ruleBody.release()));
26     return ruleElement;
27 }


Declaration at line 17 of RuleSymbol.hpp

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


IsRuleSymbol Member Function

bool sngcpp::symbols::RuleSymbol::IsRuleSymbol() const override

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

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


KindStr Member Function

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

Definition at line 17 of RuleSymbol.cpp :
18 {
19     return U"rule";
20 }


Declaration at line 16 of RuleSymbol.hpp

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


top | up | prev | next