Пример #1
0
};

/** GPDUnit is a Unit with baseUnits fixed by its constructors, see GPDExpnt. setBaseUnitExponent
 *  throws an exception if any other string is passed in as a baseUnit. GPDUnit.hpp declares
 *  related operators and UnitFactory callback functions. */
class UTILITIES_API GPDUnit : public Unit {
 public:
  /** @name Constructors and Destructors */
  //@{

  /** Default constructor.
   *
   *  \param[in] exponents holds the exponents for each base unit.
   *  \param[in] scaleExponent exponent for scale. For instance 3 for kilo.
   *  \param[in] prettyString optional string to use in place of standardString. */
  GPDUnit(const GPDExpnt& exponents=GPDExpnt(),
         int scaleExponent=0,
         const std::string& prettyString="");

  /** Alternate constructor. Specify the abbreviation of the scale, rather than its
   *  exponent.
   *
   *  \param[in] scaleAbbreviation is string equal to a scale abbreviation. For instance
   *    "k" for kilo.
   *  \param[in] exponents holds the exponents for each base unit.
   *  \param[in] prettyString optional string to use in place of standardString. */
  GPDUnit(const std::string& scaleAbbreviation,
         const GPDExpnt& exponents=GPDExpnt(),
         const std::string& prettyString="");

  virtual ~GPDUnit() {}
Пример #2
0
GPDUnit createGPDVolumetricFlowrate() {
  return GPDUnit(GPDExpnt(0,1,-1),0,"gpd");
}
Пример #3
0
GPDUnit createGPDLuminousFlux() {
  return GPDUnit(GPDExpnt(0,0,0,0,0,1,0,0,1),0,"lm");
}
Пример #4
0
GPDUnit createGPDCurrency() {
  return GPDUnit(GPDExpnt(0,0,0,0,0,0,0,0,0,0,0,1));
}
Пример #5
0
GPDUnit createGPDVolume() {
  return GPDUnit(GPDExpnt(0,1),0,"gal");
}
Пример #6
0
GPDUnit createGPDPeople() {
  return GPDUnit(GPDExpnt(0,0,0,0,0,0,0,0,0,1));
}
Пример #7
0
GPDUnit createGPDCycle() {
  return GPDUnit(GPDExpnt(0,0,0,0,0,0,0,0,0,0,1));
}
Пример #8
0
GPDUnit createGPDAmountOfSubstance() {
  return GPDUnit(GPDExpnt(0,0,0,0,0,0,1));
}
Пример #9
0
GPDUnit createGPDSolidAngle() {
  return GPDUnit(GPDExpnt(0,0,0,0,0,0,0,0,1));
}
Пример #10
0
GPDUnit createGPDLuminousIntensity() {
  return GPDUnit(GPDExpnt(0,0,0,0,0,1));
}
Пример #11
0
GPDUnit createGPDElectricCurrent() {
  return GPDUnit(GPDExpnt(0,0,0,0,1));
}
Пример #12
0
GPDUnit createGPDTemperature() {
  return GPDUnit(GPDExpnt(0,0,0,1));
}
Пример #13
0
GPDUnit createGPDTime() {
  return GPDUnit(GPDExpnt(0,0,1));
}
Пример #14
0
GPDUnit createGPDPressure() {
  return GPDUnit(GPDExpnt(1));
}