aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/DataFormatters/FormatManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/DataFormatters/FormatManager.h')
-rw-r--r--include/lldb/DataFormatters/FormatManager.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/include/lldb/DataFormatters/FormatManager.h b/include/lldb/DataFormatters/FormatManager.h
index 24ec877ee515..0b9144dffa17 100644
--- a/include/lldb/DataFormatters/FormatManager.h
+++ b/include/lldb/DataFormatters/FormatManager.h
@@ -25,6 +25,7 @@
#include "lldb/DataFormatters/TypeCategoryMap.h"
#include <atomic>
+#include <functional>
namespace lldb_private {
@@ -39,6 +40,14 @@ class FormatManager : public IFormatChangeListener
typedef TypeCategoryMap::MapType::iterator CategoryMapIterator;
public:
+ template <typename FormatterType>
+ using HardcodedFormatterFinder = std::function<typename FormatterType::SharedPointer (lldb_private::ValueObject&,
+ lldb::DynamicValueType,
+ FormatManager&)>;
+
+ template <typename FormatterType>
+ using HardcodedFormatterFinders = std::vector<HardcodedFormatterFinder<FormatterType>>;
+
typedef TypeCategoryMap::CallbackType CategoryCallback;
FormatManager ();
@@ -260,6 +269,19 @@ private:
ConstString m_vectortypes_category_name;
ConstString m_appkit_category_name;
+ HardcodedFormatterFinders<TypeFormatImpl> m_hardcoded_formats;
+ HardcodedFormatterFinders<TypeSummaryImpl> m_hardcoded_summaries;
+ HardcodedFormatterFinders<SyntheticChildren> m_hardcoded_synthetics;
+
+ lldb::TypeFormatImplSP
+ GetHardcodedFormat (ValueObject&,lldb::DynamicValueType);
+
+ lldb::TypeSummaryImplSP
+ GetHardcodedSummaryFormat (ValueObject&,lldb::DynamicValueType);
+
+ lldb::SyntheticChildrenSP
+ GetHardcodedSyntheticChildren (ValueObject&,lldb::DynamicValueType);
+
TypeCategoryMap&
GetCategories ()
{
@@ -281,8 +303,11 @@ private:
void
LoadObjCFormatters ();
+
+ void
+ LoadHardcodedFormatters ();
};
} // namespace lldb_private
-
+
#endif // lldb_FormatManager_h_