LLDB mainline
NSDictionary.h
Go to the documentation of this file.
1//===-- NSDictionary.h ------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_NSDICTIONARY_H
10#define LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_NSDICTIONARY_H
11
16#include "lldb/Utility/Stream.h"
17
18#include <map>
19#include <memory>
20
21namespace lldb_private {
22namespace formatters {
23template <bool name_entries>
24bool NSDictionarySummaryProvider(ValueObject &valobj, Stream &stream,
25 const TypeSummaryOptions &options);
26
27extern template bool
29 const TypeSummaryOptions &);
30
31extern template bool
33 const TypeSummaryOptions &);
34
38
40public:
42 public:
43 class Matcher {
44 public:
45 virtual ~Matcher() = default;
46 virtual bool Match(ConstString class_name) = 0;
47
48 typedef std::unique_ptr<Matcher> UP;
49 };
50 class Prefix : public Matcher {
51 public:
53 ~Prefix() override = default;
54 bool Match(ConstString class_name) override;
55
56 private:
58 };
59 class Full : public Matcher {
60 public:
62 ~Full() override = default;
63 bool Match(ConstString class_name) override;
64
65 private:
67 };
69
70 MatcherUP GetFullMatch(ConstString n) { return std::make_unique<Full>(n); }
71
73 return std::make_unique<Prefix>(p);
74 }
75 };
76
77 template <typename FormatterType>
79 std::pair<AdditionalFormatterMatching::MatcherUP, FormatterType>;
80
81 template <typename FormatterType>
82 using AdditionalFormatters = std::vector<AdditionalFormatter<FormatterType>>;
83
85 GetAdditionalSummaries();
86
88 GetAdditionalSynthetics();
89};
90} // namespace formatters
91} // namespace lldb_private
92
93#endif // LLDB_SOURCE_PLUGINS_LANGUAGE_OBJC_NSDICTIONARY_H
A uniqued constant string class.
Definition: ConstString.h:40
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
std::vector< AdditionalFormatter< FormatterType > > AdditionalFormatters
Definition: NSDictionary.h:82
std::pair< AdditionalFormatterMatching::MatcherUP, FormatterType > AdditionalFormatter
Definition: NSDictionary.h:79
template bool NSDictionarySummaryProvider< false >(ValueObject &, Stream &, const TypeSummaryOptions &)
template bool NSDictionarySummaryProvider< true >(ValueObject &, Stream &, const TypeSummaryOptions &)
bool NSDictionarySummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
SyntheticChildrenFrontEnd * NSDictionarySyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:480