C++ TargetRTS
Loading...
Searching...
No Matches
RTEnumerated.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 __RTEnumerated_h__
11#define __RTEnumerated_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTDataObject_h__
18#include <RTDataObject.h>
19#endif
20
22{
23public:
24 int value;
25
26 virtual ~RTEnumerated( void );
27
28 RTS_INLINE operator int( void ) const;
29 virtual int operator==( const RTDataObject & ) const override;
30
31 virtual int lower( void ) const;
32 virtual int upper( void ) const = 0;
33
34 virtual const RTObject_class * getClassData( void ) const override = 0;
35 static const RTObject_class classData;
36
37#define RTType_RTEnumerated ( RTEnumerated::classData )
38
39protected:
40 explicit RTEnumerated( int );
41 RTEnumerated( const RTEnumerated & );
42 RTEnumerated & operator=( const RTEnumerated & );
43}; //lint !e1712
44
46{
47 const void * data;
48 const RTObject_class * type;
49
50 RTS_INLINE RTTypedValue_RTEnumerated( const RTEnumerated & ); //lint !e1931
51 RTS_INLINE RTTypedValue_RTEnumerated( const RTEnumerated &,
52 const RTObject_class * );
53}; //lint !e1712
54
55// Subclasses will refer to these functions in their classData.
56#if OBJECT_DECODE
57 extern int RTEnumerated_decode( const RTObject_class *,
58 void *,
59 RTDecoding * );
60#endif
61#if OBJECT_ENCODE
62 extern int RTEnumerated_encode( const RTObject_class *,
63 const void *,
64 RTEncoding * );
65#endif
66
67#if RTS_INLINES
68#include <RTEnumerated.inl>
69#endif
70
71#endif // __RTEnumerated_h__
Provides a common interface to certain data type implementations (e.g.
Definition: RTDataObject.h:33
Definition: RTDecoding.h:27
Definition: RTEncoding.h:27
Definition: RTEnumerated.h:22
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
Definition: RTEnumerated.h:46