OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
MatchCmd.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: MatchCmd.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: MatchCmd
10 // The class for the OPAL MATCH command.
11 //
12 // ------------------------------------------------------------------------
13 //
14 // $Date: 2000/03/27 09:33:44 $
15 // $Author: Andreas Adelmann $
16 //
17 // ------------------------------------------------------------------------
18 
19 #include "Match/MatchCmd.h"
20 #include "Match/Match.h"
21 
22 
23 // Class MatchCmd
24 // ------------------------------------------------------------------------
25 
27  Action(0, "MATCH",
28  "The \"MATCH\" sub-command defines a match of values "
29  "which can be matched.")
30 {
39 }
40 
41 
42 MatchCmd::MatchCmd(const std::string &name, MatchCmd *parent):
43  Action(name, parent)
44 {}
45 
46 
48 {}
49 
50 
51 MatchCmd *MatchCmd::clone(const std::string &name) {
52  return new MatchCmd(name, this);
53 }
54 
55 
57  // Execute match block.
58  Match::block = new Match;
60 
61  // Clean up.
62  delete Match::block;
63  Match::block = 0;
64 }
virtual void execute()
Execute the command.
Definition: MatchCmd.cpp:56
virtual MatchCmd * clone(const std::string &name)
Make clone.
Definition: MatchCmd.cpp:51
The base class for all OPAL actions.
Definition: Action.h:30
virtual ~MatchCmd()
Definition: MatchCmd.cpp:47
static Match * block
The block of match data.
Definition: Match.h:100
static void addAttributeOwner(const std::string &owner, const OwnerType &type, const std::string &name)
MatchParser parser
The parser used during for matching.
Definition: Match.h:97
The MATCH command.
Definition: MatchCmd.h:28
Matching block.
Definition: Match.h:40
virtual void run() const
Read current stream.
Definition: OpalParser.cpp:601
const std::string name
MatchCmd()
Exemplar constructor.
Definition: MatchCmd.cpp:26