]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/API/SBEvent.h
Import LLDB as of upstream SVN r225923 (git 2b588ecd)
[FreeBSD/FreeBSD.git] / include / lldb / API / SBEvent.h
1 //===-- SBEvent.h -----------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLDB_SBEvent_h_
11 #define LLDB_SBEvent_h_
12
13 #include "lldb/API/SBDefines.h"
14
15 #include <stdio.h>
16 #include <vector>
17
18
19 namespace lldb {
20
21 class SBBroadcaster;
22
23 class SBEvent
24 {
25 public:
26     SBEvent();
27
28     SBEvent (const lldb::SBEvent &rhs);
29     
30     // Make an event that contains a C string.
31     SBEvent (uint32_t event, const char *cstr, uint32_t cstr_len);
32
33     SBEvent (lldb::EventSP &event_sp);
34
35     SBEvent (lldb_private::Event *event_sp);
36
37     ~SBEvent();
38
39     const SBEvent &
40     operator = (const lldb::SBEvent &rhs);
41
42     bool
43     IsValid() const;
44
45     const char *
46     GetDataFlavor ();
47
48     uint32_t
49     GetType () const;
50
51     lldb::SBBroadcaster
52     GetBroadcaster () const;
53
54     const char *
55     GetBroadcasterClass () const;
56
57     bool
58     BroadcasterMatchesPtr (const lldb::SBBroadcaster *broadcaster);
59
60     bool
61     BroadcasterMatchesRef (const lldb::SBBroadcaster &broadcaster);
62
63     void
64     Clear();
65
66     static const char *
67     GetCStringFromEvent (const lldb::SBEvent &event);
68
69     bool
70     GetDescription (lldb::SBStream &description);
71
72     bool
73     GetDescription (lldb::SBStream &description) const;
74
75 protected:
76     friend class SBListener;
77     friend class SBBroadcaster;
78     friend class SBBreakpoint;
79     friend class SBDebugger;
80     friend class SBProcess;
81     friend class SBThread;
82     friend class SBWatchpoint;
83
84     lldb::EventSP &
85     GetSP () const;
86
87     void
88     reset (lldb::EventSP &event_sp);
89
90     void
91     reset (lldb_private::Event* event);
92
93     lldb_private::Event *
94     get () const;
95
96 private:
97
98     mutable lldb::EventSP m_event_sp;
99     mutable lldb_private::Event *m_opaque_ptr;
100 };
101
102 } // namespace lldb
103
104 #endif  // LLDB_SBEvent_h_