C++ TargetRTS
Loading...
Searching...
No Matches
RTDebuggerInput.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 __RTDebuggerInput_h__
11#define __RTDebuggerInput_h__ included
12
13#ifdef PRAGMA
14#pragma interface
15#endif
16
17#ifndef __RTConfig_h__
18#include <RTConfig.h>
19#endif
20
22{
23public:
24 struct CmdDesc
25 {
26 int cmd;
27 int minAbbr;
28 const char * name;
29 };
30
31 RTDebuggerInput( void );
32 ~RTDebuggerInput( void );
33
34 void setPrompt( const char * );
35 void pushInput( const char * );
36 int getNumber( void );
37 void getEol( void );
38 int getString( char * buf, int buf_size );
39 int getCommand( const CmdDesc *, int none, int invalid );
40
41private:
42 enum { UngetMax = 1 };
43
44 int need_prompt;
45 const char * prompt;
46 int unget_size;
47 char unget_buffer[ UngetMax ];
48 const char * input;
49
50 int getChar( void );
51 void ungetChar( char );
52 int nextChar( void );
53 static RTS_INLINE
54 int isEol( int );
55
56 // unavailable methods
58 RTDebuggerInput & operator=( const RTDebuggerInput & );
59};
60
61#if RTS_INLINES
62#include <RTDebuggerInput.inl>
63#endif
64
65#endif // __RTDebuggerInput_h__
Definition: RTDebuggerInput.h:22
Definition: RTDebuggerInput.h:25