Data-Source-Aware Gadgets
In Data Access, you will find a set of gadget classes that can be seamlessly integrated with the data sources described in the previous section. These gadgets are known as data-source-aware gadgets.
A data-source-aware gadget class is a class that inherits through multiple inheritance paths from both the class (or one of its subclasses) and the IliFieldItf class.
The IliFieldItf class defines the interface common to all data-source-aware gadgets. It has member functions that deal with such operations as connecting to a data source, querying or changing the value of the gadget, and so on.
For instance, the class is the data-source-aware version of the Views class. It has two superclasses, IlvTextField and IliFieldItf. See Data Sources and Gadgets.
Formats
The IliFormat class is used to format values according to different rules. For instance, it is possible to define a format that specifies that floating-point numbers should be displayed with three digits after the decimal point. See the description of the IliFormat class in Utility Classes.
Once a format has been defined, it can be used in C++ code to convert an IliValue object into a character-string representation. Alternatively, it can be used to configure a data-source-aware gadget so that the values displayed in the gadget are formatted according to a predefined format.
Formats are defined using the format specification language described in Format Syntax.
Masks
The class is similar to the IliFormat class except that it also manages user input in addition to the format. Masks can be used to:
-
Check application-defined constraints on the values entered by the end user.
-
Permit the end user to enter values according to customized syntax.
A specification language lets you specify masks from within Views Studio. This format specification language for masks is described in Appendix C.
It is possible to specify a mask in C++ instead of using the specification language. The IliInputMaskIpl class needs to be subclassed for this purpose.