C++ TargetRTS
Loading...
Searching...
No Matches
RTDecoding.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 __RTDecoding_h__
11#define __RTDecoding_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTConfig_h__
18#include <RTConfig.h>
19#endif
20
21#if OBJECT_DECODE
22
24struct RTObject_class;
25
27{
28public:
29 RTDecoding( void );
30 virtual ~RTDecoding( void );
31
32 virtual int get( void ** data,
33 const RTObject_class ** type ) = 0;
34
35 // basic data types
36 virtual int get_address ( void * & ) = 0;
37 virtual int get_bool ( bool & ) = 0;
38 virtual int get_char ( char & ) = 0;
39#if RTUseFloatingPoint
40 virtual int get_double ( double & ) = 0;
41 virtual int get_float ( float & ) = 0;
42#endif
43 virtual int get_int ( int & ) = 0;
44 virtual int get_long ( long & ) = 0;
45 virtual int get_unsignedint(unsigned int & ) = 0;
46 virtual int get_unsignedlong(unsigned long & ) = 0;
47 virtual int get_unsignedlonglong(unsigned long long & ) = 0;
48 virtual int get_unsignedshort(unsigned short & ) = 0;
49 virtual int get_unsignedchar(unsigned char & ) = 0;
50 virtual int get_long_long( long long & ) = 0;
51 virtual int get_short ( short & ) = 0;
52 virtual int get_uchar ( unsigned char & ) = 0;
53 virtual int get_unsigned( unsigned & ) = 0;
54 virtual int get_ulong ( unsigned long & ) = 0;
55 virtual int get_ushort ( unsigned short & ) = 0;
56
57 // a nul-terminated string
58 virtual int get_string( char * & ) = 0;
59
60 // zero or more raw bytes
61 virtual int get_opaque( int &, char * & ) = 0;
62
63 // an enumerated value
64 virtual int get_enum( int & value,
65 int numChoices,
66 const RTFieldDescriptor * choices ) = 0;
67
68 // a homogeneous array of objects
69 virtual int get_array( void *,
70 int numElements,
71 const RTObject_class * elementType ) = 0;
72
73 // an indirect object
74 virtual int get_indirect( void * pointer,
75 const RTObject_class * targetType ) = 0;
76
77 // a structure
78 virtual int get_struct( void * record,
79 const RTObject_class * recordType ) = 0;
80
81private:
82 // unavailable methods
83 RTDecoding( const RTDecoding & );
84 RTDecoding & operator=( const RTDecoding & );
85};
86#endif // OBJECT_DECODE
87
88#endif // __RTDecoding_h__
Definition: RTDecoding.h:27
Definition: RTFieldDescriptor.h:40
A type descriptor providing information about a type.
Definition: RTObject_class.h:64