973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | |
42cf5bc1 |
15 | #include <Standard_Type.hxx> |
16 | #include <StepBasic_CoordinatedUniversalTimeOffset.hxx> |
17 | #include <StepBasic_LocalTime.hxx> |
7fd59977 |
18 | |
25e59720 |
19 | IMPLEMENT_STANDARD_RTTIEXT(StepBasic_LocalTime,Standard_Transient) |
92efcf78 |
20 | |
7fd59977 |
21 | StepBasic_LocalTime::StepBasic_LocalTime () {} |
22 | |
23 | void StepBasic_LocalTime::Init( |
24 | const Standard_Integer aHourComponent, |
25 | const Standard_Boolean hasAminuteComponent, |
26 | const Standard_Integer aMinuteComponent, |
27 | const Standard_Boolean hasAsecondComponent, |
28 | const Standard_Real aSecondComponent, |
29 | const Handle(StepBasic_CoordinatedUniversalTimeOffset)& aZone) |
30 | { |
31 | // --- classe own fields --- |
32 | hourComponent = aHourComponent; |
33 | hasMinuteComponent = hasAminuteComponent; |
34 | minuteComponent = aMinuteComponent; |
35 | hasSecondComponent = hasAsecondComponent; |
36 | secondComponent = aSecondComponent; |
37 | zone = aZone; |
38 | } |
39 | |
40 | |
41 | void StepBasic_LocalTime::SetHourComponent(const Standard_Integer aHourComponent) |
42 | { |
43 | hourComponent = aHourComponent; |
44 | } |
45 | |
46 | Standard_Integer StepBasic_LocalTime::HourComponent() const |
47 | { |
48 | return hourComponent; |
49 | } |
50 | |
51 | void StepBasic_LocalTime::SetMinuteComponent(const Standard_Integer aMinuteComponent) |
52 | { |
53 | minuteComponent = aMinuteComponent; |
54 | hasMinuteComponent = Standard_True; |
55 | } |
56 | |
57 | void StepBasic_LocalTime::UnSetMinuteComponent() |
58 | { |
59 | hasMinuteComponent = Standard_False; |
60 | } |
61 | |
62 | Standard_Integer StepBasic_LocalTime::MinuteComponent() const |
63 | { |
64 | return minuteComponent; |
65 | } |
66 | |
67 | Standard_Boolean StepBasic_LocalTime::HasMinuteComponent() const |
68 | { |
69 | return hasMinuteComponent; |
70 | } |
71 | |
72 | void StepBasic_LocalTime::SetSecondComponent(const Standard_Real aSecondComponent) |
73 | { |
74 | secondComponent = aSecondComponent; |
75 | hasSecondComponent = Standard_True; |
76 | } |
77 | |
78 | void StepBasic_LocalTime::UnSetSecondComponent() |
79 | { |
80 | hasSecondComponent = Standard_False; |
81 | } |
82 | |
83 | Standard_Real StepBasic_LocalTime::SecondComponent() const |
84 | { |
85 | return secondComponent; |
86 | } |
87 | |
88 | Standard_Boolean StepBasic_LocalTime::HasSecondComponent() const |
89 | { |
90 | return hasSecondComponent; |
91 | } |
92 | |
93 | void StepBasic_LocalTime::SetZone(const Handle(StepBasic_CoordinatedUniversalTimeOffset)& aZone) |
94 | { |
95 | zone = aZone; |
96 | } |
97 | |
98 | Handle(StepBasic_CoordinatedUniversalTimeOffset) StepBasic_LocalTime::Zone() const |
99 | { |
100 | return zone; |
101 | } |