MCPcopy Create free account
hub / github.com/chipsalliance/Surelog / collectSubTree

Method collectSubTree

src/Design/FileContent.cpp:199–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199std::vector<std::string> FileContent::collectSubTree(NodeId index) const {
200 std::vector<std::string> text;
201
202 text.push_back(m_objects[index].print(m_symbolTable, index,
203 GetDefinitionFile(index), m_fileId));
204
205 if (m_objects[index].m_child) {
206 for (const auto& s : collectSubTree(m_objects[index].m_child)) {
207 text.push_back(" " + s);
208 }
209 }
210
211 if (m_objects[index].m_sibling) {
212 for (const auto& s : collectSubTree(m_objects[index].m_sibling)) {
213 text.push_back(s);
214 }
215 }
216
217 return text;
218}
219
220void FileContent::SetDefinitionFile(NodeId index, PathId def) {
221 m_definitionFiles.emplace(index, def);

Callers

nothing calls this directly

Calls 1

printMethod · 0.45

Tested by

no test coverage detected