Introduce the notion of a "type validator" formatter

Type Validators have the purpose of looking at a ValueObject, and making sure that there is nothing semantically wrong about the object's contents
For instance, if you have a class that represents a speed, the validator might trigger if the speed value is greater than the speed of light

This first patch hooks up the moving parts in the formatters subsystem, but does not link ValueObjects to TypeValidators, nor lets the SB API be exposed to validators
It also lacks the notion of Python validators

llvm-svn: 217277
This commit is contained in:
Enrico Granata
2014-09-05 20:45:07 +00:00
parent afe6794bc2
commit c582713ce6
16 changed files with 724 additions and 13 deletions

View File

@@ -101,6 +101,18 @@ DataVisualization::GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp)
}
#endif
lldb::TypeValidatorImplSP
DataVisualization::GetValidator (ValueObject& valobj, lldb::DynamicValueType use_dynamic)
{
return GetFormatManager().GetValidator(valobj, use_dynamic);
}
lldb::TypeValidatorImplSP
DataVisualization::GetValidatorForType (lldb::TypeNameSpecifierImplSP type_sp)
{
return GetFormatManager().GetValidatorForType(type_sp);
}
bool
DataVisualization::AnyMatches (ConstString type_name,
TypeCategoryImpl::FormatCategoryItems items,