top | up | prev | next

CommentNode Class

Definition at line 12 of Comment.hpp

Constructors

CommentNode(const Span& span_, const boost::uuids::uuid& moduleId_)
CommentNode(const Span& span_, const boost::uuids::uuid& moduleId_, const std::u32string& comment_)

Member Functions

void Accept(Visitor& visitor) override
Node* Clone(CloneContext& cloneContext) const override
const std::u32string& Comment() const
void Read(AstReader& reader) override
void Write(AstWriter& writer) override

Member Variables

std::u32string comment

Constructor Details

CommentNode Constructor

sngcm::ast::CommentNode::CommentNode(const Span& span_, const boost::uuids::uuid& moduleId_)

Definition at line 13 of Comment.cpp :
13 : Node(NodeType::commentNodespan_moduleId_)
14 {
15 }


Declaration at line 15 of Comment.hpp


CommentNode Constructor

sngcm::ast::CommentNode::CommentNode(const Span& span_, const boost::uuids::uuid& moduleId_, const std::u32string& comment_)

Definition at line 17 of Comment.cpp :
17 : Node(NodeType::commentNodespan_moduleId_)comment(comment_)
18 {
19 }


Declaration at line 16 of Comment.hpp


Member Function Details

Accept Member Function

void sngcm::ast::CommentNode::Accept(Visitor & visitor) override

Definition at line 27 of Comment.cpp :
28 {
29     visitor.Visit(*this);
30 }


Declaration at line 18 of Comment.hpp

Base class overridden functions: sngcm::ast::Node::Accept

Calls: sngcm::ast::Visitor::Visit


Clone Member Function

Node * sngcm::ast::CommentNode::Clone(CloneContext & cloneContext) const override

Definition at line 21 of Comment.cpp :
22 {
23     CommentNode* clone = new CommentNode(GetSpan()ModuleId()comment);
24     return clone;
25 }


Declaration at line 17 of Comment.hpp

Base class overridden functions: sngcm::ast::Node::Clone

Calls: sngcm::ast::Node::GetSpan , sngcm::ast::Node::ModuleId


Comment Member Function

const std::u32string& sngcm::ast::CommentNode::Comment() const

Definition at line 21 of Comment.hpp :
21 { return comment; }

Called by: sngcm::ast::SourceWriter::Visit


Read Member Function

void sngcm::ast::CommentNode::Read(AstReader & reader) override

Definition at line 38 of Comment.cpp :
39 {
40     Node::Read(reader);
41     comment = reader.GetBinaryReader().ReadUtf32String();
42 }


Declaration at line 20 of Comment.hpp

Base class overridden functions: sngcm::ast::Node::Read

Calls: sngcm::ast::AstReader::GetBinaryReader , sngcm::ast::Node::Read , soulng::util::BinaryReader::ReadUtf32String


Write Member Function

void sngcm::ast::CommentNode::Write(AstWriter & writer) override

Definition at line 32 of Comment.cpp :
33 {
34     Node::Write(writer);
35     writer.GetBinaryWriter().Write(comment);
36 }


Declaration at line 19 of Comment.hpp

Base class overridden functions: sngcm::ast::Node::Write

Calls: sngcm::ast::AstWriter::GetBinaryWriter , sngcm::ast::Node::Write , soulng::util::BinaryWriter::Write


top | up | prev | next