Skip to content

Commit bd2db50

Browse files
committed
Don't use using odb::dbBTerm; in header files to not pollute namespace.
Signed-off-by: Henner Zeller <[email protected]>
1 parent d84b4df commit bd2db50

File tree

7 files changed

+50
-50
lines changed

7 files changed

+50
-50
lines changed

src/dpl/src/infrastructure/Objects.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ odb::dbInst* Node::getDbInst() const
140140
}
141141
return static_cast<odb::dbInst*>(db_owner_);
142142
}
143-
dbBTerm* Node::getBTerm() const
143+
odb::dbBTerm* Node::getBTerm() const
144144
{
145145
if (type_ != TERMINAL) {
146146
return nullptr;
147147
}
148-
return static_cast<dbBTerm*>(db_owner_);
148+
return static_cast<odb::dbBTerm*>(db_owner_);
149149
}
150150
odb::dbOrientType Node::getOrient() const
151151
{
@@ -289,7 +289,7 @@ void Node::setDbInst(odb::dbInst* inst)
289289
{
290290
db_owner_ = inst;
291291
}
292-
void Node::setBTerm(dbBTerm* term)
292+
void Node::setBTerm(odb::dbBTerm* term)
293293
{
294294
db_owner_ = term;
295295
}

src/dpl/src/infrastructure/Objects.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@
1515

1616
namespace odb {
1717
class dbBox;
18-
class dbBTerm;
1918
class dbMaster;
2019
class dbSite;
2120
} // namespace odb
2221
namespace dpl {
2322

24-
using odb::dbBTerm;
2523
using odb::dbMaster;
2624
using odb::dbSite;
2725

@@ -115,14 +113,14 @@ class Node
115113
const std::vector<Pin*>& getPins() const;
116114
int getGroupId() const;
117115
odb::Rect getBBox() const;
118-
dbBTerm* getBTerm() const;
116+
odb::dbBTerm* getBTerm() const;
119117
uint8_t getUsedLayers() const;
120118

121119
// setters
122120
void setId(int id);
123121
void setFixed(bool in);
124122
void setDbInst(odb::dbInst* inst);
125-
void setBTerm(dbBTerm* term);
123+
void setBTerm(odb::dbBTerm* term);
126124
void setLeft(DbuX x);
127125
void setBottom(DbuY y);
128126
void setOrient(const odb::dbOrientType& in);

src/rcx/include/rcx/dbUtil.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class Logger;
2121
namespace rcx {
2222

2323
using odb::dbBox;
24-
using odb::dbBTerm;
2524
using odb::dbITerm;
2625
using odb::dbMatrix;
2726
using odb::dbObject;
@@ -80,12 +79,13 @@ class dbCreateNetUtil
8079
bool setFirstShapeProperty(odb::dbNet* net, uint prop);
8180
dbTechLayerRule* getRule(int routingLayer, int width);
8281
dbTechVia* getVia(int l1, int l2, odb::Rect& bbox);
83-
std::pair<dbBTerm*, dbBTerm*> createTerms4SingleNet(odb::dbNet* net,
84-
int x1,
85-
int y1,
86-
int x2,
87-
int y2,
88-
dbTechLayer* inly);
82+
std::pair<odb::dbBTerm*, odb::dbBTerm*> createTerms4SingleNet(
83+
odb::dbNet* net,
84+
int x1,
85+
int y1,
86+
int x2,
87+
int y2,
88+
dbTechLayer* inly);
8989

9090
using RuleMap = std::map<int, dbTechLayerRule*>;
9191
dbTech* _tech;

src/rcx/include/rcx/extRCap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ class extMain
17761776
uint resetMapNodes_v2(odb::dbWire* wire);
17771777

17781778
uint getCapNodeId_v2(dbITerm* iterm, const uint junction);
1779-
uint getCapNodeId_v2(dbBTerm* bterm, const uint junction);
1779+
uint getCapNodeId_v2(odb::dbBTerm* bterm, const uint junction);
17801780
uint getCapNodeId_v2(odb::dbNet* net, const int junction, const bool branch);
17811781
uint getCapNodeId_v2(odb::dbNet* net,
17821782
odb::dbWirePath& path,

src/rcx/include/rcx/extRulesPattern.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ class extRulesPat
176176
void WriteDB(uint jj, uint dir, uint met, odb::dbTechLayer* layer, FILE* fp);
177177
void WriteWire(FILE* fp, int ll[2], int ur[2], char* name);
178178

179-
dbBTerm* createBterm1(bool lo,
180-
odb::dbNet* net,
181-
int ll[2],
182-
int ur[2],
183-
const char* postFix,
184-
odb::dbTechLayer* layer,
185-
uint width,
186-
bool horizontal,
187-
bool io);
179+
odb::dbBTerm* createBterm1(bool lo,
180+
odb::dbNet* net,
181+
int ll[2],
182+
int ur[2],
183+
const char* postFix,
184+
odb::dbTechLayer* layer,
185+
uint width,
186+
bool horizontal,
187+
bool io);
188188
odb::dbNet* createNetSingleWire(const char* netName,
189189
int ll[2],
190190
int ur[2],
@@ -206,15 +206,15 @@ class extRulesPat
206206
odb::dbTechVia* via);
207207
void WriteDBWireVia(uint jj, uint dir, odb::dbTechVia* via);
208208
// dkf 12/20/2023
209-
dbBTerm* createBterm(bool lo,
210-
odb::dbNet* net,
211-
int ll[2],
212-
int ur[2],
213-
const char* postFix,
214-
odb::dbTechLayer* layer,
215-
uint width,
216-
bool horizontal,
217-
bool io);
209+
odb::dbBTerm* createBterm(bool lo,
210+
odb::dbNet* net,
211+
int ll[2],
212+
int ur[2],
213+
const char* postFix,
214+
odb::dbTechLayer* layer,
215+
uint width,
216+
bool horizontal,
217+
bool io);
218218
// dkf 12/26/2023
219219
uint GetViaCutCount(odb::dbTechVia* tvia);
220220
double GetViaArea(odb::dbTechVia* tvia);

src/rcx/src/dbUtil.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ odb::dbNet* dbCreateNetUtil::createNetSingleWire(const char* netName,
349349

350350
net->setSigType(dbSigType::SIGNAL);
351351

352-
std::pair<dbBTerm*, dbBTerm*> blutrms;
352+
std::pair<odb::dbBTerm*, odb::dbBTerm*> blutrms;
353353

354354
if (!skipBterms) {
355355
blutrms = createTerms4SingleNet(
@@ -597,7 +597,7 @@ odb::dbNet* dbCreateNetUtil::createNetSingleWire(const char* netName,
597597

598598
net->setSigType(dbSigType::SIGNAL);
599599

600-
std::pair<dbBTerm*, dbBTerm*> blutrms;
600+
std::pair<odb::dbBTerm*, odb::dbBTerm*> blutrms;
601601

602602
if (!skipBterms) {
603603
blutrms = createTerms4SingleNet(
@@ -649,21 +649,21 @@ odb::dbNet* dbCreateNetUtil::createNetSingleWire(const char* netName,
649649
return net;
650650
}
651651

652-
std::pair<dbBTerm*, dbBTerm*> dbCreateNetUtil::createTerms4SingleNet(
652+
std::pair<odb::dbBTerm*, odb::dbBTerm*> dbCreateNetUtil::createTerms4SingleNet(
653653
odb::dbNet* net,
654654
int x1,
655655
int y1,
656656
int x2,
657657
int y2,
658658
dbTechLayer* inly)
659659
{
660-
std::pair<dbBTerm*, dbBTerm*> retpr;
660+
std::pair<odb::dbBTerm*, odb::dbBTerm*> retpr;
661661
retpr.first = nullptr;
662662
retpr.second = nullptr;
663663

664664
std::string term_str(net->getName());
665665
term_str = term_str + "_BL";
666-
dbBTerm* blterm = dbBTerm::create(net, term_str.c_str());
666+
odb::dbBTerm* blterm = odb::dbBTerm::create(net, term_str.c_str());
667667

668668
uint dx = x2 - x1;
669669
uint dy = y2 - y1;
@@ -675,10 +675,10 @@ std::pair<dbBTerm*, dbBTerm*> dbCreateNetUtil::createTerms4SingleNet(
675675

676676
term_str = net->getName();
677677
term_str = term_str + "_BU";
678-
dbBTerm* buterm = dbBTerm::create(net, term_str.c_str());
678+
odb::dbBTerm* buterm = odb::dbBTerm::create(net, term_str.c_str());
679679

680680
if (!buterm) {
681-
dbBTerm::destroy(blterm);
681+
odb::dbBTerm::destroy(blterm);
682682
return retpr;
683683
}
684684

src/rcx/src/extSpef.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ void extSpef::writeITerm(const uint node)
377377

378378
void extSpef::writeBTerm(const uint node)
379379
{
380-
dbBTerm* bterm = dbBTerm::getBTerm(_block, node);
380+
odb::dbBTerm* bterm = odb::dbBTerm::getBTerm(_block, node);
381381
if (_bufString) {
382382
sprintf(_msgBuf1, "%s ", addEscChar(bterm->getName().c_str(), false));
383383
strcat(_bufString, _msgBuf1);
@@ -475,7 +475,7 @@ void extSpef::writeCapPort(const uint node, const uint capIndex)
475475

476476
void extSpef::writePort(const uint node)
477477
{
478-
dbBTerm* bterm = dbBTerm::getBTerm(_block, node);
478+
odb::dbBTerm* bterm = odb::dbBTerm::getBTerm(_block, node);
479479
fprintf(_outFP,
480480
"*P %s %c",
481481
addEscChar(bterm->getName().c_str(), false),
@@ -850,8 +850,9 @@ class compareCC
850850
const uint id1 = cp1->getNode();
851851
const uint id2 = cp2->getNode();
852852
if (cp1->isBTerm() && cp2->isBTerm()) {
853-
const int rc = strcmp(dbBTerm::getBTerm(block, id1)->getName().c_str(),
854-
dbBTerm::getBTerm(block, id2)->getName().c_str());
853+
const int rc
854+
= strcmp(odb::dbBTerm::getBTerm(block, id1)->getName().c_str(),
855+
odb::dbBTerm::getBTerm(block, id2)->getName().c_str());
855856
if (rc != 0) {
856857
return (rc < 0 ? true : false);
857858
}
@@ -889,8 +890,9 @@ class compareCC
889890
const uint id1 = cp1->getNode();
890891
const uint id2 = cp2->getNode();
891892
if (cp1->isBTerm() && cp2->isBTerm()) {
892-
const int rc = strcmp(dbBTerm::getBTerm(block, id1)->getName().c_str(),
893-
dbBTerm::getBTerm(block, id2)->getName().c_str());
893+
const int rc
894+
= strcmp(odb::dbBTerm::getBTerm(block, id1)->getName().c_str(),
895+
odb::dbBTerm::getBTerm(block, id2)->getName().c_str());
894896
if (rc != 0) {
895897
return (rc < 0 ? true : false);
896898
}
@@ -1269,12 +1271,12 @@ void extSpef::writeBlockPorts()
12691271
if (_partial && !_btermFound) {
12701272
return;
12711273
}
1272-
dbSet<dbBTerm> bterms = _block->getBTerms();
1274+
dbSet<odb::dbBTerm> bterms = _block->getBTerms();
12731275
if (!bterms.empty()) {
12741276
writeKeyword("\n*PORTS");
12751277
}
12761278

1277-
for (dbBTerm* bterm : bterms) {
1279+
for (odb::dbBTerm* bterm : bterms) {
12781280
if (bterm->getSigType().isSupply()) {
12791281
continue;
12801282
}
@@ -1363,7 +1365,7 @@ void extSpef::writeNetMap(dbSet<dbNet>& nets)
13631365
for (dbITerm* iterm : net->getITerms()) {
13641366
iterm->getInst()->setUserFlag1();
13651367
}
1366-
for (dbBTerm* bterm : net->getBTerms()) {
1368+
for (odb::dbBTerm* bterm : net->getBTerms()) {
13671369
_btermFound = true;
13681370
bterm->setMark(1);
13691371
}
@@ -1624,7 +1626,7 @@ uint extSpef::getMappedBTermId(const uint spefId)
16241626
return 0;
16251627
}
16261628
const char* name = _nameMapTable->geti(spefId);
1627-
dbBTerm* bterm = _block->findBTerm(name);
1629+
odb::dbBTerm* bterm = _block->findBTerm(name);
16281630
return bterm->getId();
16291631
}
16301632

0 commit comments

Comments
 (0)