 |
Cerata
A library to generate structural hardware designs
|
39 explicit Template(std::istream *str);
47 void Replace(
const std::string &str,
int with);
49 void Replace(
const std::string &str,
const std::string &with);
55 std::map<std::string, std::vector<trloc>> replace_list_;
57 std::vector<std::string> lines_;
Class to hold and modify a VHDL template file.
void Analyze()
Mark the locations of all replaceable template strings.
std::string ToString()
Return the file as a string.
static Template FromString(const std::string &str)
Construct a Template from an input string.
static Template FromFile(const std::string &filename)
Construct a Template from a file.
size_t start
The starting character index on the line.
Structure to hold a template replacement string location.
Template(std::istream *str)
Construct a Template from an input stream.
trloc(size_t line, size_t start)
Template replacement location constructor.
void Replace(const std::string &str, int with)
Replace a template replacement string with some number.
Contains everything related to the VHDL back-end.