Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:17:35

0001 // Created on: 1992-06-22
0002 // Created by: Gilles DEBARBOUILLE
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Units_Dimensions_HeaderFile
0018 #define _Units_Dimensions_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Transient.hxx>
0024 #include <Standard_Integer.hxx>
0025 
0026 //! This class includes all the methods to create and
0027 //! manipulate the dimensions of the physical
0028 //! quantities.
0029 class Units_Dimensions : public Standard_Transient
0030 {
0031 
0032 public:
0033   //! Returns a Dimensions object which represents the
0034   //! dimension of a physical quantity. Each of the
0035   //! <amass>, <alength>, <atime>, <anelectriccurrent>,
0036   //! <athermodynamictemperature>, <anamountofsubstance>,
0037   //! <aluminousintensity>, <aplaneangle>, <asolidangle> are
0038   //! the powers for the 7 fundamental units of physical
0039   //! quantity and the 2 secondary fundamental units of
0040   //! physical quantity.
0041   Standard_EXPORT Units_Dimensions(const double amass,
0042                                    const double alength,
0043                                    const double atime,
0044                                    const double anelectriccurrent,
0045                                    const double athermodynamictemperature,
0046                                    const double anamountofsubstance,
0047                                    const double aluminousintensity,
0048                                    const double aplaneangle,
0049                                    const double asolidangle);
0050 
0051   //! Returns the power of mass stored in the dimensions.
0052   double Mass() const;
0053 
0054   //! Returns the power of length stored in the dimensions.
0055   double Length() const;
0056 
0057   //! Returns the power of time stored in the dimensions.
0058   double Time() const;
0059 
0060   //! Returns the power of electrical intensity (current)
0061   //! stored in the dimensions.
0062   double ElectricCurrent() const;
0063 
0064   //! Returns the power of temperature stored in the
0065   //! dimensions.
0066   double ThermodynamicTemperature() const;
0067 
0068   //! Returns the power of quantity of material (mole)
0069   //! stored in the dimensions.
0070   double AmountOfSubstance() const;
0071 
0072   //! Returns the power of light intensity stored in the
0073   //! dimensions.
0074   double LuminousIntensity() const;
0075 
0076   //! Returns the power of plane angle stored in the
0077   //! dimensions.
0078   double PlaneAngle() const;
0079 
0080   //! Returns the power of solid angle stored in the
0081   //! dimensions.
0082   double SolidAngle() const;
0083 
0084   //! Returns the quantity string of the dimension
0085   Standard_EXPORT const char* Quantity() const;
0086 
0087   //! Creates and returns a new Dimensions object which is
0088   //! the result of the multiplication of <me> and
0089   //! <adimensions>.
0090   Standard_EXPORT occ::handle<Units_Dimensions> Multiply(
0091     const occ::handle<Units_Dimensions>& adimensions) const;
0092 
0093   //! Creates and returns a new Dimensions object which is
0094   //! the result of the division of <me> by <adimensions>.
0095   Standard_EXPORT occ::handle<Units_Dimensions> Divide(
0096     const occ::handle<Units_Dimensions>& adimensions) const;
0097 
0098   //! Creates and returns a new Dimensions object which is
0099   //! the result of the power of <me> and <anexponent>.
0100   Standard_EXPORT occ::handle<Units_Dimensions> Power(const double anexponent) const;
0101 
0102   //! Returns true if <me> and <adimensions> have the same
0103   //! dimensions, false otherwise.
0104   Standard_EXPORT bool IsEqual(const occ::handle<Units_Dimensions>& adimensions) const;
0105 
0106   //! Returns false if <me> and <adimensions> have the same
0107   //! dimensions, true otherwise.
0108   Standard_EXPORT bool IsNotEqual(const occ::handle<Units_Dimensions>& adimensions) const;
0109 
0110   //! Useful for degugging.
0111   Standard_EXPORT void Dump(const int ashift) const;
0112 
0113   Standard_EXPORT static occ::handle<Units_Dimensions> ALess();
0114 
0115   Standard_EXPORT static occ::handle<Units_Dimensions> AMass();
0116 
0117   Standard_EXPORT static occ::handle<Units_Dimensions> ALength();
0118 
0119   Standard_EXPORT static occ::handle<Units_Dimensions> ATime();
0120 
0121   Standard_EXPORT static occ::handle<Units_Dimensions> AElectricCurrent();
0122 
0123   Standard_EXPORT static occ::handle<Units_Dimensions> AThermodynamicTemperature();
0124 
0125   Standard_EXPORT static occ::handle<Units_Dimensions> AAmountOfSubstance();
0126 
0127   Standard_EXPORT static occ::handle<Units_Dimensions> ALuminousIntensity();
0128 
0129   Standard_EXPORT static occ::handle<Units_Dimensions> APlaneAngle();
0130 
0131   //! Returns the basic dimensions.
0132   Standard_EXPORT static occ::handle<Units_Dimensions> ASolidAngle();
0133 
0134   DEFINE_STANDARD_RTTIEXT(Units_Dimensions, Standard_Transient)
0135 
0136 private:
0137   double themass;
0138   double thelength;
0139   double thetime;
0140   double theelectriccurrent;
0141   double thethermodynamictemperature;
0142   double theamountofsubstance;
0143   double theluminousintensity;
0144   double theplaneangle;
0145   double thesolidangle;
0146 };
0147 
0148 #include <Units_Dimensions.lxx>
0149 
0150 #endif // _Units_Dimensions_HeaderFile