LLDB  mainline
LanguageCategory.h
Go to the documentation of this file.
1 //===-- LanguageCategory.h----------------------------------------*- C++
2 //-*-===//
3 //
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
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLDB_DATAFORMATTERS_LANGUAGECATEGORY_H
11 #define LLDB_DATAFORMATTERS_LANGUAGECATEGORY_H
12 
15 #include "lldb/lldb-public.h"
16 
17 #include <memory>
18 
19 namespace lldb_private {
20 
22 public:
23  typedef std::unique_ptr<LanguageCategory> UniquePointer;
24 
26 
27  template <typename ImplSP>
28  bool Get(FormattersMatchData &match_data, ImplSP &format_sp);
29  template <typename ImplSP>
30  bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
31  ImplSP &format_sp);
32 
33  lldb::TypeCategoryImplSP GetCategory() const;
34 
36 
37  void Enable();
38 
39  void Disable();
40 
41  bool IsEnabled();
42 
43 private:
44  lldb::TypeCategoryImplSP m_category_sp;
45 
49 
50  template <typename ImplSP>
51  auto &GetHardcodedFinder();
52 
54 
55  bool m_enabled;
56 };
57 
58 } // namespace lldb_private
59 
60 #endif // LLDB_DATAFORMATTERS_LANGUAGECATEGORY_H
lldb_private::FormattersMatchData
Definition: FormatClasses.h:84
lldb-public.h
lldb_private::LanguageCategory::Enable
void Enable()
Definition: LanguageCategory.cpp:124
lldb_private::FormatManager
Definition: FormatManager.h:36
FormatClasses.h
lldb_private::HardcodedFormatters::HardcodedFormatFinder
HardcodedFormatterFinders< TypeFormatImpl > HardcodedFormatFinder
Definition: FormatClasses.h:39
lldb_private::LanguageCategory::Get
bool Get(FormattersMatchData &match_data, ImplSP &format_sp)
Definition: LanguageCategory.cpp:34
lldb_private::LanguageCategory::m_hardcoded_synthetics
HardcodedFormatters::HardcodedSyntheticFinder m_hardcoded_synthetics
Definition: LanguageCategory.h:48
lldb_private::FormatCache
Definition: FormatCache.h:20
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::LanguageCategory::IsEnabled
bool IsEnabled()
Definition: LanguageCategory.cpp:136
lldb_private::LanguageCategory::m_enabled
bool m_enabled
Definition: LanguageCategory.h:55
lldb_private::LanguageCategory::GetHardcoded
bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data, ImplSP &format_sp)
Definition: LanguageCategory.cpp:90
lldb_private::HardcodedFormatters::HardcodedSummaryFinder
HardcodedFormatterFinders< TypeSummaryImpl > HardcodedSummaryFinder
Definition: FormatClasses.h:40
lldb_private::LanguageCategory::m_hardcoded_summaries
HardcodedFormatters::HardcodedSummaryFinder m_hardcoded_summaries
Definition: LanguageCategory.h:47
lldb_private::LanguageCategory::UniquePointer
std::unique_ptr< LanguageCategory > UniquePointer
Definition: LanguageCategory.h:23
lldb_private::LanguageCategory::GetFormatCache
FormatCache & GetFormatCache()
Definition: LanguageCategory.cpp:122
lldb_private::LanguageCategory::m_hardcoded_formats
HardcodedFormatters::HardcodedFormatFinder m_hardcoded_formats
Definition: LanguageCategory.h:46
lldb_private::LanguageCategory::GetHardcodedFinder
auto & GetHardcodedFinder()
lldb_private::LanguageCategory
Definition: LanguageCategory.h:21
lldb_private::LanguageCategory::m_category_sp
lldb::TypeCategoryImplSP m_category_sp
Definition: LanguageCategory.h:44
FormatCache.h
lldb_private::LanguageCategory::Disable
void Disable()
Definition: LanguageCategory.cpp:130
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::LanguageCategory::m_format_cache
lldb_private::FormatCache m_format_cache
Definition: LanguageCategory.h:53
lldb_private::LanguageCategory::GetCategory
lldb::TypeCategoryImplSP GetCategory() const
Definition: LanguageCategory.cpp:118
lldb_private::LanguageCategory::LanguageCategory
LanguageCategory(lldb::LanguageType lang_type)
Definition: LanguageCategory.cpp:21
lldb_private::HardcodedFormatters::HardcodedSyntheticFinder
HardcodedFormatterFinders< SyntheticChildren > HardcodedSyntheticFinder
Definition: FormatClasses.h:41