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 virtual int get_longdouble( long double & ) = 0;
43#endif
44 virtual int get_int ( int & ) = 0;
45 virtual int get_long ( long & ) = 0;
46 virtual int get_unsignedint(unsigned int & ) = 0;
47 virtual int get_unsignedlong(unsigned long & ) = 0;
48 virtual int get_unsignedlonglong(unsigned long long & ) = 0;
49 virtual int get_unsignedshort(unsigned short & ) = 0;
50 virtual int get_unsignedchar(unsigned char & ) = 0;
51 virtual int get_long_long( long long & ) = 0;
52 virtual int get_short ( short & ) = 0;
53 virtual int get_uchar ( unsigned char & ) = 0;
54 virtual int get_unsigned( unsigned & ) = 0;
55 virtual int get_ulong ( unsigned long & ) = 0;
56 virtual int get_ushort ( unsigned short & ) = 0;
57
58 // a nul-terminated string
59 virtual int get_string( char * & ) = 0;
60
61 // zero or more raw bytes
62 virtual int get_opaque( int &, char * & ) = 0;
63
64 // an enumerated value
65 virtual int get_enum( int & value,
66 int numChoices,
67 const RTFieldDescriptor * choices ) = 0;
68
69 // a homogeneous array of objects
70 virtual int get_array( void *,
71 int numElements,
72 const RTObject_class * elementType ) = 0;
73
74 // an indirect object
75 virtual int get_indirect( void * pointer,
76 const RTObject_class * targetType ) = 0;
77
78 // a structure
79 virtual int get_struct( void * record,
80 const RTObject_class * recordType ) = 0;
81
82private:
83 // unavailable methods
84 RTDecoding( const RTDecoding & );
85 RTDecoding & operator=( const RTDecoding & );
86};
87#endif // OBJECT_DECODE
88
89#endif // __RTDecoding_h__
Definition: RTDecoding.h:27
Definition: RTFieldDescriptor.h:40
A type descriptor providing information about a type.
Definition: RTObject_class.h:64