Detailed Description
A View is a one-way notification element from a model/view/controller system to the client of the system. It is intended to send notifications outside the system of changes inside the system. A view is not allowed to modify the system to which it belongs – that is the responsibility of a Controller [1].
- Refinement Of:
- Associated Types:
- The only type associated with the view is the data structure that view is intended to represent. This is the model_type of the view, and is used when setting the view to a new value of that type.
Value Type | typename view_model_type<View>::type | The value type for the data for which the view is receiving notifications |
- Notation:
T | A type that is a model of View |
t | Object of type T |
x | Object of type typename view_model_type<View>::type |
- Definitions:
- Valid Expressions:
Name | Expression | Type requirements | Return type |
Set | display(t, x); | | void |
- Expression Semantics:
Name | Expression | Precondition | Semantics | Postcondition |
- Complexity Guarantees:
- Invariants:
- Type(s) Modeling this Concept:
- Any device that sends information from the system to the outside of the system. An example might be an audio speaker or a noninteractive icon within a dialog box.
- Notes:
- [1] It is legal for any one implementation to model both a View and a Controller at the same time.
- See Also:
- Example:
View t;
typename view_model_type<View>::type x;
x = 5;
using adobe::display;
display(t, x);