1 //===-- LanguageCategory.h----------------------------------------*- C++
4 // The LLVM Compiler Infrastructure
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 #ifndef lldb_LanguageCategory_h_
12 #define lldb_LanguageCategory_h_
15 #include "lldb/DataFormatters/FormatCache.h"
16 #include "lldb/DataFormatters/FormatClasses.h"
17 #include "lldb/lldb-public.h"
21 namespace lldb_private {
23 class LanguageCategory {
25 typedef std::unique_ptr<LanguageCategory> UniquePointer;
27 LanguageCategory(lldb::LanguageType lang_type);
29 bool Get(FormattersMatchData &match_data, lldb::TypeFormatImplSP &format_sp);
31 bool Get(FormattersMatchData &match_data, lldb::TypeSummaryImplSP &format_sp);
33 bool Get(FormattersMatchData &match_data,
34 lldb::SyntheticChildrenSP &format_sp);
36 bool Get(FormattersMatchData &match_data,
37 lldb::TypeValidatorImplSP &format_sp);
39 bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
40 lldb::TypeFormatImplSP &format_sp);
42 bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
43 lldb::TypeSummaryImplSP &format_sp);
45 bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
46 lldb::SyntheticChildrenSP &format_sp);
48 bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
49 lldb::TypeValidatorImplSP &format_sp);
51 lldb::TypeCategoryImplSP GetCategory() const;
53 FormatCache &GetFormatCache();
62 lldb::TypeCategoryImplSP m_category_sp;
64 HardcodedFormatters::HardcodedFormatFinder m_hardcoded_formats;
65 HardcodedFormatters::HardcodedSummaryFinder m_hardcoded_summaries;
66 HardcodedFormatters::HardcodedSyntheticFinder m_hardcoded_synthetics;
67 HardcodedFormatters::HardcodedValidatorFinder m_hardcoded_validators;
69 lldb_private::FormatCache m_format_cache;
74 } // namespace lldb_private
76 #endif // lldb_LanguageCategory_h_