File indexing completed on 2026-05-10 08:42:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef LLDB_DATAFORMATTERS_LANGUAGECATEGORY_H
0011 #define LLDB_DATAFORMATTERS_LANGUAGECATEGORY_H
0012
0013 #include "lldb/DataFormatters/FormatCache.h"
0014 #include "lldb/DataFormatters/FormatClasses.h"
0015 #include "lldb/lldb-public.h"
0016
0017 #include <memory>
0018
0019 namespace lldb_private {
0020
0021 class LanguageCategory {
0022 public:
0023 typedef std::unique_ptr<LanguageCategory> UniquePointer;
0024
0025 LanguageCategory(lldb::LanguageType lang_type);
0026
0027 template <typename ImplSP>
0028 bool Get(FormattersMatchData &match_data, ImplSP &format_sp);
0029 template <typename ImplSP>
0030 bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
0031 ImplSP &format_sp);
0032
0033 lldb::TypeCategoryImplSP GetCategory() const;
0034
0035 FormatCache &GetFormatCache();
0036
0037 void Enable();
0038
0039 void Disable();
0040
0041 bool IsEnabled();
0042
0043 private:
0044 lldb::TypeCategoryImplSP m_category_sp;
0045
0046 HardcodedFormatters::HardcodedFormatFinder m_hardcoded_formats;
0047 HardcodedFormatters::HardcodedSummaryFinder m_hardcoded_summaries;
0048 HardcodedFormatters::HardcodedSyntheticFinder m_hardcoded_synthetics;
0049
0050 template <typename ImplSP>
0051 auto &GetHardcodedFinder();
0052
0053 lldb_private::FormatCache m_format_cache;
0054
0055 bool m_enabled;
0056 };
0057
0058 }
0059
0060 #endif