2011-07-20 06:41:47 +08:00
|
|
|
//===-- SWIG Interface for SBBroadcaster ------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2011-07-20 06:41:47 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
namespace lldb {
|
|
|
|
|
2011-07-21 06:29:58 +08:00
|
|
|
%feature("docstring",
|
2021-01-18 17:47:16 +08:00
|
|
|
"Represents an entity which can broadcast events.
|
|
|
|
|
|
|
|
A default broadcaster is
|
2011-07-21 06:29:58 +08:00
|
|
|
associated with an SBCommandInterpreter, SBProcess, and SBTarget. For
|
2021-01-18 00:40:54 +08:00
|
|
|
example, use ::
|
2011-07-21 06:29:58 +08:00
|
|
|
|
|
|
|
broadcaster = process.GetBroadcaster()
|
|
|
|
|
|
|
|
to retrieve the process's broadcaster.
|
|
|
|
|
|
|
|
See also SBEvent for example usage of interacting with a broadcaster."
|
|
|
|
) SBBroadcaster;
|
2011-07-20 06:41:47 +08:00
|
|
|
class SBBroadcaster
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SBBroadcaster ();
|
|
|
|
|
|
|
|
SBBroadcaster (const char *name);
|
|
|
|
|
|
|
|
SBBroadcaster (const SBBroadcaster &rhs);
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2011-07-20 06:41:47 +08:00
|
|
|
~SBBroadcaster();
|
|
|
|
|
|
|
|
bool
|
|
|
|
IsValid () const;
|
|
|
|
|
Add "operator bool" to SB APIs
Summary:
Our python version of the SB API has (the python equivalent of)
operator bool, but the C++ version doesn't.
This is because our python operators are added by modify-python-lldb.py,
which performs postprocessing on the swig-generated interface files.
In this patch, I add the "operator bool" to all SB classes which have an
IsValid method (which is the same logic used by modify-python-lldb.py).
This way, we make the two interfaces more constent, and it allows us to
rely on swig's automatic syntesis of python __nonzero__ methods instead
of doing manual fixups.
Reviewers: zturner, jingham, clayborg, jfb, serge-sans-paille
Subscribers: jdoerfert, lldb-commits
Differential Revision: https://reviews.llvm.org/D58792
llvm-svn: 355824
2019-03-11 21:58:46 +08:00
|
|
|
explicit operator bool() const;
|
|
|
|
|
2011-07-20 06:41:47 +08:00
|
|
|
void
|
|
|
|
Clear ();
|
|
|
|
|
|
|
|
void
|
|
|
|
BroadcastEventByType (uint32_t event_type, bool unique = false);
|
|
|
|
|
|
|
|
void
|
|
|
|
BroadcastEvent (const lldb::SBEvent &event, bool unique = false);
|
|
|
|
|
|
|
|
void
|
|
|
|
AddInitialEventsToListener (const lldb::SBListener &listener, uint32_t requested_events);
|
|
|
|
|
|
|
|
uint32_t
|
|
|
|
AddListener (const lldb::SBListener &listener, uint32_t event_mask);
|
|
|
|
|
|
|
|
const char *
|
|
|
|
GetName () const;
|
|
|
|
|
|
|
|
bool
|
|
|
|
EventTypeHasListeners (uint32_t event_type);
|
|
|
|
|
|
|
|
bool
|
|
|
|
RemoveListener (const lldb::SBListener &listener, uint32_t event_mask = UINT32_MAX);
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2013-05-03 09:29:27 +08:00
|
|
|
bool
|
|
|
|
operator == (const lldb::SBBroadcaster &rhs) const;
|
2019-04-19 00:23:33 +08:00
|
|
|
|
2013-05-03 09:29:27 +08:00
|
|
|
bool
|
|
|
|
operator != (const lldb::SBBroadcaster &rhs) const;
|
2011-07-20 06:41:47 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace lldb
|