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