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_UnitsDictionary_HeaderFile
0018 #define _Units_UnitsDictionary_HeaderFile
0019 
0020 #include <Units_QuantitiesSequence.hxx>
0021 class TCollection_AsciiString;
0022 class Units_Dimensions;
0023 
0024 
0025 class Units_UnitsDictionary;
0026 DEFINE_STANDARD_HANDLE(Units_UnitsDictionary, Standard_Transient)
0027 
0028 //! This class creates  a dictionary of all  the units
0029 //! you want to know.
0030 class Units_UnitsDictionary : public Standard_Transient
0031 {
0032 
0033 public:
0034 
0035   
0036   //! Returns an empty instance of UnitsDictionary.
0037   Standard_EXPORT Units_UnitsDictionary();
0038   
0039   //! Returns a  UnitsDictionary object  which  contains the
0040   //! sequence  of all   the  units  you want to   consider,
0041   //! physical quantity by physical quantity.
0042   Standard_EXPORT void Creates ();
0043   
0044   //! Returns   the  head   of   the  sequence  of  physical
0045   //! quantities.
0046   Handle(Units_QuantitiesSequence) Sequence() const;
0047 
0048   //! Returns for <aquantity> the active unit.
0049   Standard_EXPORT TCollection_AsciiString ActiveUnit (const Standard_CString aquantity) const;
0050   
0051   //! Dumps only  the sequence   of  quantities without  the
0052   //! units  if  <alevel> is  equal  to zero,  and  for each
0053   //! quantity all the units stored if <alevel>  is equal to
0054   //! one.
0055     void Dump (const Standard_Integer alevel) const;
0056   
0057   //! Dumps  for a     designated  physical       dimensions
0058   //! <adimensions> all the previously stored units.
0059     void Dump (const Handle(Units_Dimensions)& adimensions) const;
0060 
0061 
0062 
0063 
0064   DEFINE_STANDARD_RTTIEXT(Units_UnitsDictionary,Standard_Transient)
0065 
0066 protected:
0067 
0068 
0069 
0070 
0071 private:
0072 
0073 
0074   Handle(Units_QuantitiesSequence) thequantitiessequence;
0075 
0076 
0077 };
0078 
0079 
0080 #include <Units_UnitsDictionary.lxx>
0081 
0082 
0083 
0084 
0085 
0086 #endif // _Units_UnitsDictionary_HeaderFile