Skip to content

Commit

Permalink
Work in progress. removed default destructor in dbBusPort. Signed-off…
Browse files Browse the repository at this point in the history
…-by: Andy Fox [email protected]

Signed-off-by: andyfox-rushc <[email protected]>
  • Loading branch information
andyfox-rushc committed Aug 3, 2024
1 parent 872751e commit 4e94f6c
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/dbSta/src/dbNetwork.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2462,8 +2462,8 @@ class DbNetworkPortMemberIterator : public PortMemberIterator
private:
dbSet<dbModBTerm>::iterator members_;
const dbNetwork* nwk_;
int ix_;
int size_;
int ix_ = 0;
int size_ = 0;
};

DbNetworkPortMemberIterator::~DbNetworkPortMemberIterator()
Expand Down
42 changes: 26 additions & 16 deletions src/odb/src/codeGenerator/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"classes_dir": "schema",
"iterators":[
"classes_dir": "schema",
"iterators":[
{
"name": "dbModuleModBTermItr",
"parentObject": "dbModBTerm",
"tableName": "modbterm_tbl",
"reversible": "true",
"orderReversed": "true",
"flags":["private"],
"sequential": 0,
"includes": ["dbModBTerm.h", "dbModule.h", "dbBusPort.h"]
},
{
"name": "dbModuleInstItr",
"parentObject": "dbInst",
Expand All @@ -16,26 +26,26 @@
"tableName": "modinst_tbl",
"reversible": "true",
"orderReversed": "true",
"sequential": 0,
"includes": ["dbModInst.h", "dbModule.h"]
"sequential": 0,
"includes": ["dbModInst.h", "dbModule.h"]
},
{
"name": "dbModuleModBTermItr",
"parentObject": "dbModBTerm",
"tableName": "modbterm_tbl",
"reversible": "true",
"name": "dbModuleBusPortModBTermItr",
"parentObject": "dbModBTerm",
"tableName": "modbterm_tbl",
"reversible": "true",
"orderReversed": "true",
"flags":["private"],
"sequential": 0,
"includes": ["dbModBTerm.h", "dbModule.h"]
"sequential": 0,
"includes": ["dbModBTerm.h", "dbModule.h", "dbBusPort.h"]
},
{
"name": "dbModuleModInstModITermItr",
"parentObject": "dbModITerm",
"tableName": "moditerm_tbl",
"reversible": "true",
"orderReversed": "true",
"sequential": 0,
"name": "dbModuleModInstModITermItr",
"parentObject": "dbModITerm",
"tableName": "moditerm_tbl",
"reversible": "true",
"orderReversed": "true",
"sequential": 0,
"includes": ["dbModITerm.h", "dbModule.h", "dbModInst.h"]
},
{
Expand Down
1 change: 1 addition & 0 deletions src/odb/src/codeGenerator/schema/chip/dbBusPort.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name":"dbBusPort",
"type":"dbObject",
"needs_non_default_destructor" : "true",
"fields": [
{
"name":"_flags",
Expand Down
1 change: 0 additions & 1 deletion src/odb/src/db/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ add_library(db
wOrder.cpp
dbGroupPowerNetItr.cpp
dbGroupGroundNetItr.cpp
dbBusPortMemberItr.cpp
# Generator Code Begin cpp
dbAccessPoint.cpp
dbBusPort.cpp
Expand Down
9 changes: 9 additions & 0 deletions src/odb/src/db/dbBusPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@ dbOStream& operator<<(dbOStream& stream, const _dbBusPort& obj)
return stream;
}

_dbBusPort::~_dbBusPort()
{
// User Code Begin d
if (_members_iter != nullptr) {
delete (_members_iter);
}
// User Code End d
}

////////////////////////////////////////////////////////////////////
//
// dbBusPort - Methods
Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbBusPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class _dbBusPort : public _dbObject
_dbBusPort(_dbDatabase*, const _dbBusPort& r);
_dbBusPort(_dbDatabase*);

~_dbBusPort() = default;
~_dbBusPort();

bool operator==(const _dbBusPort& rhs) const;
bool operator!=(const _dbBusPort& rhs) const { return !operator==(rhs); }
Expand Down
4 changes: 2 additions & 2 deletions src/odb/src/db/dbModuleBusPortModBTermItr.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ class dbModuleBusPortModBTermItr : public dbIterator

private:
dbTable<_dbModBTerm>* _modbterm_tbl;
// User Code Begin begin
// User Code Begin b1
int _ix = 0;
int _size = 0;
_dbModBTerm* _iter = nullptr;
// User Code End begin
// User Code End b1
};

} // namespace odb
Expand Down
1 change: 0 additions & 1 deletion src/odb/src/db/dbModuleModBTermItr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#include "dbBusPort.h"
#include "dbModBTerm.h"
#include "dbModBTerm.h"
#include "dbModule.h"
#include "dbTable.h"

Expand Down
1 change: 0 additions & 1 deletion src/odb/src/db/dbModuleModInstItr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
// Generator Code Begin Cpp
#include "dbModuleModInstItr.h"

#include "dbModInst.h"
#include "dbModInst.h"
#include "dbModule.h"
#include "dbTable.h"
Expand Down

0 comments on commit 4e94f6c

Please sign in to comment.