OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
Match
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
26
MatchCmd::MatchCmd
():
27
Action
(0,
"MATCH"
,
28
"The \"MATCH\" sub-command defines a match of values "
29
"which can be matched."
)
30
{
31
AttributeHandler::addAttributeOwner
(
"MATCH"
,
AttributeHandler::COMMAND
,
"OPTION"
);
32
AttributeHandler::addAttributeOwner
(
"MATCH"
,
AttributeHandler::COMMAND
,
"CONSTRAINT"
);
33
AttributeHandler::addAttributeOwner
(
"MATCH"
,
AttributeHandler::COMMAND
,
"VARY"
);
34
AttributeHandler::addAttributeOwner
(
"MATCH"
,
AttributeHandler::COMMAND
,
"MATCH"
);
35
AttributeHandler::addAttributeOwner
(
"MATCH"
,
AttributeHandler::COMMAND
,
"LMDIF"
);
36
AttributeHandler::addAttributeOwner
(
"MATCH"
,
AttributeHandler::COMMAND
,
"ENDMATCH"
);
37
AttributeHandler::addAttributeOwner
(
"MATCH"
,
AttributeHandler::COMMAND
,
"MIGRAD"
);
38
AttributeHandler::addAttributeOwner
(
"MATCH"
,
AttributeHandler::COMMAND
,
"SIMPLEX"
);
39
}
40
41
42
MatchCmd::MatchCmd
(
const
std::string &
name
,
MatchCmd
*parent):
43
Action
(name, parent)
44
{}
45
46
47
MatchCmd::~MatchCmd
()
48
{}
49
50
51
MatchCmd
*
MatchCmd::clone
(
const
std::string &
name
) {
52
return
new
MatchCmd
(name,
this
);
53
}
54
55
56
void
MatchCmd::execute
() {
57
// Execute match block.
58
Match::block
=
new
Match
;
59
Match::block
->
parser
.
run
();
60
61
// Clean up.
62
delete
Match::block
;
63
Match::block
= 0;
64
}
MatchCmd::execute
virtual void execute()
Execute the command.
Definition:
MatchCmd.cpp:56
MatchCmd::clone
virtual MatchCmd * clone(const std::string &name)
Make clone.
Definition:
MatchCmd.cpp:51
Action
The base class for all OPAL actions.
Definition:
Action.h:30
MatchCmd::~MatchCmd
virtual ~MatchCmd()
Definition:
MatchCmd.cpp:47
AttributeHandler::COMMAND
Definition:
AttributeHandler.h:116
Match::block
static Match * block
The block of match data.
Definition:
Match.h:100
AttributeHandler::addAttributeOwner
static void addAttributeOwner(const std::string &owner, const OwnerType &type, const std::string &name)
Definition:
AttributeHandler.cpp:113
Match.h
Match::parser
MatchParser parser
The parser used during for matching.
Definition:
Match.h:97
MatchCmd
The MATCH command.
Definition:
MatchCmd.h:28
Match
Matching block.
Definition:
Match.h:40
MatchCmd.h
OpalParser::run
virtual void run() const
Read current stream.
Definition:
OpalParser.cpp:601
name
const std::string name
Definition:
MaxNormRadialPeak.cpp:3
MatchCmd::MatchCmd
MatchCmd()
Exemplar constructor.
Definition:
MatchCmd.cpp:26
Generated on Sat Jan 4 2020 14:48:04 for OPAL (Object Oriented Parallel Accelerator Library) by
1.8.5