C++ TargetRTS
Loading...
Searching...
No Matches
RTString.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 __RTString_h__
11#define __RTString_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTDataObject_h__
18#include <RTDataObject.h>
19#endif
20
23class RTString : public RTDataObject
24{
25public:
26 char * Contents;
27
28 RTString( const char * = nullptr ); //lint !e1931
29 RTString( const RTString & );
30 virtual ~RTString( void );
31
32 RTString & operator=( const char * );
33 RTS_INLINE RTString & operator=( const RTString & );
34
35#if RTUseCPP11
36 RTString( RTString && );
37 RTS_INLINE RTString & operator=( RTString && );
38#endif
39
40 virtual int operator==( const RTDataObject & ) const override;
41 int operator==( const char * ) const;
42 RTS_INLINE int operator==( const RTString & ) const;
43
44 RTS_INLINE int operator!=( const RTDataObject & ) const;
45 RTS_INLINE int operator!=( const char * ) const;
46 RTS_INLINE int operator!=( const RTString & ) const;
47
48 RTS_INLINE operator char * ( void );
49 RTS_INLINE operator const char * ( void ) const;
50 RTS_INLINE operator void * ( void );
51 char & operator[]( int );
52 const char & operator[]( int ) const;
53
54 virtual const RTObject_class * getClassData( void ) const override;
55 static const RTObject_class classData;
56
57#define RTType_RTString ( RTString::classData )
58};
59
60RTS_INLINE int operator==( const char *, const RTString & );
61RTS_INLINE int operator!=( const char *, const RTString & );
62
64{
65 const void * data;
66 const RTObject_class * type;
67#if RTUseCPP11
68 const bool rValueRef = false;
69
70
71 RTS_INLINE RTTypedValue_RTString( const RTString && );
72 RTS_INLINE RTTypedValue_RTString( const RTString &&,
73 const RTObject_class * );
74#endif
75
76 RTS_INLINE RTTypedValue_RTString( const RTString & ); //lint !e1931
77
78 RTS_INLINE RTTypedValue_RTString( const RTString &,
79 const RTObject_class * );
80
81}; //lint !e1712
82
83#if RTS_INLINES
84#include <RTString.inl>
85#endif
86
87#endif // __RTString_h__
Provides a common interface to certain data type implementations (e.g.
Definition: RTDataObject.h:33
A C-style string wrapped in a data object.
Definition: RTString.h:24
A type descriptor providing information about a type.
Definition: RTObject_class.h:64
Definition: RTString.h:64