//===-- NSDictionary.h ------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_NSDICTIONARY_H #define LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_NSDICTIONARY_H #include "lldb/Core/ValueObject.h" #include "lldb/DataFormatters/TypeSummary.h" #include "lldb/DataFormatters/TypeSynthetic.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Stream.h" #include #include namespace lldb_private { namespace formatters { template bool NSDictionarySummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options); extern template bool NSDictionarySummaryProvider(ValueObject &, Stream &, const TypeSummaryOptions &); extern template bool NSDictionarySummaryProvider(ValueObject &, Stream &, const TypeSummaryOptions &); SyntheticChildrenFrontEnd * NSDictionarySyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP); class NSDictionary_Additionals { public: class AdditionalFormatterMatching { public: class Matcher { public: virtual ~Matcher() = default; virtual bool Match(ConstString class_name) = 0; typedef std::unique_ptr UP; }; class Prefix : public Matcher { public: Prefix(ConstString p); ~Prefix() override = default; bool Match(ConstString class_name) override; private: ConstString m_prefix; }; class Full : public Matcher { public: Full(ConstString n); ~Full() override = default; bool Match(ConstString class_name) override; private: ConstString m_name; }; typedef Matcher::UP MatcherUP; MatcherUP GetFullMatch(ConstString n) { return std::make_unique(n); } MatcherUP GetPrefixMatch(ConstString p) { return std::make_unique(p); } }; template using AdditionalFormatter = std::pair; template using AdditionalFormatters = std::vector>; static AdditionalFormatters & GetAdditionalSummaries(); static AdditionalFormatters & GetAdditionalSynthetics(); }; } // namespace formatters } // namespace lldb_private #endif // LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_NSDICTIONARY_H