1 //===-- SBEvent.h -----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBEvent_h_
11 #define LLDB_SBEvent_h_
13 #include "lldb/API/SBDefines.h"
22 class LLDB_API SBEvent {
26 SBEvent(const lldb::SBEvent &rhs);
28 // Make an event that contains a C string.
29 SBEvent(uint32_t event, const char *cstr, uint32_t cstr_len);
31 SBEvent(lldb::EventSP &event_sp);
33 SBEvent(lldb_private::Event *event_sp);
37 const SBEvent &operator=(const lldb::SBEvent &rhs);
41 const char *GetDataFlavor();
43 uint32_t GetType() const;
45 lldb::SBBroadcaster GetBroadcaster() const;
47 const char *GetBroadcasterClass() const;
49 bool BroadcasterMatchesPtr(const lldb::SBBroadcaster *broadcaster);
51 bool BroadcasterMatchesRef(const lldb::SBBroadcaster &broadcaster);
55 static const char *GetCStringFromEvent(const lldb::SBEvent &event);
57 bool GetDescription(lldb::SBStream &description);
59 bool GetDescription(lldb::SBStream &description) const;
62 friend class SBListener;
63 friend class SBBroadcaster;
64 friend class SBBreakpoint;
65 friend class SBDebugger;
66 friend class SBProcess;
67 friend class SBTarget;
68 friend class SBThread;
69 friend class SBWatchpoint;
71 lldb::EventSP &GetSP() const;
73 void reset(lldb::EventSP &event_sp);
75 void reset(lldb_private::Event *event);
77 lldb_private::Event *get() const;
80 mutable lldb::EventSP m_event_sp;
81 mutable lldb_private::Event *m_opaque_ptr;
86 #endif // LLDB_SBEvent_h_