Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:29

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 
0027 class Units_Dimensions;
0028 DEFINE_STANDARD_HANDLE(Units_Dimensions, Standard_Transient)
0029 
0030 //! This class includes all  the methods to create and
0031 //! manipulate    the   dimensions  of the    physical
0032 //! quantities.
0033 class Units_Dimensions : public Standard_Transient
0034 {
0035 
0036 public:
0037 
0038   
0039   //! Returns  a  Dimensions  object  which  represents  the
0040   //! dimension  of  a  physical  quantity.    Each  of  the
0041   //! <amass>,  <alength>,   <atime>,   <anelectriccurrent>,
0042   //! <athermodynamictemperature>,    <anamountofsubstance>,
0043   //! <aluminousintensity>, <aplaneangle>, <asolidangle> are
0044   //! the powers for  the 7  fundamental  units of  physical
0045   //! quantity and  the 2  secondary  fundamental  units  of
0046   //! physical quantity.
0047   Standard_EXPORT Units_Dimensions(const Standard_Real amass, const Standard_Real alength, const Standard_Real atime, const Standard_Real anelectriccurrent, const Standard_Real athermodynamictemperature, const Standard_Real anamountofsubstance, const Standard_Real aluminousintensity, const Standard_Real aplaneangle, const Standard_Real asolidangle);
0048   
0049   //! Returns the power of mass stored in the dimensions.
0050     Standard_Real Mass() const;
0051   
0052   //! Returns the power of length stored in the dimensions.
0053     Standard_Real Length() const;
0054   
0055   //! Returns the power of time stored in the dimensions.
0056     Standard_Real Time() const;
0057   
0058   //! Returns the  power of  electrical  intensity (current)
0059   //! stored in the dimensions.
0060     Standard_Real ElectricCurrent() const;
0061   
0062   //! Returns  the  power  of   temperature stored  in   the
0063   //! dimensions.
0064     Standard_Real ThermodynamicTemperature() const;
0065   
0066   //! Returns  the power   of quantity   of  material (mole)
0067   //! stored in the dimensions.
0068     Standard_Real AmountOfSubstance() const;
0069   
0070   //! Returns the  power of light   intensity stored  in the
0071   //! dimensions.
0072     Standard_Real LuminousIntensity() const;
0073   
0074   //! Returns  the power   of plane   angle  stored  in  the
0075   //! dimensions.
0076     Standard_Real PlaneAngle() const;
0077   
0078   //! Returns the   power   of  solid angle stored   in  the
0079   //! dimensions.
0080     Standard_Real SolidAngle() const;
0081   
0082   //! Returns the quantity string of the dimension
0083   Standard_EXPORT Standard_CString Quantity() const;
0084   
0085   //! Creates and returns  a new Dimensions  object which is
0086   //! the   result   of the  multiplication    of  <me>  and
0087   //! <adimensions>.
0088   Standard_EXPORT Handle(Units_Dimensions) Multiply (const Handle(Units_Dimensions)& adimensions) const;
0089   
0090   //! Creates and returns a new  Dimensions object which  is
0091   //! the result of the division of <me> by <adimensions>.
0092   Standard_EXPORT Handle(Units_Dimensions) Divide (const Handle(Units_Dimensions)& adimensions) const;
0093   
0094   //! Creates  and returns a new  Dimensions object which is
0095   //! the result of the power of <me> and <anexponent>.
0096   Standard_EXPORT Handle(Units_Dimensions) Power (const Standard_Real anexponent) const;
0097   
0098   //! Returns true if  <me>  and <adimensions> have the same
0099   //! dimensions, false otherwise.
0100   Standard_EXPORT Standard_Boolean IsEqual (const Handle(Units_Dimensions)& adimensions) const;
0101   
0102   //! Returns false if <me> and  <adimensions> have the same
0103   //! dimensions, true otherwise.
0104   Standard_EXPORT Standard_Boolean IsNotEqual (const Handle(Units_Dimensions)& adimensions) const;
0105   
0106   //! Useful for degugging.
0107   Standard_EXPORT void Dump (const Standard_Integer ashift) const;
0108   
0109   Standard_EXPORT static Handle(Units_Dimensions) ALess();
0110   
0111   Standard_EXPORT static Handle(Units_Dimensions) AMass();
0112   
0113   Standard_EXPORT static Handle(Units_Dimensions) ALength();
0114   
0115   Standard_EXPORT static Handle(Units_Dimensions) ATime();
0116   
0117   Standard_EXPORT static Handle(Units_Dimensions) AElectricCurrent();
0118   
0119   Standard_EXPORT static Handle(Units_Dimensions) AThermodynamicTemperature();
0120   
0121   Standard_EXPORT static Handle(Units_Dimensions) AAmountOfSubstance();
0122   
0123   Standard_EXPORT static Handle(Units_Dimensions) ALuminousIntensity();
0124   
0125   Standard_EXPORT static Handle(Units_Dimensions) APlaneAngle();
0126   
0127   //! Returns the basic dimensions.
0128   Standard_EXPORT static Handle(Units_Dimensions) ASolidAngle();
0129 
0130 
0131 
0132 
0133   DEFINE_STANDARD_RTTIEXT(Units_Dimensions,Standard_Transient)
0134 
0135 protected:
0136 
0137 
0138 
0139 
0140 private:
0141 
0142 
0143   Standard_Real themass;
0144   Standard_Real thelength;
0145   Standard_Real thetime;
0146   Standard_Real theelectriccurrent;
0147   Standard_Real thethermodynamictemperature;
0148   Standard_Real theamountofsubstance;
0149   Standard_Real theluminousintensity;
0150   Standard_Real theplaneangle;
0151   Standard_Real thesolidangle;
0152 
0153 
0154 };
0155 
0156 
0157 #include <Units_Dimensions.lxx>
0158 
0159 
0160 
0161 
0162 
0163 #endif // _Units_Dimensions_HeaderFile