1 // Created on: 1992-06-22
2 // Created by: Gilles DEBARBOUILLE
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Units_UnitsDictionary_HeaderFile
18 #define _Units_UnitsDictionary_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Time.hxx>
24 #include <Units_QuantitiesSequence.hxx>
25 #include <Standard_Transient.hxx>
26 #include <Standard_CString.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <Standard_Integer.hxx>
29 class TCollection_HAsciiString;
30 class TCollection_AsciiString;
31 class Units_Dimensions;
34 class Units_UnitsDictionary;
35 DEFINE_STANDARD_HANDLE(Units_UnitsDictionary, Standard_Transient)
37 //! This class creates a dictionary of all the units
39 class Units_UnitsDictionary : public Standard_Transient
45 //! Returns an empty instance of UnitsDictionary.
46 Standard_EXPORT Units_UnitsDictionary();
48 //! Returns a UnitsDictionary object which contains the
49 //! sequence of all the units you want to consider,
50 //! physical quantity by physical quantity.
51 Standard_EXPORT void Creates ();
53 //! Returns the head of the sequence of physical
55 Handle(Units_QuantitiesSequence) Sequence() const;
57 //! Returns for <aquantity> the active unit.
58 Standard_EXPORT TCollection_AsciiString ActiveUnit (const Standard_CString aquantity) const;
60 //! Dumps only the sequence of quantities without the
61 //! units if <alevel> is equal to zero, and for each
62 //! quantity all the units stored if <alevel> is equal to
64 void Dump (const Standard_Integer alevel) const;
66 //! Dumps for a designated physical dimensions
67 //! <adimensions> all the previously stored units.
68 void Dump (const Handle(Units_Dimensions)& adimensions) const;
73 DEFINE_STANDARD_RTTIEXT(Units_UnitsDictionary,Standard_Transient)
83 Handle(Units_QuantitiesSequence) thequantitiessequence;
89 #include <Units_UnitsDictionary.lxx>
95 #endif // _Units_UnitsDictionary_HeaderFile