1 //===-- SBTypeFormat.h --------------------------------------------*- C++
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBTypeFormat_h_
11 #define LLDB_SBTypeFormat_h_
13 #include "lldb/API/SBDefines.h"
17 class LLDB_API SBTypeFormat {
21 SBTypeFormat(lldb::Format format,
22 uint32_t options = 0); // see lldb::eTypeOption values
24 SBTypeFormat(const char *type,
25 uint32_t options = 0); // see lldb::eTypeOption values
27 SBTypeFormat(const lldb::SBTypeFormat &rhs);
31 explicit operator bool() const;
35 lldb::Format GetFormat();
37 const char *GetTypeName();
39 uint32_t GetOptions();
41 void SetFormat(lldb::Format);
43 void SetTypeName(const char *);
45 void SetOptions(uint32_t);
47 bool GetDescription(lldb::SBStream &description,
48 lldb::DescriptionLevel description_level);
50 lldb::SBTypeFormat &operator=(const lldb::SBTypeFormat &rhs);
52 bool IsEqualTo(lldb::SBTypeFormat &rhs);
54 bool operator==(lldb::SBTypeFormat &rhs);
56 bool operator!=(lldb::SBTypeFormat &rhs);
59 friend class SBDebugger;
60 friend class SBTypeCategory;
63 lldb::TypeFormatImplSP GetSP();
65 void SetSP(const lldb::TypeFormatImplSP &typeformat_impl_sp);
67 lldb::TypeFormatImplSP m_opaque_sp;
69 SBTypeFormat(const lldb::TypeFormatImplSP &);
71 enum class Type { eTypeKeepSame, eTypeFormat, eTypeEnum };
73 bool CopyOnWrite_Impl(Type);
78 #endif // LLDB_SBTypeFormat_h_