DataBase Unit managment (API). More...
Public Types | |
| enum | StringMode { Db = (1<<0) , Grid = (1<<1) , Symbolic = (1<<2) , Physical = (1<<3) , SmartTruncate = (1<<4) } |
| typedef std::int64_t | Unit |
Static Public Member Functions | |
| static Unit | fromDb (Unit value) |
| static Unit | fromGrid (double value) |
| static Unit | fromLambda (double value) |
| static Unit | fromPhysical (double value, UnitPower p) |
| static unsigned int | getPrecision () |
| static unsigned int | getMaximalPrecision () |
| static double | getResolution () |
| static void | setPrecision (unsigned int precision, unsigned int flags=NoFlags) |
| static void | setGridsPerLambda (double gridsPerLambda, unsigned int flags=NoFlags) |
| static double | getGridsPerLambda () |
| static DbU::Unit | getRealSnapGridStep () |
| static DbU::Unit | getOnRealSnapGrid (DbU::Unit u, SnapMode mode=Nearest) |
| static void | setRealSnapGridStep (DbU::Unit step) |
| static DbU::Unit | getSymbolicSnapGridStep () |
| static DbU::Unit | getOnSymbolicSnapGrid (DbU::Unit u, SnapMode mode=Nearest) |
| static void | setSymbolicSnapGridStep (DbU::Unit step) |
| static DbU::Unit | getOnCustomGrid (DbU::Unit u, DbU::Unit step, SnapMode mode=Nearest) |
| static DbU::Unit | getOnPhysicalGrid (DbU::Unit u, SnapMode mode=Superior) |
| static Unit | toDb (Unit u) |
| static double | toGrid (Unit u) |
| static double | toLambda (Unit u) |
| static double | toPhysical (Unit u, UnitPower p) |
| static string | getValueString (Unit u, int mode=SmartTruncate) |
| static void | setStringMode (unsigned int mode, UnitPower p=Nano) |
Obsoleteds | |
Due to their somewhat unclear naming convention, those functions have been renamed by the to / from variants. | |
| enum | UnitPower { Pico = 1 , Nano , Micro , Milli , Unity , Kilo } |
| enum | SnapMode { Inferior = 1 , Superior = 2 , Nearest = 4 } |
| static Unit | db (Unit value) |
| static Unit | grid (double value) |
| static Unit | lambda (double value) |
| static Unit | getDb (Unit u) |
| static double | getGrid (Unit u) |
| static double | getLambda (Unit u) |
DataBase Unit managment (API).
Explanations about this class are here DbU/Unit description.
| typedef std::int64_t Hurricane::DbU::Unit |
The working DataBase type for storing dimensions.
Select how units are to be printed by getValueString().
| Enumerator | |
|---|---|
| Db | Units are printed "as is", their true value as stored in the DataBase. |
| Grid | Units are printed as founder grid steps. |
| Symbolic | Units are printed as symbolic (lambdas). |
Returns: the unit corresponding to the value <value> according to the current precision. This function do nothing apart from a cast.
Referenced by db().
|
inlinestatic |
Returns: the unit corresponding to the grid value <value> according to the current precision.
Referenced by fromLambda(), fromPhysical(), and grid().
|
inlinestatic |
Returns: the unit corresponding to the symbolic value <value> according to the current precision.
References fromGrid().
Referenced by lambda().
Returns: the unit corresponding to the physical value <value> with power p, according to the current precision.
References fromGrid().
Returns: the unit corresponding to the value <value> according to the current precision. This function do nothing apart from a cast.
References fromDb().
|
inlinestatic |
Returns: the unit corresponding to the grid value <value> according to the current precision.
References fromGrid().
Referenced by getOnPhysicalGrid().
|
inlinestatic |
Returns: the unit corresponding to the symbolic value <value> according to the current precision.
References fromLambda().
|
static |
Returns: the current precision (whose default is fixed to 1).
|
static |
Returns: the maximal precision allowed (currently fixed to 3).
|
static |
Returns: the current resolution.
|
static |
Allows to set the precision at a requested value. This must be done at the begining of the program (before the creation of the first unit) and not changed for the following (unless mandatory and for a temporary period because all existing units would be misinterpreted).
|
static |
Returns: Sets how many founder grid steps makes one lambda. It must be an event integer otherwise an exception is thrown.
|
static |
Returns: How many founder grid steps makes one lambda.
|
static |
Get the real (founder) grid step.
|
static |
Get the snap point from the unit u, using the rounding mode mode.
References Nearest, and setRealSnapGridStep().
|
inlinestatic |
Set the real (founder) grid step.
Referenced by getOnRealSnapGrid().
|
static |
Get the symbolic grid step.
|
static |
Get the snap point from the unit u, using the rounding mode mode.
References Nearest, and setSymbolicSnapGridStep().
|
inlinestatic |
Set the symbolic grid step.
Referenced by getOnSymbolicSnapGrid().
|
static |
Get the snap point from the unit u, with grid step step using the rounding mode mode.
References getDb(), getGrid(), getLambda(), getOnPhysicalGrid(), Nearest, Superior, toDb(), toGrid(), toLambda(), and toPhysical().
Referenced by getOnPhysicalGrid().
|
inlinestatic |
Get the physical grid unit nearest to u, with mode rounding. using the rounding mode mode.
References getOnCustomGrid(), and grid().
Referenced by getOnCustomGrid().
Returns: the external value associated to the unit <unit> according to the current precision. This function do nothing apart from a type cast.
Referenced by getDb(), and getOnCustomGrid().
|
inlinestatic |
Returns: the value expressed as a number of founder grid steps associated to the unit <unit> according to the current precision.
Referenced by getGrid(), getOnCustomGrid(), and toLambda().
|
inlinestatic |
Returns: the symbolic value (expressed as a number lambdas) associated to the unit <unit> according to the current precision.
References toGrid().
Referenced by getLambda(), and getOnCustomGrid().
Returns: the physical value of u, expressed in the power p.
Referenced by getOnCustomGrid().
Returns: the external value associated to the unit <unit> according to the current precision. This function do nothing apart from a type cast.
References toDb().
Referenced by getOnCustomGrid().
|
inlinestatic |
Returns: the value expressed as a number of founder grid steps associated to the unit <unit> according to the current precision.
References toGrid().
Referenced by getOnCustomGrid().
|
inlinestatic |
Returns: the symbolic value (expressed as a number lambdas) associated to the unit <unit> according to the current precision.
References toLambda().
Referenced by getOnCustomGrid().
|
static |
<unit>. The value is converted in the length according to setStringMode(): database, grid or symbolic.References getValueString().
Referenced by getValueString().
Sets in which length the units are to be displayed by getValueString(). Avalaibles modes are :
References Nano.
| Generated by doxygen 1.18.0 on | Return to top of page |
| Hurricane VLSI Database | Copyright © 2000-2020 Bull S.A. All rights reserved |