FileTable class
#include <netlist/TextLocation.hpp>
A centralised table of unique filenames, indexed by integer. This avoids duplicating filename strings across many TextLocation instances. Access is thread-safe for concurrent insertion during parallel graph construction.
Public static variables
- static uint32_t NoFile constexpr
Public functions
- auto addFile(std::string_view name) -> uint32_t
- auto getFilename(uint32_t index) const -> std::string_view
- Return the filename for the given index.
- auto size() const -> size_t
- Return the number of unique filenames.
Function documentation
uint32_t slang:: netlist:: FileTable:: addFile(std::string_view name)
Add a filename and return its index. If the filename already exists, returns the existing index. Thread-safe.