C++ TargetRTS
Loading...
Searching...
No Matches
RTInterval.h
1/*
2 * Licensed Materials - Property of HCL and/or IBM
3 * Copyright HCL Technologies Ltd. 2016, 2021. All Rights Reserved.
4 * Copyright IBM Corporation 1999, 2016. All Rights Reserved.
5 *
6 * U.S. Government Users Restricted Rights - Use, duplication or
7 * disclosure restricted by GSA ADP Schedule.
8 */
9
10#ifndef __RTInterval_h__
11#define __RTInterval_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTFieldDescriptor_h__
18#include <RTFieldDescriptor.h>
19#endif
20
21#ifndef __RTObject_class_h__
22#include <RTObject_class.h>
23#endif
24
26{
27public:
28 RTInterval( void );
29 explicit RTInterval( unsigned long centisec );
30 RTInterval( long sec, long usec );
31 RTInterval( const RTInterval & );
32 RTS_INLINE ~RTInterval( void );
33
34 RTInterval & operator= ( const RTInterval & );
35 RTInterval & operator+=( const RTInterval & );
36 RTInterval & operator-=( const RTInterval & );
37
38 int isset( void ) const;
39 int is0( void ) const;
40 int le0( void ) const;
41 int ge0( void ) const;
42 int gt0( void ) const;
43
44 unsigned long ticks( void ) const;
45 RTS_INLINE long seconds( void ) const;
46 RTS_INLINE long micros( void ) const;
47
48 static const RTObject_class classData;
49
50#define RTType_RTInterval ( RTInterval::classData )
51
52private:
53 long sec;
54 long usec;
55
56 static const RTFieldDescriptor fieldData[];
57};
58
59int operator< ( const RTInterval &, const RTInterval & );
60RTS_INLINE int operator==( const RTInterval &, const RTInterval & );
61RTS_INLINE int operator> ( const RTInterval &, const RTInterval & );
62RTInterval operator+ ( const RTInterval &, const RTInterval & );
63RTInterval operator- ( const RTInterval &, const RTInterval & );
64RTS_INLINE int operator>=( const RTInterval &, const RTInterval & );
65RTS_INLINE int operator!=( const RTInterval &, const RTInterval & );
66RTS_INLINE int operator<=( const RTInterval &, const RTInterval & );
67
69{
70 const void * data;
71 const RTObject_class * type;
72
73 RTS_INLINE RTTypedValue_RTInterval( const RTInterval & ); //lint !e1931
74 RTS_INLINE RTTypedValue_RTInterval( const RTInterval &,
75 const RTObject_class * );
76}; //lint !e1712
77
78#if RTS_INLINES
79#include <RTInterval.inl>
80#endif
81
82#endif // __RTInterval_h__
Definition: RTInterval.h:26
Definition: RTFieldDescriptor.h:40
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
Definition: RTInterval.h:69