BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Calibration/rdbModel/include/rdbModel/Management/Visitor.h
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/rdbModel/rdbModel/Management/Visitor.h,v 1.1.1.1
2// 2005/10/17 06:10:53 maqm Exp $
3#ifndef RDBMODEL_VISITOR_H
4#define RDBMODEL_VISITOR_H
5#include <string>
6
7namespace rdbModel {
8
9 class Rdb;
10 class Table;
11 class Column;
12 class Index;
13 class Assertion;
14 class InsertNew;
15 class Supersede;
16 class Query;
17 class InterRow;
18 class Set;
19
20 /**
21 * This abstract class is the base for the visitors hierarchy; its
22 * main purpouse is to provide an abstract interface common to all the
23 * different kind of visitor; in this way the manager can hold a
24 * list of visitors that the client can start.
25 *
26 * One likly visitor would be something which instantiates a suitable
27 * representation, e.g. in a MySQL database, of the tables described
28 *
29 * @author J. Bogart,
30 * but owing heavily to Visitor class in detModel; thanks to
31 * D.Favretto and R.Giannitrapani
32 */
33 class Visitor {
34 public:
37 VDONE, // visitor has had its fill of visiting
38 VBRANCHDONE, // don't descend further; go to next sibling, if any
39 VERROR, // error during visit; perhaps can continue, though
40 VERRORABORT // error during visit; can't handle more
41 };
42
43 public:
44 /// This method says if the visitor is recursive or not
45 // bool getRecursive(){return recursive;}
46 /// This method sets if the visitor is recursive or not
47 // void setRecursive(bool prec){recursive = prec;};
48
49 virtual VisitorState visitRdb( Rdb* ) = 0;
50 virtual VisitorState visitTable( Table* ) = 0;
52 virtual VisitorState visitIndex( Index* ) = 0;
56 virtual VisitorState visitQuery( Query* ) = 0;
57 virtual VisitorState visitSet( Set* ) = 0;
59
60 protected:
61 /// If this is true, the visitor is recursive, otherwise it is not.
62 // bool recursive;
63 };
64} // namespace rdbModel
65#endif // RDBMODEL_VISITOR_H
virtual VisitorState visitTable(Table *)=0
virtual VisitorState visitAssertion(Assertion *)=0
virtual VisitorState visitInsertNew(InsertNew *)=0
virtual VisitorState visitRdb(Rdb *)=0
This method says if the visitor is recursive or not.
virtual VisitorState visitInterRow(InterRow *)=0
virtual VisitorState visitQuery(Query *)=0
virtual VisitorState visitColumn(Column *)=0
virtual VisitorState visitSet(Set *)=0
virtual VisitorState visitSupersede(Supersede *)=0
virtual VisitorState visitIndex(Index *)=0