File indexing completed on 2026-05-10 08:42:42
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_API_SBEVENT_H
0010 #define LLDB_API_SBEVENT_H
0011
0012 #include "lldb/API/SBDefines.h"
0013
0014 #include <cstdio>
0015 #include <vector>
0016
0017 namespace lldb_private {
0018 class ScriptInterpreter;
0019 namespace python {
0020 class SWIGBridge;
0021 }
0022 }
0023
0024 namespace lldb {
0025
0026 class SBBroadcaster;
0027
0028 class LLDB_API SBEvent {
0029 public:
0030 SBEvent();
0031
0032 SBEvent(const lldb::SBEvent &rhs);
0033
0034
0035 SBEvent(uint32_t event, const char *cstr, uint32_t cstr_len);
0036
0037 ~SBEvent();
0038
0039 const SBEvent &operator=(const lldb::SBEvent &rhs);
0040
0041 explicit operator bool() const;
0042
0043 bool IsValid() const;
0044
0045 const char *GetDataFlavor();
0046
0047 uint32_t GetType() const;
0048
0049 lldb::SBBroadcaster GetBroadcaster() const;
0050
0051 const char *GetBroadcasterClass() const;
0052
0053 #ifndef SWIG
0054 bool BroadcasterMatchesPtr(const lldb::SBBroadcaster *broadcaster);
0055 #endif
0056
0057 bool BroadcasterMatchesRef(const lldb::SBBroadcaster &broadcaster);
0058
0059 void Clear();
0060
0061 static const char *GetCStringFromEvent(const lldb::SBEvent &event);
0062
0063 bool GetDescription(lldb::SBStream &description);
0064
0065 bool GetDescription(lldb::SBStream &description) const;
0066
0067 protected:
0068 friend class SBListener;
0069 friend class SBBroadcaster;
0070 friend class SBBreakpoint;
0071 friend class SBDebugger;
0072 friend class SBProcess;
0073 friend class SBTarget;
0074 friend class SBThread;
0075 friend class SBWatchpoint;
0076
0077 friend class lldb_private::ScriptInterpreter;
0078 friend class lldb_private::python::SWIGBridge;
0079
0080 SBEvent(lldb::EventSP &event_sp);
0081
0082 SBEvent(lldb_private::Event *event);
0083
0084 lldb::EventSP &GetSP() const;
0085
0086 void reset(lldb::EventSP &event_sp);
0087
0088 void reset(lldb_private::Event *event);
0089
0090 lldb_private::Event *get() const;
0091
0092 private:
0093 mutable lldb::EventSP m_event_sp;
0094 mutable lldb_private::Event *m_opaque_ptr = nullptr;
0095 };
0096
0097 }
0098
0099 #endif