PySharp Units of Measure
Units of Measure in Python
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
uom.cache_manager.CacheManager Class Reference

This class manages the various caches for units of measure to improve performance. More...

Public Member Functions

def __init__ (self)
 
def getUOMBySymbol (self, symbol)
 Get the unit of measure with this unique symbol. More...
 
def getUOMByUnit (self, unit)
 Get the unit of measure with this Unit enumeration. More...
 
def getBaseUOM (self, baseSymbol)
 Get the unit of measure with this base symbol. More...
 
def clearCache (self)
 Remove all cached units of measure.
 
def getCachedUOMs (self)
 
def getSymbolCache (self)
 Get the units of measure cached by their symbol. More...
 
def getBaseSymbolCache (self)
 Get the units of measure cached by their base symbol. More...
 
def getEnumerationCache (self)
 Get the units of measure cached by their Unit enumeration. More...
 
def unregisterUOM (self, uom)
 Remove a UOM from the cache. More...
 
def registerUOM (self, uom)
 Cache this unit of measure. More...
 
def getTypeMap (self, unitType)
 

Static Public Member Functions

def instance ()
 

Public Attributes

 symbolRegistry
 
 baseRegistry
 
 unitRegistry
 
 unitTypeRegistry
 

Static Public Attributes

 manager = None
 

Detailed Description

This class manages the various caches for units of measure to improve performance.

Member Function Documentation

◆ getBaseSymbolCache()

def uom.cache_manager.CacheManager.getBaseSymbolCache (   self)

Get the units of measure cached by their base symbol.

Returns
Base symbol cache

◆ getBaseUOM()

def uom.cache_manager.CacheManager.getBaseUOM (   self,
  baseSymbol 
)

Get the unit of measure with this base symbol.

Parameters
baseSymbolBase symbol
Returns
UnitOfMeasure

◆ getEnumerationCache()

def uom.cache_manager.CacheManager.getEnumerationCache (   self)

Get the units of measure cached by their Unit enumeration.

Returns
Enumeration cache

◆ getSymbolCache()

def uom.cache_manager.CacheManager.getSymbolCache (   self)

Get the units of measure cached by their symbol.

Returns
Symbol cache

◆ getUOMBySymbol()

def uom.cache_manager.CacheManager.getUOMBySymbol (   self,
  symbol 
)

Get the unit of measure with this unique symbol.

Parameters
symbolSymbol
Returns
UnitOfMeasure

◆ getUOMByUnit()

def uom.cache_manager.CacheManager.getUOMByUnit (   self,
  unit 
)

Get the unit of measure with this Unit enumeration.

Parameters
unitUnit
Returns
UnitOfMeasure

◆ registerUOM()

def uom.cache_manager.CacheManager.registerUOM (   self,
  uom 
)

Cache this unit of measure.

Parameters
uomUnitOfMeasure to cache

◆ unregisterUOM()

def uom.cache_manager.CacheManager.unregisterUOM (   self,
  uom 
)

Remove a UOM from the cache.

Parameters
uomUnitOfMeasure to remove

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