Skip to content

Commit 7e5fb58

Browse files
committed
odb: update some internal class names to not use a leading underscore
Signed-off-by: Matt Liberty <[email protected]>
1 parent ad56431 commit 7e5fb58

File tree

4 files changed

+42
-41
lines changed

4 files changed

+42
-41
lines changed

src/odb/src/db/dbTechLayerAntennaRule.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ template class dbTable<_dbTechAntennaPinModel>;
2626

2727
using std::vector;
2828

29-
bool _ARuleFactor::operator==(const _ARuleFactor& rhs) const
29+
bool ARuleFactor::operator==(const ARuleFactor& rhs) const
3030
{
3131
if (_factor != rhs._factor) {
3232
return false;
@@ -43,7 +43,7 @@ bool _ARuleFactor::operator==(const _ARuleFactor& rhs) const
4343
return true;
4444
}
4545

46-
bool _ARuleRatio::operator==(const _ARuleRatio& rhs) const
46+
bool ARuleRatio::operator==(const ARuleRatio& rhs) const
4747
{
4848
if (_ratio != rhs._ratio) {
4949
return false;
@@ -151,27 +151,27 @@ bool _dbTechAntennaPinModel::operator==(const _dbTechAntennaPinModel& rhs) const
151151

152152
////////////////////////////////////////////////////////////////////
153153
//
154-
// _ARuleFactor - Methods
154+
// ARuleFactor - Methods
155155
//
156156
////////////////////////////////////////////////////////////////////
157157

158-
void _ARuleFactor::setFactor(double factor, bool diffuse)
158+
void ARuleFactor::setFactor(double factor, bool diffuse)
159159
{
160160
assert(factor > 0.0);
161161
_factor = factor;
162162
_diff_use_only = diffuse;
163163
_explicit = true;
164164
}
165165

166-
dbOStream& operator<<(dbOStream& stream, const _ARuleFactor& arf)
166+
dbOStream& operator<<(dbOStream& stream, const ARuleFactor& arf)
167167
{
168168
stream << arf._factor;
169169
stream << arf._explicit;
170170
stream << arf._diff_use_only;
171171
return stream;
172172
}
173173

174-
dbIStream& operator>>(dbIStream& stream, _ARuleFactor& arf)
174+
dbIStream& operator>>(dbIStream& stream, ARuleFactor& arf)
175175
{
176176
stream >> arf._factor;
177177
stream >> arf._explicit;
@@ -181,41 +181,41 @@ dbIStream& operator>>(dbIStream& stream, _ARuleFactor& arf)
181181

182182
////////////////////////////////////////////////////////////////////
183183
//
184-
// _ARuleRatio - Methods
184+
// ARuleRatio - Methods
185185
//
186186
////////////////////////////////////////////////////////////////////
187187

188-
void _ARuleRatio::setRatio(double ratio)
188+
void ARuleRatio::setRatio(double ratio)
189189
{
190190
assert(ratio > 0);
191191
_ratio = ratio;
192192
}
193193

194-
void _ARuleRatio::setDiff(double ratio)
194+
void ARuleRatio::setDiff(double ratio)
195195
{
196196
assert(ratio > 0);
197197
assert((_diff_idx.size() == 0) && (_diff_ratio.size() == 0));
198198
_diff_idx.assign(1, 0.0);
199199
_diff_ratio.assign(1, ratio);
200200
}
201201

202-
void _ARuleRatio::setDiff(const vector<double>& diff_idx,
202+
void ARuleRatio::setDiff(const vector<double>& diff_idx,
203203
const vector<double>& ratios)
204204
{
205205
assert((_diff_idx.size() == 0) && (_diff_ratio.size() == 0));
206206
_diff_idx = diff_idx;
207207
_diff_ratio = ratios;
208208
}
209209

210-
dbOStream& operator<<(dbOStream& stream, const _ARuleRatio& arrt)
210+
dbOStream& operator<<(dbOStream& stream, const ARuleRatio& arrt)
211211
{
212212
stream << arrt._ratio;
213213
stream << arrt._diff_idx;
214214
stream << arrt._diff_ratio;
215215
return stream;
216216
}
217217

218-
dbIStream& operator>>(dbIStream& stream, _ARuleRatio& arrt)
218+
dbIStream& operator>>(dbIStream& stream, ARuleRatio& arrt)
219219
{
220220
stream >> arrt._ratio;
221221
stream >> arrt._diff_idx;

src/odb/src/db/dbTechLayerAntennaRule.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,35 @@ class lefout;
2828
// An antenna multiplier factor is applied to metal. A separate factor may
2929
// be used for diffusion connected metal.
3030
//
31-
class _ARuleFactor
31+
class ARuleFactor
3232
{
3333
public:
3434
double _factor;
3535
bool _explicit;
3636
bool _diff_use_only;
3737

38-
_ARuleFactor();
38+
ARuleFactor();
3939
void setFactor(double factor, bool diffuse);
40-
bool operator==(const _ARuleFactor& rhs) const;
41-
bool operator!=(const _ARuleFactor& rhs) const { return !operator==(rhs); }
40+
bool operator==(const ARuleFactor& rhs) const;
41+
bool operator!=(const ARuleFactor& rhs) const { return !operator==(rhs); }
4242
};
4343

44-
inline _ARuleFactor::_ARuleFactor()
44+
inline ARuleFactor::ARuleFactor()
4545
{
4646
_factor = 1.0;
4747
_explicit = false;
4848
_diff_use_only = false;
4949
}
5050

51-
dbOStream& operator<<(dbOStream& stream, const _ARuleFactor& arf);
52-
dbIStream& operator>>(dbIStream& stream, _ARuleFactor& arf);
51+
dbOStream& operator<<(dbOStream& stream, const ARuleFactor& arf);
52+
dbIStream& operator>>(dbIStream& stream, ARuleFactor& arf);
5353

5454
//
5555
// An antenna rule ratio is a single ratio for non-diffusion connected segments
5656
// or a piecewise linear function of diffusion area for diffusion connected
5757
// segments.
5858
//
59-
class _ARuleRatio
59+
class ARuleRatio
6060
{
6161
public:
6262
double _ratio{0.0};
@@ -68,12 +68,12 @@ class _ARuleRatio
6868
const std::vector<double>& ratios);
6969
void setDiff(double ratio); // single value stored as PWL
7070

71-
bool operator==(const _ARuleRatio& rhs) const;
72-
bool operator!=(const _ARuleRatio& rhs) const { return !operator==(rhs); }
71+
bool operator==(const ARuleRatio& rhs) const;
72+
bool operator!=(const ARuleRatio& rhs) const { return !operator==(rhs); }
7373
};
7474

75-
dbOStream& operator<<(dbOStream& stream, const _ARuleRatio& arrt);
76-
dbIStream& operator>>(dbIStream& stream, _ARuleRatio& arrt);
75+
dbOStream& operator<<(dbOStream& stream, const ARuleRatio& arrt);
76+
dbIStream& operator>>(dbIStream& stream, ARuleRatio& arrt);
7777

7878
/// An antenna rule comprises a multiplier factor for area and sidearea
7979
/// (perimeter), as well as ratios for the area and sidearea for both
@@ -83,13 +83,13 @@ class _dbTechLayerAntennaRule : public _dbObject
8383
{
8484
public:
8585
dbId<_dbTechLayer> _layer;
86-
_ARuleFactor _area_mult;
87-
_ARuleFactor _sidearea_mult;
88-
_ARuleRatio _par_area_val;
89-
_ARuleRatio _cum_area_val;
90-
_ARuleRatio _par_sidearea_val;
91-
_ARuleRatio _cum_sidearea_val;
92-
_ARuleRatio _area_diff_reduce_val;
86+
ARuleFactor _area_mult;
87+
ARuleFactor _sidearea_mult;
88+
ARuleRatio _par_area_val;
89+
ARuleRatio _cum_area_val;
90+
ARuleRatio _par_sidearea_val;
91+
ARuleRatio _cum_sidearea_val;
92+
ARuleRatio _area_diff_reduce_val;
9393
double _gate_plus_diff_factor;
9494
double _area_minus_diff_factor;
9595
bool _has_antenna_cumroutingpluscut;

src/odb/src/db/dbTechLayerSpacingRule.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class dbOStream;
1818
class _dbTechLayerSpacingRule : public _dbObject
1919
{
2020
public:
21-
enum _RuleType
21+
enum RuleType
2222
{
2323
kDefault = 0,
2424
kRangeOnly,
@@ -35,9 +35,9 @@ class _dbTechLayerSpacingRule : public _dbObject
3535
kEndOfLineParallelTwoEdges
3636
};
3737

38-
struct _Flword
38+
struct Flags
3939
{
40-
_RuleType _rule : 4;
40+
RuleType _rule : 4;
4141
bool _except_same_pgnet : 1;
4242
bool _cut_stacking : 1;
4343
bool _cut_center_to_center : 1;
@@ -49,7 +49,7 @@ class _dbTechLayerSpacingRule : public _dbObject
4949
};
5050

5151
// PERSISTENT-MEMBERS
52-
_Flword flags_;
52+
Flags flags_;
5353
uint _spacing;
5454
uint _length_or_influence;
5555
uint _r1min;

src/odb/src/db/dbTechMinCutOrAreaRule.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ class _dbTechMinCutRule : public _dbObject
1919
{
2020
public:
2121
// PERSISTENT-MEMBERS
22-
enum _RuleType
22+
enum RuleType
2323
{
2424
kNone,
2525
kMinimumCut,
2626
kMinimumCutAbove,
2727
kMinimumCutBelow
2828
};
2929

30-
struct _Flword
30+
struct Flags
3131
{
32-
_RuleType _rule : 3;
32+
RuleType _rule : 3;
3333
uint _cuts_length : 1;
3434
uint _spare_bits : 28;
3535
};
36-
_Flword flags_;
36+
Flags flags_;
3737
uint _num_cuts;
3838
uint _width;
3939
int _cut_distance;
@@ -87,12 +87,13 @@ class _dbTechMinEncRule : public _dbObject
8787
public:
8888
// PERSISTENT-MEMBERS
8989

90-
struct _Flword
90+
struct Flags
9191
{
9292
uint _has_width : 1;
9393
uint _spare_bits : 31;
94-
} flags_;
94+
};
9595

96+
Flags flags_;
9697
uint _area;
9798
uint _width;
9899

0 commit comments

Comments
 (0)