55#include " dbDatabase.h"
66
77#include " dbChip.h"
8+ #include " dbProperty.h"
89#include " dbTable.h"
910#include " dbTable.hpp"
1011#include " odb/db.h"
@@ -68,6 +69,9 @@ bool _dbDatabase::operator==(const _dbDatabase& rhs) const
6869 if (chip_hash_ != rhs.chip_hash_ ) {
6970 return false ;
7071 }
72+ if (*_prop_tbl != *rhs._prop_tbl ) {
73+ return false ;
74+ }
7175
7276 // User Code Begin ==
7377 //
@@ -87,10 +91,6 @@ bool _dbDatabase::operator==(const _dbDatabase& rhs) const
8791 return false ;
8892 }
8993
90- if (*_prop_tbl != *rhs._prop_tbl ) {
91- return false ;
92- }
93-
9494 if (*_name_cache != *rhs._name_cache ) {
9595 return false ;
9696 }
@@ -116,6 +116,8 @@ _dbDatabase::_dbDatabase(_dbDatabase* db)
116116 chip_tbl_ = new dbTable<_dbChip, 2 >(
117117 this , this , (GetObjTbl_t) &_dbDatabase::getObjectTable, dbChipObj);
118118 chip_hash_.setTable (chip_tbl_);
119+ _prop_tbl = new dbTable<_dbProperty>(
120+ this , this , (GetObjTbl_t) &_dbDatabase::getObjectTable, dbPropertyObj);
119121 // User Code Begin Constructor
120122 _magic1 = DB_MAGIC1;
121123 _magic2 = DB_MAGIC2;
@@ -134,9 +136,6 @@ _dbDatabase::_dbDatabase(_dbDatabase* db)
134136 _lib_tbl = new dbTable<_dbLib>(
135137 this , this , (GetObjTbl_t) &_dbDatabase::getObjectTable, dbLibObj);
136138
137- _prop_tbl = new dbTable<_dbProperty>(
138- this , this , (GetObjTbl_t) &_dbDatabase::getObjectTable, dbPropertyObj);
139-
140139 _name_cache = new _dbNameCache (
141140 this , this , (GetObjTbl_t) &_dbDatabase::getObjectTable);
142141
@@ -255,6 +254,8 @@ dbObjectTable* _dbDatabase::getObjectTable(dbObjectType type)
255254 switch (type) {
256255 case dbChipObj:
257256 return chip_tbl_;
257+ case dbPropertyObj:
258+ return _prop_tbl;
258259 // User Code Begin getObjectTable
259260 case dbTechObj:
260261 return _tech_tbl;
@@ -264,9 +265,6 @@ dbObjectTable* _dbDatabase::getObjectTable(dbObjectType type)
264265
265266 case dbGdsLibObj:
266267 return _gds_lib_tbl;
267-
268- case dbPropertyObj:
269- return _prop_tbl;
270268 // User Code End getObjectTable
271269 default :
272270 break ;
@@ -280,23 +278,24 @@ void _dbDatabase::collectMemInfo(MemInfo& info)
280278
281279 chip_tbl_->collectMemInfo (info.children_ [" chip_tbl_" ]);
282280
281+ _prop_tbl->collectMemInfo (info.children_ [" _prop_tbl" ]);
282+
283283 // User Code Begin collectMemInfo
284284 _tech_tbl->collectMemInfo (info.children_ [" tech" ]);
285285 _lib_tbl->collectMemInfo (info.children_ [" lib" ]);
286286 _gds_lib_tbl->collectMemInfo (info.children_ [" gds_lib" ]);
287- _prop_tbl->collectMemInfo (info.children_ [" prop" ]);
288287 _name_cache->collectMemInfo (info.children_ [" name_cache" ]);
289288 // User Code End collectMemInfo
290289}
291290
292291_dbDatabase::~_dbDatabase ()
293292{
294293 delete chip_tbl_;
294+ delete _prop_tbl;
295295 // User Code Begin Destructor
296296 delete _tech_tbl;
297297 delete _lib_tbl;
298298 delete _gds_lib_tbl;
299- delete _prop_tbl;
300299 delete _name_cache;
301300 delete _prop_itr;
302301 // User Code End Destructor
@@ -373,6 +372,12 @@ dbChip* dbDatabase::findChip(const char* name) const
373372 return (dbChip*) obj->chip_hash_ .find (name);
374373}
375374
375+ dbSet<dbProperty> dbDatabase::getProperties () const
376+ {
377+ _dbDatabase* obj = (_dbDatabase*) this ;
378+ return dbSet<dbProperty>(obj, obj->_prop_tbl );
379+ }
380+
376381// User Code Begin dbDatabasePublicMethods
377382
378383void dbDatabase::setTopChip (dbChip* chip)
0 commit comments