This package provides base type for formatters, used by string templates processor. Children packages provides implementations of formatters for some types, applications can define own formatters too.
type Abstract_Formatter is limited interface;
type Field_Alignment is (Default, Left, Center, Right, Fill);
function Format
(Self : Abstract_Formatter;
Format : Format_Information)
return VSS.Strings.Virtual_String
Format value using given format specification.
type Format_Information is record
Width : VSS.Strings.Grapheme_Cluster_Count := 0;
Alignment : Field_Alignment := Default;
Format : VSS.Strings.Virtual_String;
end record;
function Name
(Self : Abstract_Formatter)
return VSS.Strings.Virtual_String
Name of the parameter.