@@ -192,74 +192,69 @@ class dbBox : public dbObject
192192 // /
193193 // / Get the lower coordinate.
194194 // /
195- int xMin ();
195+ int xMin () const ;
196196
197197 // /
198198 // / Get the lower y coordinate.
199199 // /
200- int yMin ();
200+ int yMin () const ;
201201
202202 // /
203203 // / Get the high x coordinate.
204204 // /
205- int xMax ();
205+ int xMax () const ;
206206
207207 // /
208208 // / Get the high y coordinate.
209209 // /
210- int yMax ();
210+ int yMax () const ;
211211
212212 // /
213213 // / Returns true if this box represents a via
214214 // /
215- bool isVia ();
215+ bool isVia () const ;
216216
217217 // /
218218 // / Get tech-via this box represents.
219219 // / returns nullptr if this box does not represent a tech-via
220220 // /
221- dbTechVia* getTechVia ();
221+ dbTechVia* getTechVia () const ;
222222
223223 // /
224224 // / Get block-via this box represents.
225225 // / returns nullptr if this box does not represent a block-via
226226 // /
227- dbVia* getBlockVia ();
228-
229- // /
230- // / Return the placed location of this via.
231- // /
232- void getViaXY (int & x, int & y);
227+ dbVia* getBlockVia () const ;
233228
234229 // /
235230 // / Return the placed location of this via.
236231 // /
237- Point getViaXY ();
232+ Point getViaXY () const ;
238233
239234 // /
240235 // / Get the box bounding points.
241236 // /
242- Rect getBox ();
237+ Rect getBox () const ;
243238
244239 // /
245240 // / Get the translated boxes of this via
246241 // /
247- void getViaBoxes (std::vector<dbShape>& shapes);
242+ void getViaBoxes (std::vector<dbShape>& shapes) const ;
248243
249244 // /
250245 // / Get the translated boxes of this via on the given layer
251246 // /
252- void getViaLayerBoxes (dbTechLayer* layer, std::vector<dbShape>& shapes);
247+ void getViaLayerBoxes (dbTechLayer* layer, std::vector<dbShape>& shapes) const ;
253248
254249 // /
255- // / Get the width (xMax-xMin) of the box.
250+ // / Get the orientation of the box.
256251 // /
257- int getDir ();
252+ Orientation2D getDir () const ;
258253
259254 // /
260255 // / Get the width (xMax-xMin) of the box.
261256 // /
262- uint getDX ();
257+ uint getDX () const ;
263258
264259 int getDesignRuleWidth () const ;
265260
@@ -268,25 +263,25 @@ class dbBox : public dbObject
268263 // /
269264 // / Get the height (yMax-yMin) of the box.
270265 // /
271- uint getDY ();
272- uint getWidth (uint dir = 1 );
273- uint getLength (uint dir = 1 );
266+ uint getDY () const ;
267+ uint getWidth (uint dir = 1 ) const ;
268+ uint getLength (uint dir = 1 ) const ;
274269
275270 // /
276271 // / Set temporary flag visited
277272 // /
278273 void setVisited (bool value);
279- bool isVisited ();
274+ bool isVisited () const ;
280275
281276 // /
282277 // / Get the owner of this box
283278 // /
284- dbObject* getBoxOwner ();
279+ dbObject* getBoxOwner () const ;
285280
286281 // /
287282 // / Get the owner type of this box
288283 // /
289- dbBoxOwner getOwnerType ();
284+ dbBoxOwner getOwnerType () const ;
290285
291286 // /
292287 // / Get the layer of this box.
@@ -300,13 +295,13 @@ class dbBox : public dbObject
300295 // / These bboxes have no layer.
301296 // / All dbBox(s) that represent VIA's.
302297 // /
303- dbTechLayer* getTechLayer ();
298+ dbTechLayer* getTechLayer () const ;
304299
305300 // /
306301 // / Get the layer mask assigned to this box.
307302 // / Returns 0 is not assigned or bbox has no layer
308303 // /
309- uint getLayerMask ();
304+ uint getLayerMask () const ;
310305
311306 // /
312307 // / Sets the layer mask for this box.
@@ -433,37 +428,37 @@ class dbSBox : public dbBox
433428 // /
434429 // / Get the shape type of this wire.
435430 // /
436- dbWireShapeType getWireShapeType ();
431+ dbWireShapeType getWireShapeType () const ;
437432
438433 // /
439434 // / Return the specified direction of this segment
440435 // /
441- Direction getDirection ();
436+ Direction getDirection () const ;
442437
443438 // /
444439 // / Get the swire of this shape
445440 // /
446- dbSWire* getSWire ();
441+ dbSWire* getSWire () const ;
447442
448443 // /
449444 // / Get Oct Wire Shape
450445 // /
451- Oct getOct ();
446+ Oct getOct () const ;
452447
453448 // /
454449 // / Get via mask for bottom layer of via
455450 // /
456- uint getViaBottomLayerMask ();
451+ uint getViaBottomLayerMask () const ;
457452
458453 // /
459454 // / Get via mask for cut layer of via
460455 // /
461- uint getViaCutLayerMask ();
456+ uint getViaCutLayerMask () const ;
462457
463458 // /
464459 // / Get via mask for top layer of via
465460 // /
466- uint getViaTopLayerMask ();
461+ uint getViaTopLayerMask () const ;
467462
468463 // /
469464 // / Set via masks
@@ -473,7 +468,7 @@ class dbSBox : public dbBox
473468 // /
474469 // / Has via mask
475470 // /
476- bool hasViaLayerMasks ();
471+ bool hasViaLayerMasks () const ;
477472
478473 // /
479474 // / Create a set of new sboxes from a via array
0 commit comments