/usr/include/opencascade/Quantity_Period.hxx is in libopencascade-foundation-dev 6.5.0.dfsg-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | // This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _Quantity_Period_HeaderFile
#define _Quantity_Period_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Storable_HeaderFile
#include <Standard_Storable.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_PrimitiveTypes_HeaderFile
#include <Standard_PrimitiveTypes.hxx>
#endif
class Quantity_PeriodDefinitionError;
Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(Quantity_Period);
//! Manages date intervals. For example, a Period object <br>
//! gives the interval between two dates. <br>
//! A period is expressed in seconds and microseconds. <br>
class Quantity_Period {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
//! Creates a Period <br>
//! With: 0 <= dd <br>
//! 0 <= hh <br>
//! 0 <= mn <br>
//! 0 <= ss <br>
//! 0 <= mis <br>
//! 0 <= mics <br>
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);
//! Creates a Period with a number of seconds and microseconds. <br>
//! Exceptions <br>
//! Quantity_PeriodDefinitionError: <br>
//! - if the number of seconds expressed either by: <br>
//! - dd days, hh hours, mn minutes and ss seconds, or <br>
//! - Ss <br>
//! is less than 0. <br>
//! - if the number of microseconds expressed either by: <br>
//! - mis milliseconds and mics microseconds, or <br>
//! - Mics <br>
//! is less than 0. <br>
Standard_EXPORT Quantity_Period(const Standard_Integer ss,const Standard_Integer mics = 0);
//! Decomposes this period into a number of days,hours, <br>
//! minutes,seconds,milliseconds and microseconds <br>
//! Example of return values: <br>
//! 2 days, 15 hours, 0 minute , 0 second <br>
//! 0 millisecond and 0 microsecond <br>
Standard_EXPORT void Values(Standard_Integer& dd,Standard_Integer& hh,Standard_Integer& mn,Standard_Integer& ss,Standard_Integer& mis,Standard_Integer& mics) const;
//! Returns the number of seconds in Ss and the <br>
//! number of remainding microseconds in Mics of this period. <br>
//! Example of return values: 3600 seconds and 0 microseconds <br>
Standard_EXPORT void Values(Standard_Integer& ss,Standard_Integer& mics) const;
//! Assigns to this period the time interval defined <br>
//! - with dd days, hh hours, mn minutes, ss <br>
//! seconds, mis (defaulted to 0) milliseconds and <br>
//! mics (defaulted to 0) microseconds; or <br>
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) ;
//! Assigns to this period the time interval defined <br>
//! - with Ss seconds and Mics (defaulted to 0) microseconds. <br>
//! Exceptions <br>
//! Quantity_PeriodDefinitionError: <br>
//! - if the number of seconds expressed either by: <br>
//! - dd days, hh hours, mn minutes and ss seconds, or <br>
//! - Ss <br>
//! is less than 0. <br>
//! - if the number of microseconds expressed either by: <br>
//! - mis milliseconds and mics microseconds, or <br>
//! - Mics <br>
//! is less than 0. <br>
Standard_EXPORT void SetValues(const Standard_Integer ss,const Standard_Integer mics = 0) ;
//! Subtracts one Period from another and returns the difference. <br>
Standard_EXPORT Quantity_Period Subtract(const Quantity_Period& anOther) const;
Quantity_Period operator -(const Quantity_Period& anOther) const
{
return Subtract(anOther);
}
//! Adds one Period to another one. <br>
Standard_EXPORT Quantity_Period Add(const Quantity_Period& anOther) const;
Quantity_Period operator +(const Quantity_Period& anOther) const
{
return Add(anOther);
}
//! Returns TRUE if both <me> and <other> are equal. <br>
Standard_EXPORT Standard_Boolean IsEqual(const Quantity_Period& anOther) const;
Standard_Boolean operator ==(const Quantity_Period& anOther) const
{
return IsEqual(anOther);
}
//! Returns TRUE if <me> is shorter than <other>. <br>
Standard_EXPORT Standard_Boolean IsShorter(const Quantity_Period& anOther) const;
Standard_Boolean operator <(const Quantity_Period& anOther) const
{
return IsShorter(anOther);
}
//! Returns TRUE if <me> is longer then <other>. <br>
Standard_EXPORT Standard_Boolean IsLonger(const Quantity_Period& anOther) const;
Standard_Boolean operator >(const Quantity_Period& anOther) const
{
return IsLonger(anOther);
}
//! Checks the validity of a Period in form (dd,hh,mn,ss,mil,mic) <br>
//! With: 0 <= dd <br>
//! 0 <= hh <br>
//! 0 <= mn <br>
//! 0 <= ss <br>
//! 0 <= mis <br>
//! 0 <= mics <br>
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) ;
//! Checks the validity of a Period in form (ss,mic) <br>
//! With: 0 <= ss <br>
//! 0 <= mics <br>
Standard_EXPORT static Standard_Boolean IsValid(const Standard_Integer ss,const Standard_Integer mics = 0) ;
Quantity_Period( )
{
}
Standard_Integer _CSFDB_GetQuantity_PeriodmySec() const { return mySec; }
void _CSFDB_SetQuantity_PeriodmySec(const Standard_Integer p) { mySec = p; }
Standard_Integer _CSFDB_GetQuantity_PeriodmyUSec() const { return myUSec; }
void _CSFDB_SetQuantity_PeriodmyUSec(const Standard_Integer p) { myUSec = p; }
protected:
private:
Standard_Integer mySec;
Standard_Integer myUSec;
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|