Add new vhdl_procedural superclass for process/task/func

This commit is contained in:
Nick Gasson 2008-06-24 19:50:57 +01:00
parent 12b448ef01
commit f2aca68b82
1 changed files with 7 additions and 3 deletions

View File

@ -542,17 +542,21 @@ private:
bool init_;
};
class vhdl_procedural {
public:
stmt_container *get_container() { return &stmts_; }
protected:
stmt_container stmts_;
};
class vhdl_process : public vhdl_conc_stmt {
class vhdl_process : public vhdl_conc_stmt, public vhdl_procedural {
public:
vhdl_process(const char *name = "") : name_(name) {}
void emit(std::ofstream &of, int level) const;
stmt_container *get_container() { return &stmts_; }
void add_sensitivity(const char *name);
vhdl_scope *get_scope() { return &scope_; }
private:
stmt_container stmts_;
vhdl_scope scope_;
std::string name_;
string_list_t sens_;