Commit 3de49875 authored by rmrf's avatar rmrf

Focus on ModuleDecl rework

parent e11f6e1d
......@@ -5,13 +5,18 @@ using namespace scpar;
using std::string;
ModuleDecl::ModuleDecl() : module_name_{"NONE"}, class_decl_{nullptr} {}
ModuleDecl::ModuleDecl() : module_name_{"NONE"},
class_decl_{nullptr},
constructor_stmt_{nullptr} {}
ModuleDecl::ModuleDecl(const string &name, CXXRecordDecl *decl)
: module_name_{name}, class_decl_{decl} {}
ModuleDecl::~ModuleDecl() {
class_decl_ = nullptr;
constructor_stmt_ = nullptr;
// Delete all pointers in ports.
for (auto input_port : _iports) {
// Second is the PortDecl*.
......@@ -113,7 +118,7 @@ void ModuleDecl::addInputOutputInterfaces(FindTLMInterfaces::interfaceType p) {
}
void ModuleDecl::addConstructor(Stmt *constructor) {
_constructorStmt = constructor;
constructor_stmt_ = constructor;
}
void ModuleDecl::addProcess(FindEntryFunctions::entryFunctionVectorType *efv) {
......
......@@ -84,6 +84,8 @@ public:
private:
string module_name_;
CXXRecordDecl *class_decl_;
Stmt *constructor_stmt_;
processMapType _processes;
portMapType _iports;
portMapType _oports;
......@@ -92,7 +94,7 @@ private:
interfaceMapType _ointerfaces;
interfaceMapType _iointerfaces;
signalMapType _signals;
Stmt *_constructorStmt;
vector<string> _instanceList;
portSignalMapType _portSignalMap;
vector<EntryFunctionContainer *> _vef;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment