60bf98ae |
1 | // Created on: 2013-11-11 |
2 | // Created by: Anastasia BORISOVA |
973c2be1 |
3 | // Copyright (c) 2013-2014 OPEN CASCADE SAS |
60bf98ae |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
60bf98ae |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
60bf98ae |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
60bf98ae |
15 | |
16 | #ifndef _Prs3d_DimensionUnits_Header |
17 | #define _Prs3d_DimensionUnits_Header |
18 | |
19 | #include <TCollection_AsciiString.hxx> |
20 | |
21 | //! This class provides units for two dimension groups: |
22 | //! - lengthes (length, radius, diameter) |
23 | //! - angles |
24 | class Prs3d_DimensionUnits |
25 | { |
26 | public: |
27 | |
28 | //! Default constructor. Sets meters as default length units |
29 | //! and radians as default angle units. |
30 | Prs3d_DimensionUnits() |
31 | : myLengthUnits ("m"), |
32 | myAngleUnits ("rad") |
33 | {} |
34 | |
35 | Prs3d_DimensionUnits (const Prs3d_DimensionUnits& theUnits) |
36 | : myLengthUnits (theUnits.GetLengthUnits()), |
37 | myAngleUnits (theUnits.GetAngleUnits()) |
38 | {} |
39 | |
40 | //! Sets angle units |
41 | Standard_EXPORT void SetAngleUnits (const TCollection_AsciiString& theUnits); |
42 | |
43 | //! @return angle units |
44 | const TCollection_AsciiString& GetAngleUnits() const { return myAngleUnits; } |
45 | |
46 | //! Sets length units |
47 | Standard_EXPORT void SetLengthUnits (const TCollection_AsciiString& theUnits); |
48 | |
49 | //! @return length units |
50 | const TCollection_AsciiString& GetLengthUnits() const { return myLengthUnits; } |
51 | |
52 | private: |
53 | |
54 | TCollection_AsciiString myLengthUnits; |
55 | TCollection_AsciiString myAngleUnits; |
56 | }; |
57 | #endif |