9#ifndef LLDB_UTILITY_EVENT_H
10#define LLDB_UTILITY_EVENT_H
19#include "llvm/ADT/StringRef.h"
79 llvm::StringRef
GetFlavor()
const override;
140 llvm::StringRef
GetFlavor()
const override;
180class Event :
public std::enable_shared_from_this<Event> {
213 if (broadcaster_impl_sp)
214 return broadcaster_impl_sp->GetBroadcaster();
222 if (broadcaster_impl_sp)
223 return broadcaster_impl_sp->GetBroadcaster() == broadcaster;
BroadcasterImpl contains the actual Broadcaster implementation.
An event broadcasting class.
std::weak_ptr< BroadcasterImpl > BroadcasterImplWP
BroadcasterImplSP GetBroadcasterImpl()
std::shared_ptr< BroadcasterImpl > BroadcasterImplSP
const EventDataBytes & operator=(const EventDataBytes &)=delete
const void * GetBytes() const
~EventDataBytes() override
static llvm::StringRef GetFlavorString()
static const void * GetBytesFromEvent(const Event *event_ptr)
static size_t GetByteSizeFromEvent(const Event *event_ptr)
EventDataBytes(const EventDataBytes &)=delete
llvm::StringRef GetFlavor() const override
void Dump(Stream *s) const override
static const EventDataBytes * GetEventDataFromEvent(const Event *event_ptr)
size_t GetByteSize() const
static llvm::StringRef GetFlavorString()
llvm::StringRef GetFlavor() const override
Predicate< bool > m_predicate
void DoOnRemoval(Event *event_ptr) override
bool WaitForEventReceived(const Timeout< std::micro > &timeout=std::nullopt)
~EventDataReceipt() override=default
This class handles one or more StructuredData::Dictionary entries that are raised for structured data...
llvm::StringRef GetFlavor() const override
EventDataStructuredData(const EventDataStructuredData &)=delete
const StructuredData::ObjectSP & GetObject() const
const lldb::ProcessSP & GetProcess() const
void SetStructuredDataPlugin(const lldb::StructuredDataPluginSP &plugin_sp)
lldb::StructuredDataPluginSP m_plugin_sp
const lldb::StructuredDataPluginSP & GetStructuredDataPlugin() const
void SetObject(const StructuredData::ObjectSP &object_sp)
StructuredData::ObjectSP m_object_sp
static llvm::StringRef GetFlavorString()
static lldb::ProcessSP GetProcessFromEvent(const Event *event_ptr)
~EventDataStructuredData() override
lldb::ProcessSP m_process_sp
void SetProcess(const lldb::ProcessSP &process_sp)
const EventDataStructuredData & operator=(const EventDataStructuredData &)=delete
static lldb::StructuredDataPluginSP GetPluginFromEvent(const Event *event_ptr)
EventDataStructuredData()
static StructuredData::ObjectSP GetObjectFromEvent(const Event *event_ptr)
static const EventDataStructuredData * GetEventDataFromEvent(const Event *event_ptr)
void Dump(Stream *s) const override
const EventData & operator=(const EventData &)=delete
virtual bool ForwardEventToPendingListeners(Event *event_ptr)
This will be queried for a Broadcaster with a primary and some secondary listeners after the primary ...
virtual void DoOnRemoval(Event *event_ptr)
virtual Log * GetLogChannel()
virtual void Dump(Stream *s) const
EventData(const EventData &)=delete
virtual llvm::StringRef GetFlavor() const =0
Broadcaster::BroadcasterImplWP m_broadcaster_wp
bool BroadcasterIs(Broadcaster *broadcaster)
Event(const Event &)=delete
void SetType(uint32_t new_type)
lldb::EventDataSP m_data_sp
void AddPendingListener(lldb::ListenerSP pending_listener_sp)
This is used by Broadcasters with Primary Listeners to store the other Listeners till after the Event...
const EventData * GetData() const
std::mutex m_listeners_mutex
void SetData(EventData *new_data)
const Event & operator=(const Event &)=delete
void Dump(Stream *s) const
std::vector< lldb::ListenerSP > m_pending_listeners
void SetBroadcaster(Broadcaster *broadcaster)
Broadcaster * GetBroadcaster() const
A C++ wrapper class for providing threaded access to a value of type T.
void SetValue(T value, PredicateBroadcastType broadcast_type)
Value set accessor.
bool WaitForValueEqualTo(T value, const Timeout< std::micro > &timeout=std::nullopt)
Wait for m_value to be equal to value.
A stream class that can stream formatted output to a file.
std::shared_ptr< Object > ObjectSP
A class that represents a running process on the host machine.
@ eBroadcastAlways
Always send a broadcast when the value is modified.
std::shared_ptr< lldb_private::StructuredDataPlugin > StructuredDataPluginSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Listener > ListenerSP
std::shared_ptr< lldb_private::EventData > EventDataSP