Back to home page

EIC code displayed by LXR

 
 

    


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

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_Quantity_HeaderFile
0018 #define _Units_Quantity_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Units_UnitsSequence.hxx>
0024 #include <Standard_Transient.hxx>
0025 #include <TCollection_AsciiString.hxx>
0026 #include <Standard_Integer.hxx>
0027 class TCollection_HAsciiString;
0028 class Units_Dimensions;
0029 
0030 
0031 class Units_Quantity;
0032 DEFINE_STANDARD_HANDLE(Units_Quantity, Standard_Transient)
0033 
0034 //! This  class stores  in its  field all the possible
0035 //! units of all the unit systems for a given physical
0036 //! quantity. Each unit's  value  is  expressed in the
0037 //! S.I. unit system.
0038 class Units_Quantity : public Standard_Transient
0039 {
0040 
0041 public:
0042 
0043   
0044   //! Creates  a new Quantity  object with <aname> which  is
0045   //! the name of the physical quantity, <adimensions> which
0046   //! is the physical dimensions, and <aunitssequence> which
0047   //! describes all the units known for this quantity.
0048     Units_Quantity(const Standard_CString aname, const Handle(Units_Dimensions)& adimensions, const Handle(Units_UnitsSequence)& aunitssequence);
0049   
0050   //! Returns in a AsciiString from TCollection the name of the quantity.
0051     TCollection_AsciiString Name() const;
0052   
0053   //! Returns the physical dimensions of the quantity.
0054     Handle(Units_Dimensions) Dimensions() const;
0055   
0056   //! Returns <theunitssequence>, which  is the  sequence of
0057   //! all the units stored for this physical quantity.
0058     Handle(Units_UnitsSequence) Sequence() const;
0059   
0060   //! Returns True if the name of the Quantity <me> is equal
0061   //! to <astring>, False otherwise.
0062   Standard_EXPORT Standard_Boolean IsEqual (const Standard_CString astring) const;
0063   
0064   //! Useful for debugging.
0065   Standard_EXPORT void Dump (const Standard_Integer ashift, const Standard_Integer alevel) const;
0066 
0067 
0068 
0069 
0070   DEFINE_STANDARD_RTTIEXT(Units_Quantity,Standard_Transient)
0071 
0072 protected:
0073 
0074 
0075 
0076 
0077 private:
0078 
0079 
0080   Handle(TCollection_HAsciiString) thename;
0081   Handle(Units_Dimensions) thedimensions;
0082   Handle(Units_UnitsSequence) theunitssequence;
0083 
0084 
0085 };
0086 
0087 
0088 #include <Units_Quantity.lxx>
0089 
0090 
0091 
0092 
0093 
0094 #endif // _Units_Quantity_HeaderFile