C++ TargetRTS
Loading...
Searching...
No Matches
RTDataObject.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 __RTDataObject_h__
11#define __RTDataObject_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTVersionId_h__
18#include <RTVersionId.h>
19#endif
20
21class RTDataObject;
22class RTDecoding;
23class RTEncoding;
24struct RTObject_class;
25
26typedef RTDataObject * (* RTDataObjectFunc)( void );
27
33{
34public:
35 RTDataObject( void );
36 RTDataObject( const RTDataObject & );
37 virtual ~RTDataObject( void );
38
39 virtual int operator==( const RTDataObject & ) const;
40 RTS_INLINE int operator!=( const RTDataObject & ) const;
41 virtual RTDataObject * copy( void ) const;
42
43#if OBJECT_ENCODE
44 char * printString( void ) const;
45 int printString( char * buf, int size ) const;
46 virtual int put( RTEncoding & ) const;
47#endif
48
49#if OBJECT_DECODE
50 virtual int ObjectForm( RTDecoding & );
51#endif
52
53 virtual const RTObject_class * getClassData( void ) const;
54 virtual const char * getTypeName( void ) const;
55 RTVersionId getVersion( void ) const;
56 int isType( const char * ) const;
57 int isSameType( const RTObject_class * ) const;
58
59 static const RTObject_class classData;
60
61#define RTType_RTDataObject ( RTDataObject::classData )
62
63#if OBJECT_DECODE
64 static void initialize( void );
65#endif
66};
67
68extern const RTDataObject EmptyObject;
69
71{
72 const void * data;
73 const RTObject_class * type;
74
75 RTS_INLINE RTTypedValue_RTDataObject( const RTDataObject & ); //lint !e1931
76 RTS_INLINE RTTypedValue_RTDataObject( const RTDataObject &,
77 const RTObject_class * );
78}; //lint !e1712
79
81
82extern const RTObject_class RTType_RTpRTDataObject;
83
84// Helper function for descriptors of classes in the RTDataObject hierarchy.
85extern void RTDataObject_destroy( const RTObject_class *, void * );
86
87#if RTS_INLINES
88#include <RTDataObject.inl>
89#endif
90
91#endif // __RTDataObject_h__
Provides a common interface to certain data type implementations (e.g.
Definition: RTDataObject.h:33
Definition: RTDecoding.h:27
Definition: RTEncoding.h:27
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
Definition: RTDataObject.h:71