C++ TargetRTS
Loading...
Searching...
No Matches
RTDiagStream.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 __RTDiagStream_h__
11#define __RTDiagStream_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTConfig_h__
18#include <RTConfig.h>
19#endif
20
21class RTDataObject;
22class RTMutex;
23struct RTObject_class;
24struct RTTimespec;
25
26// It is safe to ignore the return value of these functions.
27//lint -esym(534,RTDiagStream::lock)
28//lint -esym(534,operator<<)
29//lint -esym(534,RTDiagStream::unlock)
30//lint -esym(534,RTDiagStream::write)
31
33{
34public:
35 RTDiagStream( void );
36 ~RTDiagStream( void );
37
38 RTS_INLINE RTDiagStream & lock( void );
39 RTDiagStream & write( const char * );
40#if OBJECT_ENCODE
41 RTDiagStream & write( const void *, const RTObject_class * );
42#endif
43 void flush( void );
44 RTS_INLINE RTDiagStream & unlock( void );
45
46private:
47#if USE_THREADS
48 RTMutex * _mutex;
49#endif
50
51 // unavailable methods
52 RTDiagStream( const RTDiagStream & );
53 RTDiagStream & operator=( const RTDiagStream & );
54};
55
56RTS_INLINE RTDiagStream & operator<<( RTDiagStream &, const char * );
57 RTDiagStream & operator<<( RTDiagStream &, const char * const * );
58 RTDiagStream & operator<<( RTDiagStream &, const void * );
59 RTDiagStream & operator<<( RTDiagStream &, long );
60 RTDiagStream & operator<<( RTDiagStream &, unsigned long );
61
62RTS_INLINE RTDiagStream & operator<<( RTDiagStream &, char );
63RTS_INLINE RTDiagStream & operator<<( RTDiagStream &, unsigned char );
64RTS_INLINE RTDiagStream & operator<<( RTDiagStream &, short );
65RTS_INLINE RTDiagStream & operator<<( RTDiagStream &, unsigned short );
66RTS_INLINE RTDiagStream & operator<<( RTDiagStream &, int );
67RTS_INLINE RTDiagStream & operator<<( RTDiagStream &, unsigned );
68
69#if RTS_INLINES
70#include <RTDiagStream.inl>
71#endif
72
73#endif // __RTDiagStream_h__
Provides a common interface to certain data type implementations (e.g.
Definition: RTDataObject.h:33
Definition: RTDiagStream.h:33
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
A time value which can represent either an absolute or relative time.
Definition: RTTimespec.h:29