Wiki
Clone wikigretl / SpecExposedValues
Exposed Values
Within an application, exposed values are values which are immediately exposed to the user by the application. In a typical Unix application, exposed values are booleans, numbers and strings. A personal accounting software would add currencies to the mix, while scientific software is likely to introduce types specific to the problem its solves.
A Gretl guest must define a Values
module implementing its own idea
of exposed values. Gretl implements the following exposed values
modules which can be used by its guests:
- CValue, suited for standard Unix applications
- UValue, suited for Unicode capable applications
Expose values must support a formatting facility similar to printf
.
User stories
Tabular data
An application may want to display tabular data to the end-user. These values should be handled by exposed values and the implementation should take care of the following stories:
TODO Tabular data is crudely sortable
As a end-user, I want to sort tabular data in a simple-way, from the largest to the smallest or the opposite—if appropriate.
TODO Tabular data can be filtered and sorted
As a end-user, I want to sort and filter tabular data in various appropriate manners.
Solving this user-story is difficult, because it requires defining predicates and combinators for exposed values. Filtering should be implemented out of this but the exposed values modules should export predicates, for instance.
TODO Exposed values support formatting
As a developer, I want to attach formatting information to the columns of a tabular and so render it appropriately.
Symbolic styles could be added, but managed by a separate component. Exposed values only deal with textual representations.
TODO Exposed values can be reused as lexemes
As a developer, I want to have functions to parse exposed values, so that I can easily build a lexer based on these (e.g. with ocamllex).
Updated