DocumentValidator Template Class Reference
Namespace | ohm::flip |
Declared in | ohm/flip/DocumentValidator.h |
See Also | |
Overview
The DocumentValidator template class is a pure virtual template class. Implementing it allows a server to logically validate the model on each client transaction.
The client will derive a class from it, using the root flip class as the template parameter.
Partial Class Diagram

Methods Overview
To Implement
Methods
validate
Implementing this method will let the derived class validate the model and implicitely the transaction that changed the model. T denotes the root flip class of the model.
virtual void validate (ValidationReportWriter & report, archi::Int32 user_id, T & root) = 0; |
- report will be filled with the validation report when validation errors will be encoutered
- user_id denotes the user id of the originator of the transaction that triggered validation
- root denotes the root object of the model
Validation parsing is done in the same way than writing an observer. When an error is encountered a ValidationReportWriter method is called and the transaction will be refused. See ValidationReportWriter on how to report an error.
WARNING:Validation is server code.