# Katabatic - Routing Toolbox

List of all members | Public Member Functions
BaseGrid::Axis Class Reference

Graduations on a BaseGrid Axis (H or V). More...

## Public Member Functions
void | addGraduation (DbU::Unit)
void | sort ()
unsigned int | getSize () const
unsigned int | getGraduationNumber (DbU::Unit pos, bool &onGraduation) const
const DbU::Unit & | operator[] (unsigned int i) const

## Detailed Description

Graduations on a BaseGrid Axis (H or V).

Describe the list of graduations on either X or Y axis of a BaseGrid. Graduations correspond to cut lines and may not be evenly spaced.

Graduations are internally stored into a vector that needs to be sorted whenever new graduations are added (BaseGrid::Axis::sort()).

## Member Function Documentation

## ◆ addGraduation()

void addGraduation | ( | DbU::Unit | pos | ) |
| inline

Adds a new graduation. After adding new graduations, do not forget to perform a sort.

Referenced by GCellGrid::_postCreate().

## ◆ sort()

void sort | ( |  | ) |

Re-order the graduations after an addition.

Referenced by GCellGrid::_postCreate().

## ◆ getSize()

size_t getSize | ( |  | ) | const
| inline

Returns: The number of graduations on the axis.

Referenced by GCellGrid::_postCreate().

## ◆ getGraduationNumber()

DbU::Unit getGraduationNumber | ( | DbU::Unit | pos,
|  | bool & | onGraduation
| ) |  | const

Returns: The index of the graduation which is immediatly inferior or equal to `pos`. In case of strict equality, `onGraduation` is set to true.

## ◆ operator[]()

DbU::Unit operator[] | ( | unsigned int | index | ) | const
| inline

Returns: The graduation at `index`.

The documentation for this class was generated from the following files:

- Grid.h
- Grid.cpp
- Grid.dox

Generated by doxygen 1.8.14 on Mon Feb 3 2020 | Return to top of page

Katabatic - Routing Toolbox | Copyright © 2008-2016 UPMC. All rights reserved