SBEvent.h revision 63094e0bb161580564954dee512955c1c79d3476
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 <stdio.h> 14#include <vector> 15 16#include "lldb/API/SBDefines.h" 17 18namespace lldb { 19 20class SBBroadcaster; 21 22class SBEvent 23{ 24public: 25 SBEvent(); 26 27 // Make an event that contains a C string. 28 SBEvent (uint32_t event, const char *cstr, uint32_t cstr_len); 29 30 ~SBEvent(); 31 32 bool 33 IsValid() const; 34 35 void 36 Dump (FILE *f) const; 37 38 const char * 39 GetDataFlavor (); 40 41 uint32_t 42 GetType () const; 43 44 lldb::SBBroadcaster 45 GetBroadcaster () const; 46 47 bool 48 BroadcasterMatchesPtr (const lldb::SBBroadcaster *broadcaster); 49 50 bool 51 BroadcasterMatchesRef (const lldb::SBBroadcaster &broadcaster); 52 53 void 54 Clear(); 55 56 static const char * 57 GetCStringFromEvent (const lldb::SBEvent &event); 58 59protected: 60 friend class SBListener; 61 friend class SBBroadcaster; 62 friend class SBDebugger; 63 friend class SBProcess; 64 65 SBEvent (lldb::EventSP &event_sp); 66 67#ifndef SWIG 68 69 lldb::EventSP & 70 GetSP () const; 71 72 void 73 reset (lldb::EventSP &event_sp); 74 75 void 76 reset (lldb_private::Event* event); 77 78 lldb_private::Event * 79 get () const; 80 81#endif 82 83private: 84 85 mutable lldb::EventSP m_event_sp; 86 mutable lldb_private::Event *m_opaque; 87}; 88 89} // namespace lldb 90 91#endif // LLDB_SBEvent_h_ 92