C++ TargetRTS
Loading...
Searching...
No Matches
RTWrapper.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 __RTWrapper_h__
11#define __RTWrapper_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTObject_class_h__
18#include <RTObject_class.h>
19#endif
20
22{
23public:
24 RTWrapper( const void * data
25 = nullptr,
26 const RTObject_class * type
27 = nullptr
28 ); //lint !e1931
29 RTWrapper( const RTWrapper & );
30 ~RTWrapper( void );
31
32 RTS_INLINE operator const void * ( void ) const;
33 RTS_INLINE const void * data( void ) const;
34 RTS_INLINE const RTObject_class * type( void ) const;
35
36 RTS_INLINE int operator==( const RTWrapper & ) const;
37 RTS_INLINE int operator!=( const RTWrapper & ) const;
38
39 RTWrapper & operator=( const RTWrapper & );
40
41 static const RTObject_class classData;
42
43#define RTType_RTWrapper ( RTWrapper::classData )
44
45private:
46 struct Handle
47 {
48 int ref_count;
49 const RTObject_class * type;
50 RTAlignment data[ 1 /* or more */ ];
51 };
52
53 Handle * handle;
54};
55
57{
58 const void * data;
59 const RTObject_class * type;
60
61 RTS_INLINE RTTypedValue_RTWrapper( const RTWrapper & ); //lint !e1931
62 RTS_INLINE RTTypedValue_RTWrapper( const RTWrapper &,
63 const RTObject_class * );
64}; //lint !e1712
65
66#if RTS_INLINES
67#include <RTWrapper.inl>
68#endif
69
70#endif // __RTWrapper_h__
Definition: RTWrapper.h:22
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
Definition: RTWrapper.h:57