File indexing completed on 2025-01-18 10:04:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Quantity_Period_HeaderFile
0018 #define _Quantity_Period_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Boolean.hxx>
0025
0026
0027
0028
0029 class Quantity_Period
0030 {
0031 public:
0032
0033 DEFINE_STANDARD_ALLOC
0034
0035
0036
0037
0038
0039
0040
0041
0042 Standard_EXPORT Quantity_Period(const Standard_Integer dd, const Standard_Integer hh, const Standard_Integer mn, const Standard_Integer ss, const Standard_Integer mis = 0, const Standard_Integer mics = 0);
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 Standard_EXPORT Quantity_Period(const Standard_Integer ss, const Standard_Integer mics = 0);
0056
0057
0058
0059
0060
0061
0062 Standard_EXPORT void Values (Standard_Integer& dd, Standard_Integer& hh, Standard_Integer& mn, Standard_Integer& ss, Standard_Integer& mis, Standard_Integer& mics) const;
0063
0064
0065
0066
0067 Standard_EXPORT void Values (Standard_Integer& ss, Standard_Integer& mics) const;
0068
0069
0070
0071
0072
0073 Standard_EXPORT void SetValues (const Standard_Integer dd, const Standard_Integer hh, const Standard_Integer mn, const Standard_Integer ss, const Standard_Integer mis = 0, const Standard_Integer mics = 0);
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087 Standard_EXPORT void SetValues (const Standard_Integer ss, const Standard_Integer mics = 0);
0088
0089
0090 Standard_EXPORT Quantity_Period Subtract (const Quantity_Period& anOther) const;
0091 Quantity_Period operator - (const Quantity_Period& anOther) const
0092 {
0093 return Subtract(anOther);
0094 }
0095
0096
0097 Standard_EXPORT Quantity_Period Add (const Quantity_Period& anOther) const;
0098 Quantity_Period operator + (const Quantity_Period& anOther) const
0099 {
0100 return Add(anOther);
0101 }
0102
0103
0104 Standard_EXPORT Standard_Boolean IsEqual (const Quantity_Period& anOther) const;
0105 Standard_Boolean operator == (const Quantity_Period& anOther) const
0106 {
0107 return IsEqual(anOther);
0108 }
0109
0110
0111 Standard_EXPORT Standard_Boolean IsShorter (const Quantity_Period& anOther) const;
0112 Standard_Boolean operator < (const Quantity_Period& anOther) const
0113 {
0114 return IsShorter(anOther);
0115 }
0116
0117
0118 Standard_EXPORT Standard_Boolean IsLonger (const Quantity_Period& anOther) const;
0119 Standard_Boolean operator > (const Quantity_Period& anOther) const
0120 {
0121 return IsLonger(anOther);
0122 }
0123
0124
0125
0126
0127
0128
0129
0130
0131 Standard_EXPORT static Standard_Boolean IsValid (const Standard_Integer dd, const Standard_Integer hh, const Standard_Integer mn, const Standard_Integer ss, const Standard_Integer mis = 0, const Standard_Integer mics = 0);
0132
0133
0134
0135
0136 Standard_EXPORT static Standard_Boolean IsValid (const Standard_Integer ss, const Standard_Integer mics = 0);
0137
0138 private:
0139
0140 Standard_Integer mySec;
0141 Standard_Integer myUSec;
0142
0143 };
0144
0145 #endif