diff --git a/src/dbSta/include/db_sta/dbNetwork.hh b/src/dbSta/include/db_sta/dbNetwork.hh index 0b685f3049a..07e90ce40da 100644 --- a/src/dbSta/include/db_sta/dbNetwork.hh +++ b/src/dbSta/include/db_sta/dbNetwork.hh @@ -92,6 +92,20 @@ class dbNetwork : public ConcreteNetwork public: dbNetwork(); ~dbNetwork() override; + + // unique addresses for the db objects + static constexpr unsigned DBITERM_ID = 0x0; + static constexpr unsigned DBBTERM_ID = 0x1; + static constexpr unsigned DBINST_ID = 0x2; + static constexpr unsigned DBNET_ID = 0x3; + static constexpr unsigned DBMODITERM_ID = 0x4; + static constexpr unsigned DBMODBTERM_ID = 0x5; + static constexpr unsigned DBMODINST_ID = 0x6; + static constexpr unsigned DBMODNET_ID = 0x7; + static constexpr unsigned DBMODULE_ID = 0x8; + // Number of lower bits used + static constexpr unsigned DBIDTAG_WIDTH = 0x4; + void init(dbDatabase* db, Logger* logger); void setBlock(dbBlock* block); void clear() override; diff --git a/src/dbSta/src/dbNetwork.cc b/src/dbSta/src/dbNetwork.cc index 8ef79d320d4..9078cd2e225 100644 --- a/src/dbSta/src/dbNetwork.cc +++ b/src/dbSta/src/dbNetwork.cc @@ -101,18 +101,6 @@ char* tmpStringCopy(const char* str) // lower 4 bits used to encode type // -static constexpr unsigned DBITERM_ID = 0x0; -static constexpr unsigned DBBTERM_ID = 0x1; -static constexpr unsigned DBINST_ID = 0x2; -static constexpr unsigned DBNET_ID = 0x3; -static constexpr unsigned DBMODITERM_ID = 0x4; -static constexpr unsigned DBMODBTERM_ID = 0x5; -static constexpr unsigned DBMODINST_ID = 0x6; -static constexpr unsigned DBMODNET_ID = 0x7; -static constexpr unsigned DBMODULE_ID = 0x8; -// Number of lower bits used -static constexpr unsigned DBIDTAG_WIDTH = 0x4; - ObjectId dbNetwork::getDbNwkObjectId(dbObjectType typ, ObjectId db_id) const { if (db_id > (std::numeric_limits::max() >> DBIDTAG_WIDTH)) {