BOSS
7.0.5
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
6
namespace
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
:
34
enum
VisitorState
{
35
VCONTINUE
= 0,
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;
49
virtual
VisitorState
visitTable
(
Table
*) = 0;
50
virtual
VisitorState
visitColumn
(
Column
*) = 0;
51
virtual
VisitorState
visitIndex
(
Index
*) = 0;
52
virtual
VisitorState
visitAssertion
(
Assertion
*) = 0;
53
virtual
VisitorState
visitInsertNew
(
InsertNew
*) = 0;
54
virtual
VisitorState
visitSupersede
(
Supersede
*) = 0;
55
virtual
VisitorState
visitQuery
(
Query
*) = 0;
56
virtual
VisitorState
visitSet
(
Set
*) = 0;
57
virtual
VisitorState
visitInterRow
(
InterRow
*) = 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
rdbModel::Assertion
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Assertion.h:56
rdbModel::Column
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Column.h:23
rdbModel::Index
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Index.h:19
rdbModel::InsertNew
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/InsertNew.h:21
rdbModel::InterRow
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/InterRow.h:18
rdbModel::Query
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Query.h:18
rdbModel::Rdb
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Rdb.h:41
rdbModel::Set
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Set.h:21
rdbModel::Supersede
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Supersede.h:20
rdbModel::Table
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Tables/Table.h:33
rdbModel::Visitor
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Visitor.h:32
rdbModel::Visitor::visitTable
virtual VisitorState visitTable(Table *)=0
rdbModel::Visitor::visitAssertion
virtual VisitorState visitAssertion(Assertion *)=0
rdbModel::Visitor::visitInsertNew
virtual VisitorState visitInsertNew(InsertNew *)=0
rdbModel::Visitor::visitRdb
virtual VisitorState visitRdb(Rdb *)=0
This method says if the visitor is recursive or not.
rdbModel::Visitor::VisitorState
VisitorState
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Visitor.h:34
rdbModel::Visitor::VBRANCHDONE
@ VBRANCHDONE
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Visitor.h:37
rdbModel::Visitor::VERROR
@ VERROR
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Visitor.h:38
rdbModel::Visitor::VERRORABORT
@ VERRORABORT
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Visitor.h:39
rdbModel::Visitor::VDONE
@ VDONE
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Visitor.h:36
rdbModel::Visitor::VCONTINUE
@ VCONTINUE
Definition:
Calibration/rdbModel/rdbModel-00-01-01/rdbModel/Management/Visitor.h:35
rdbModel::Visitor::visitInterRow
virtual VisitorState visitInterRow(InterRow *)=0
rdbModel::Visitor::visitQuery
virtual VisitorState visitQuery(Query *)=0
rdbModel::Visitor::visitColumn
virtual VisitorState visitColumn(Column *)=0
rdbModel::Visitor::visitSet
virtual VisitorState visitSet(Set *)=0
rdbModel::Visitor::visitSupersede
virtual VisitorState visitSupersede(Supersede *)=0
rdbModel::Visitor::visitIndex
virtual VisitorState visitIndex(Index *)=0
EvtCyclic3::Index
Index
Definition:
EvtCyclic3.hh:20
rdbModel
Definition:
Calibration/calibUtil/calibUtil-00-00-43/calibUtil/Metadata.h:11
source
Calibration
rdbModel
rdbModel-00-01-01
rdbModel
Management
Visitor.h
Generated by
1.9.6