File: validation.dox

package info (click to toggle)
mysql-workbench 6.3.8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 113,932 kB
  • ctags: 87,814
  • sloc: ansic: 955,521; cpp: 427,465; python: 59,728; yacc: 59,129; xml: 54,204; sql: 7,091; objc: 965; makefile: 638; sh: 613; java: 237; perl: 30; ruby: 6; php: 1
file content (34 lines) | stat: -rw-r--r-- 1,296 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*!
    \addtogroup Val Validation
    \page ValidationOverview Validation module
        
 \ref Val classes provide support for writing and running different validation checks. 
 Most of the core classes are put to wb_validation.h header file. 
 Class \ref val::AtomBase is a type of interface class, allows to execute atomic
 validation checks for specific type. \ref AtomBase is used in class
 \ref Chain for storing pointers to actual checks in vector. Actual check
 is a template class \ref Atom, see below. \ref AtomBase serves as a layer between
 code which is called for each particular type. Let's consider that we need
 to have two checks to be stored in chain:
 \code
 Class ValidatorSyntax
 {
   public:
     void do_check(const db_Column& c)
 };

 Class ValidatorLogic
 {
   public:
     void do_check(const db_Column& c)
 };
 \endcode
 so we can not have a generic algorithm to apply these checks as we have
 different objects-validators
 we can not add:
 Chain->add(ValidatorSyntax(), &ValidatorSyntax::do_check);
 Chain->add(ValidatorLogic(), &ValidatorLogic::do_check);
 but we can hide object and method in parameters and pass only argument to those
 So AtomBase introduces a way to pass object in generic way, while class Atom 
 hides object and its method to run that check
*/