Commit e11f6e1d authored by rmrf's avatar rmrf
Browse files

Focus on ModuleDecl rework

parent 868fd624
...@@ -5,10 +5,10 @@ using namespace scpar; ...@@ -5,10 +5,10 @@ using namespace scpar;
using std::string; using std::string;
ModuleDecl::ModuleDecl() : _moduleName{"NONE"}, _classdecl{nullptr} {} ModuleDecl::ModuleDecl() : module_name_{"NONE"}, class_decl_{nullptr} {}
ModuleDecl::ModuleDecl(const string &name, CXXRecordDecl *decl) ModuleDecl::ModuleDecl(const string &name, CXXRecordDecl *decl)
: _moduleName{name}, _classdecl{decl} {} : module_name_{name}, class_decl_{decl} {}
ModuleDecl::~ModuleDecl() { ModuleDecl::~ModuleDecl() {
...@@ -32,7 +32,7 @@ ModuleDecl::~ModuleDecl() { ...@@ -32,7 +32,7 @@ ModuleDecl::~ModuleDecl() {
_ioports.clear(); _ioports.clear();
} }
void ModuleDecl::setModuleName(const string &name) { _moduleName = name; } void ModuleDecl::setModuleName(const string &name) { module_name_ = name; }
void ModuleDecl::addInstances(vector<string> instanceList) { void ModuleDecl::addInstances(vector<string> instanceList) {
_instanceList = instanceList; _instanceList = instanceList;
...@@ -179,13 +179,13 @@ ModuleDecl::interfaceMapType ModuleDecl::getIOInterfaces() { ...@@ -179,13 +179,13 @@ ModuleDecl::interfaceMapType ModuleDecl::getIOInterfaces() {
return _iointerfaces; return _iointerfaces;
} }
string ModuleDecl::getName() { return _moduleName; } string ModuleDecl::getName() { return module_name_; }
bool ModuleDecl::isModuleClassDeclNull() { return (_classdecl == nullptr); } bool ModuleDecl::isModuleClassDeclNull() { return (class_decl_ == nullptr); }
CXXRecordDecl *ModuleDecl::getModuleClassDecl() { CXXRecordDecl *ModuleDecl::getModuleClassDecl() {
assert(!(_classdecl == nullptr)); assert(!(class_decl_ == nullptr));
return _classdecl; return class_decl_;
} }
void ModuleDecl::dumpInstances(raw_ostream &os, int tabn) { void ModuleDecl::dumpInstances(raw_ostream &os, int tabn) {
...@@ -312,8 +312,8 @@ void ModuleDecl::dumpSignals(raw_ostream &os, int tabn) { ...@@ -312,8 +312,8 @@ void ModuleDecl::dumpSignals(raw_ostream &os, int tabn) {
} }
void ModuleDecl::dump(raw_ostream &os) { void ModuleDecl::dump(raw_ostream &os) {
// os << "ModuleDecl " << this << " " << _moduleName // os << "ModuleDecl " << this << " " << module_name_
// << " CXXRecordDecl " << _classdecl << "\n"; // << " CXXRecordDecl " << class_decl_ << "\n";
os << "\n"; os << "\n";
os << "# Port Declaration:\n"; os << "# Port Declaration:\n";
......
...@@ -82,8 +82,8 @@ public: ...@@ -82,8 +82,8 @@ public:
void dumpSignalBinding(raw_ostream &, int); void dumpSignalBinding(raw_ostream &, int);
private: private:
string _moduleName; string module_name_;
CXXRecordDecl *_classdecl; CXXRecordDecl *class_decl_;
processMapType _processes; processMapType _processes;
portMapType _iports; portMapType _iports;
portMapType _oports; portMapType _oports;
......
Supports Markdown
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