1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
//===-- SBInputReader.h -----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_SBInputReader_h_
#define LLDB_SBInputReader_h_
#include "lldb/API/SBDefines.h"
namespace lldb {
class SBInputReader
{
public:
typedef size_t (*Callback) (void *baton,
SBInputReader *reader,
InputReaderAction notification,
const char *bytes,
size_t bytes_len);
SBInputReader ();
SBInputReader (const lldb::InputReaderSP &reader_sp);
SBInputReader (const lldb::SBInputReader &rhs);
~SBInputReader ();
SBError
Initialize (SBDebugger &debugger,
Callback callback,
void *callback_baton,
lldb::InputReaderGranularity granularity,
const char *end_token,
const char *prompt,
bool echo);
bool
IsValid () const;
const lldb::SBInputReader &
operator = (const lldb::SBInputReader &rhs);
bool
IsActive () const;
bool
IsDone () const;
void
SetIsDone (bool value);
InputReaderGranularity
GetGranularity ();
protected:
friend class SBDebugger;
lldb_private::InputReader *
operator->() const;
lldb::InputReaderSP &
operator *();
const lldb::InputReaderSP &
operator *() const;
lldb_private::InputReader *
get() const;
lldb_private::InputReader &
ref() const;
private:
static size_t
PrivateCallback (void *baton,
lldb_private::InputReader &reader,
lldb::InputReaderAction notification,
const char *bytes,
size_t bytes_len);
lldb::InputReaderSP m_opaque_sp;
Callback m_callback_function;
void *m_callback_baton;
};
} // namespace lldb
#endif // LLDB_SBInputReader_h_
|