#include <ScaleFactory.hpp>
Singleton that creates scales based on std::string or exponent.
Access using ScaleFactory::instance().
◆ ScaleFactory() [1/2]
openstudio::ScaleFactory::ScaleFactory |
( |
const ScaleFactory & | other | ) |
|
|
delete |
◆ ScaleFactory() [2/2]
openstudio::ScaleFactory::ScaleFactory |
( |
ScaleFactory && | other | ) |
|
|
delete |
◆ createScale() [1/2]
ScaleConstant openstudio::ScaleFactory::createScale |
( |
const std::string & | abbr | ) |
const |
Creates a scale from an abbreviation.
Throws if the factory does not have any scales registered. Returns ScaleConstant with ().value == 0.0 if abbr not in factory.
◆ createScale() [2/2]
Creates a scale from an exponent.
Throws if the factory does not have any scales registered. Returns ScaleConstant with ().value == 0.0 if exponent not in factory.
◆ instance()
static ScaleFactory & openstudio::ScaleFactory::instance |
( |
| ) |
|
|
static |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ registeredScales()
std::vector< Scale > openstudio::ScaleFactory::registeredScales |
( |
| ) |
|
Returns a vector of Scale objects, one for each scale registered in the factory.
◆ registerScale()
bool openstudio::ScaleFactory::registerScale |
( |
ScaleConstant | scale | ) |
|
Store a scale callback function for future lookup using the scale exponent or abbreviation.
By default, SI scales are registered during factory construction.