LLDB mainline
SBFormat.h
Go to the documentation of this file.
1//===-- SBFormat.h ----------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_API_SBFORMAT_H
10#define LLDB_API_SBFORMAT_H
11
12#include "lldb/API/SBDefines.h"
13
14namespace lldb_private {
15namespace python {
16class SWIGBridge;
17} // namespace python
18namespace lua {
19class SWIGBridge;
20} // namespace lua
21} // namespace lldb_private
22
23namespace lldb {
24
25/// Class that represents a format string that can be used to generate
26/// descriptions of objects like frames and threads. See
27/// https://lldb.llvm.org/use/formatting.html for more information.
29public:
30 SBFormat();
31
32 /// Create an \a SBFormat by parsing the given format string. If parsing
33 /// fails, this object is initialized as invalid.
34 ///
35 /// \param[in] format
36 /// The format string to parse.
37 ///
38 /// \param[out] error
39 /// An object where error messages will be written to if parsing fails.
40 SBFormat(const char *format, lldb::SBError &error);
41
42 SBFormat(const lldb::SBFormat &rhs);
43
44 lldb::SBFormat &operator=(const lldb::SBFormat &rhs);
45
47
48 /// \return
49 /// \b true if and only if this object is valid and can be used for
50 /// formatting.
51 explicit operator bool() const;
52
53protected:
54 friend class SBFrame;
55 friend class SBThread;
56
57 /// \return
58 /// The underlying shared pointer storage for this object.
59 lldb::FormatEntrySP GetFormatEntrySP() const;
60
61 /// The storage for this object.
63};
64
65} // namespace lldb
66#endif // LLDB_API_SBFORMAT_H
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_API
Definition: SBDefines.h:28
Class that represents a format string that can be used to generate descriptions of objects like frame...
Definition: SBFormat.h:28
lldb::FormatEntrySP m_opaque_sp
The storage for this object.
Definition: SBFormat.h:62
A class that represents a running process on the host machine.
Definition: SBAddress.h:15
std::shared_ptr< lldb_private::FormatEntity::Entry > FormatEntrySP
Definition: lldb-forward.h:354