aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/DataFormatters/TypeCategory.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/DataFormatters/TypeCategory.h')
-rw-r--r--include/lldb/DataFormatters/TypeCategory.h51
1 files changed, 47 insertions, 4 deletions
diff --git a/include/lldb/DataFormatters/TypeCategory.h b/include/lldb/DataFormatters/TypeCategory.h
index 491fef29b5c5..e32efa420a55 100644
--- a/include/lldb/DataFormatters/TypeCategory.h
+++ b/include/lldb/DataFormatters/TypeCategory.h
@@ -71,6 +71,7 @@ namespace lldb_private {
typedef FormatterContainerPair<TypeFormatImpl> FormatContainer;
typedef FormatterContainerPair<TypeSummaryImpl> SummaryContainer;
typedef FormatterContainerPair<TypeFilterImpl> FilterContainer;
+ typedef FormatterContainerPair<TypeValidatorImpl> ValidatorContainer;
#ifndef LLDB_DISABLE_PYTHON
typedef FormatterContainerPair<ScriptedSyntheticChildren> SynthContainer;
@@ -94,6 +95,9 @@ namespace lldb_private {
typedef SynthContainer::RegexMatchContainerSP RegexSynthContainerSP;
#endif // #ifndef LLDB_DISABLE_PYTHON
+ typedef ValidatorContainer::ExactMatchContainerSP ValidatorContainerSP;
+ typedef ValidatorContainer::RegexMatchContainerSP RegexValidatorContainerSP;
+
TypeCategoryImpl (IFormatChangeListener* clist,
ConstString name);
@@ -147,6 +151,9 @@ namespace lldb_private {
GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp);
#endif
+ ValidatorContainer::MapValueType
+ GetValidatorForType (lldb::TypeNameSpecifierImplSP type_sp);
+
lldb::TypeNameSpecifierImplSP
GetTypeNameSpecifierForFormatAtIndex (size_t index);
@@ -183,9 +190,26 @@ namespace lldb_private {
lldb::TypeNameSpecifierImplSP
GetTypeNameSpecifierForSyntheticAtIndex (size_t index);
-
#endif // #ifndef LLDB_DISABLE_PYTHON
+ ValidatorContainerSP
+ GetTypeValidatorsContainer ()
+ {
+ return m_validator_cont.GetExactMatch();
+ }
+
+ RegexValidatorContainerSP
+ GetRegexTypeValidatorsContainer ()
+ {
+ return m_validator_cont.GetRegexMatch();
+ }
+
+ ValidatorContainer::MapValueType
+ GetValidatorAtIndex (size_t index);
+
+ lldb::TypeNameSpecifierImplSP
+ GetTypeNameSpecifierForValidatorAtIndex (size_t index);
+
bool
IsEnabled () const
{
@@ -219,6 +243,12 @@ namespace lldb_private {
lldb::SyntheticChildrenSP& entry,
uint32_t* reason = NULL);
+ bool
+ Get (ValueObject& valobj,
+ const FormattersMatchVector& candidates,
+ lldb::TypeValidatorImplSP& entry,
+ uint32_t* reason = NULL);
+
void
Clear (FormatCategoryItems items = ALL_ITEM_TYPES);
@@ -246,14 +276,12 @@ namespace lldb_private {
private:
FormatContainer m_format_cont;
-
SummaryContainer m_summary_cont;
-
FilterContainer m_filter_cont;
-
#ifndef LLDB_DISABLE_PYTHON
SynthContainer m_synth_cont;
#endif // #ifndef LLDB_DISABLE_PYTHON
+ ValidatorContainer m_validator_cont;
bool m_enabled;
@@ -274,6 +302,18 @@ namespace lldb_private {
Enable(false, UINT32_MAX);
}
+ uint32_t
+ GetLastEnabledPosition ()
+ {
+ return m_enabled_position;
+ }
+
+ void
+ SetEnabledPosition (uint32_t p)
+ {
+ m_enabled_position = p;
+ }
+
friend class TypeCategoryMap;
friend class FormattersContainer<ConstString, TypeFormatImpl>;
@@ -289,6 +329,9 @@ namespace lldb_private {
friend class FormattersContainer<ConstString, ScriptedSyntheticChildren>;
friend class FormattersContainer<lldb::RegularExpressionSP, ScriptedSyntheticChildren>;
#endif // #ifndef LLDB_DISABLE_PYTHON
+
+ friend class FormattersContainer<ConstString, TypeValidatorImpl>;
+ friend class FormattersContainer<lldb::RegularExpressionSP, TypeValidatorImpl>;
};
} // namespace lldb_private