netlist::NetlistPath class

A class represening a path traversing nodes in the netlist.

Public types

using NodeListType = std::vector<NetlistNode const *>
using iterator = typename NodeListType::iterator
using const_iterator = typename NodeListType::const_iterator

Constructors, destructors, conversion operators

NetlistPath() defaulted
NetlistPath(NodeListType nodes)

Public functions

auto begin() const -> const_iterator
auto end() const -> const_iterator
auto begin() -> iterator
auto end() -> iterator
void add(NetlistNode& node)
void add(NetlistNode* node)
void reverse()
auto size() const -> size_t
auto empty() const -> bool
void clear()
auto findVariable(std::string syntax) -> std::optional<size_t>

Function documentation

std::optional<size_t> netlist::NetlistPath::findVariable(std::string syntax)

Return index within the path if a variable reference matches the specified syntax (ie including the hierarchical reference to the variable name and selectors) and appears on the left-hand side of an assignment (ie a target).