OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
TableTester.h
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: TableTester.h,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.2 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: TableTester
10 //
11 // ------------------------------------------------------------------------
12 //
13 // $Date: 2001/08/13 15:25:22 $
14 // $Author: jowett $
15 //
16 // ------------------------------------------------------------------------
17 
19 #include <string>
20 
21 class ElementBase;
22 
23 
24 // Class TableTester
25 // ------------------------------------------------------------------------
27 // Visitor for testing for dependency of a table on a name.
28 // It walks through a beam line and test for occurrence of a given
29 // element name.
30 
31 class TableTester: public DefaultVisitor {
32 
33 public:
34 
36  // Attach visitor to [b]bl[/b], remember the name [b]name[/b].
37  TableTester(const Beamline &bl, const std::string &name);
38 
39  ~TableTester();
40 
42  // Throw an exception, if the contained element has the given name.
43  virtual void applyDefault(const ElementBase &);
44 
45 private:
46 
47  // Not implemented.
48  TableTester();
49  TableTester(const TableTester &);
50  void operator=(const TableTester &);
51 
52  // The name to be tested.
53  const std::string itsName;
54 };
Interface for basic beam line object.
Definition: ElementBase.h:128
virtual void applyDefault(const ElementBase &)
Apply default operation.
Definition: TableTester.cpp:35
Default algorithms.
Test dependency of a table.
Definition: TableTester.h:31
void operator=(const TableTester &)
An abstract sequence of beam line components.
Definition: Beamline.h:37
const std::string itsName
Definition: TableTester.h:53
const std::string name