|
|
|||
File indexing completed on 2026-10-02 09:14:27
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_Unit.hxx> 0024 #include <NCollection_Sequence.hxx> 0025 #include <NCollection_HSequence.hxx> 0026 #include <Standard_Transient.hxx> 0027 #include <TCollection_AsciiString.hxx> 0028 #include <Standard_Integer.hxx> 0029 class TCollection_HAsciiString; 0030 class Units_Dimensions; 0031 0032 //! This class stores in its field all the possible 0033 //! units of all the unit systems for a given physical 0034 //! quantity. Each unit's value is expressed in the 0035 //! S.I. unit system. 0036 class Units_Quantity : public Standard_Transient 0037 { 0038 0039 public: 0040 //! Creates a new Quantity object with <aname> which is 0041 //! the name of the physical quantity, <adimensions> which 0042 //! is the physical dimensions, and <aunitssequence> which 0043 //! describes all the units known for this quantity. 0044 Units_Quantity(const char* const aname, 0045 const occ::handle<Units_Dimensions>& adimensions, 0046 const occ::handle<NCollection_HSequence<occ::handle<Units_Unit>>>& aunitssequence); 0047 0048 //! Returns in a AsciiString from TCollection the name of the quantity. 0049 TCollection_AsciiString Name() const; 0050 0051 //! Returns the physical dimensions of the quantity. 0052 occ::handle<Units_Dimensions> Dimensions() const; 0053 0054 //! Returns <theunitssequence>, which is the sequence of 0055 //! all the units stored for this physical quantity. 0056 occ::handle<NCollection_HSequence<occ::handle<Units_Unit>>> Sequence() const; 0057 0058 //! Returns True if the name of the Quantity <me> is equal 0059 //! to <astring>, False otherwise. 0060 Standard_EXPORT bool IsEqual(const char* const astring) const; 0061 0062 //! Useful for debugging. 0063 Standard_EXPORT void Dump(const int ashift, const int alevel) const; 0064 0065 DEFINE_STANDARD_RTTIEXT(Units_Quantity, Standard_Transient) 0066 0067 private: 0068 occ::handle<TCollection_HAsciiString> thename; 0069 occ::handle<Units_Dimensions> thedimensions; 0070 occ::handle<NCollection_HSequence<occ::handle<Units_Unit>>> theunitssequence; 0071 }; 0072 0073 #include <Units_Quantity.lxx> 0074 0075 #endif // _Units_Quantity_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|