top | up | prev | next

SourceFileNode Class

Definition at line 17 of SourceFile.hpp

Constructors

SourceFileNode()
SourceFileNode(const Span& span_, const std::string& sourceFilePath_, const std::string& relativeSourceFilePath_, const std::u32string& projectName_)

Member Functions

void Accept(Visitor& visitor) override
void AddUsingDirectiveOrDeclaration(Node* usingDirectivesAndDeclaration)
void ComputeLineStarts()
NamespaceNode* GlobalNs()
const std::vector<std::string>& HeaderFilePaths() const
const std::string& HtmlSourceFilePath() const
const std::u32string& Id() const
std::vector<int>* LineStarts()
bool Processed() const
const std::u32string& ProjectName() const
void Read(Reader& reader) override
const std::string& RelativeSourceFilePath()
void SetContent(std::unique_ptr<std::u32string>&& content_)
void SetHeaderFilePaths(std::vector<std::string>&& headerFilePaths_)
void SetHtmlSourceFilePath(const std::string& htmlSourceFilePath_)
void SetProcessed()
void SetSourceFileIndex(int sourceFileIndex_)
void SetText(std::u32string&& text_)
int SourceFileIndex() const
const std::string& SourceFilePath() const
const std::u32string& Text() const
const std::vector<Node*>& UsingDirectivesAndDeclarations() const
void Write(Writer& writer) override

Member Variables

std::unique_ptr<std::u32string> content
std::unique_ptr<NamespaceNode> globalNs
std::vector<std::string> headerFilePaths
std::string htmlSourceFilePath
std::u32string id
std::vector<int> lineStarts
bool processed
std::u32string projectName
std::string relativeSourceFilePath
int sourceFileIndex
std::string sourceFilePath
std::u32string text
std::vector<Node*> usingDirectivesAndDeclarations

Constructor Details

SourceFileNode Constructor

sngcpp::ast::SourceFileNode::SourceFileNode()

Definition at line 18 of SourceFile.cpp :
 18 : Node(NodeType::sourceFileNode)sourceFileIndex(-1)processed()
 19 {
 20 }


Declaration at line 20 of SourceFile.hpp


SourceFileNode Constructor

sngcpp::ast::SourceFileNode::SourceFileNode(const Span& span_, const std::string& sourceFilePath_, const std::string& relativeSourceFilePath_, const std::u32string& projectName_)

Definition at line 22 of SourceFile.cpp
Declaration at line 21 of SourceFile.hpp


Member Function Details

Accept Member Function

void sngcpp::ast::SourceFileNode::Accept(Visitor & visitor) override

Definition at line 44 of SourceFile.cpp :
 45 {
 46     visitor.Visit(*this);
 47 }


Declaration at line 30 of SourceFile.hpp

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

Calls: sngcpp::ast::Visitor::Visit


AddUsingDirectiveOrDeclaration Member Function

void sngcpp::ast::SourceFileNode::AddUsingDirectiveOrDeclaration(Node * usingDirectivesAndDeclaration)

Definition at line 39 of SourceFile.cpp :
 40 {
 41     usingDirectivesAndDeclarations.push_back(usingDirectivesAndDeclaration);
 42 }


Declaration at line 34 of SourceFile.hpp


ComputeLineStarts Member Function

void sngcpp::ast::SourceFileNode::ComputeLineStarts()

Definition at line 95 of SourceFile.cpp
Declaration at line 38 of SourceFile.hpp


GlobalNs Member Function

NamespaceNode * sngcpp::ast::SourceFileNode::GlobalNs()

Definition at line 33 of SourceFile.hpp :
33 { return globalNs.get(); }


HeaderFilePaths Member Function

const std::vector<std::string>& sngcpp::ast::SourceFileNode::HeaderFilePaths() const

Definition at line 42 of SourceFile.hpp :
42 { return headerFilePaths; }


HtmlSourceFilePath Member Function

const std::string& sngcpp::ast::SourceFileNode::HtmlSourceFilePath() const

Definition at line 26 of SourceFile.hpp :
26 { return htmlSourceFilePath; }


Id Member Function

const std::u32string& sngcpp::ast::SourceFileNode::Id() const

Definition at line 27 of SourceFile.hpp :
27 { return id; }


LineStarts Member Function

std::vector<int >* sngcpp::ast::SourceFileNode::LineStarts()

Definition at line 39 of SourceFile.hpp :
39 { return &lineStarts; }


Processed Member Function

bool sngcpp::ast::SourceFileNode::Processed() const

Definition at line 36 of SourceFile.hpp :
36 { return processed; }


ProjectName Member Function

const std::u32string& sngcpp::ast::SourceFileNode::ProjectName() const

Definition at line 24 of SourceFile.hpp :
24 { return projectName; }


Read Member Function

void sngcpp::ast::SourceFileNode::Read(Reader & reader) override

Definition at line 73 of SourceFile.cpp
Declaration at line 32 of SourceFile.hpp

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

Calls: sngcpp::ast::Node::Read , sngcpp::ast::Reader::GetBinaryReader , sngcpp::ast::Reader::ReadNamespaceNode


RelativeSourceFilePath Member Function

const std::string& sngcpp::ast::SourceFileNode::RelativeSourceFilePath()

Definition at line 23 of SourceFile.hpp :
23 { return relativeSourceFilePath; }


SetContent Member Function

void sngcpp::ast::SourceFileNode::SetContent(std::unique_ptr<std::u32string>&& content_)

Definition at line 40 of SourceFile.hpp :
40 { content = std::move(content_); }


SetHeaderFilePaths Member Function

void sngcpp::ast::SourceFileNode::SetHeaderFilePaths(std::vector<std::string>&& headerFilePaths_)

Definition at line 41 of SourceFile.hpp :
41 { headerFilePaths = std::move(headerFilePaths_); }


SetHtmlSourceFilePath Member Function

void sngcpp::ast::SourceFileNode::SetHtmlSourceFilePath(const std::string& htmlSourceFilePath_)

Definition at line 25 of SourceFile.hpp :
25 { htmlSourceFilePath = htmlSourceFilePath_; }


SetProcessed Member Function

void sngcpp::ast::SourceFileNode::SetProcessed()

Definition at line 37 of SourceFile.hpp :
37 { processed = true; }


SetSourceFileIndex Member Function

void sngcpp::ast::SourceFileNode::SetSourceFileIndex(int sourceFileIndex_)

Definition at line 28 of SourceFile.hpp :
28 { sourceFileIndex = sourceFileIndex_; }


SetText Member Function

void sngcpp::ast::SourceFileNode::SetText(std::u32string&& text_)

Definition at line 43 of SourceFile.hpp :
43 { text = std::move(text_); }


SourceFileIndex Member Function

int sngcpp::ast::SourceFileNode::SourceFileIndex() const

Definition at line 29 of SourceFile.hpp :
29 { return sourceFileIndex; }


SourceFilePath Member Function

const std::string& sngcpp::ast::SourceFileNode::SourceFilePath() const

Definition at line 22 of SourceFile.hpp :
22 { return sourceFilePath; }


Text Member Function

const std::u32string& sngcpp::ast::SourceFileNode::Text() const

Definition at line 44 of SourceFile.hpp :
44 { return text; }


UsingDirectivesAndDeclarations Member Function

const std::vector<Node *>& sngcpp::ast::SourceFileNode::UsingDirectivesAndDeclarations() const

Definition at line 35 of SourceFile.hpp :
35 { return usingDirectivesAndDeclarations; }


Write Member Function

void sngcpp::ast::SourceFileNode::Write(Writer & writer) override

Definition at line 49 of SourceFile.cpp
Declaration at line 31 of SourceFile.hpp

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

Calls: sngcpp::ast::Node::Write , sngcpp::ast::SourceFileNode::Write , sngcpp::ast::Writer::GetBinaryWriter

Called by: sngcpp::ast::SourceFileNode::Write


top | up | prev | next