OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Dump.cpp
Go to the documentation of this file.
1 // ------------------------------------------------------------------------
2 // $RCSfile: Dump.cpp,v $
3 // ------------------------------------------------------------------------
4 // $Revision: 1.1.1.1 $
5 // ------------------------------------------------------------------------
6 // Copyright: see Copyright.readme
7 // ------------------------------------------------------------------------
8 //
9 // Class: Dump
10 // The class for the OPAL "DUMP" command.
11 //
12 // ------------------------------------------------------------------------
13 //
14 // $Date: 2000/03/27 09:33:37 $
15 // $Author: Andreas Adelmann $
16 //
17 // ------------------------------------------------------------------------
18 
19 #include "BasicActions/Dump.h"
20 
21 #include "Utility/IpplInfo.h"
24 #include <iostream>
25 
26 
27 // Ancillary class DumpObject
28 // Dump an object to standard error.
29 // ------------------------------------------------------------------------
30 
32  virtual void operator()(Object *) const;
33 };
34 
35 
36 void DumpObject::operator()(Object *object) const {
37  ERRORMSG(*object << endl);
38 }
39 
40 
41 // Class Dump
42 // ------------------------------------------------------------------------
43 
45  Action(0, "DUMP",
46  "The \"DUMP\" statement dumps the data structure of OPAL.")
47 {}
48 
49 
50 Dump::Dump(const std::string &name, Dump *parent):
51  Action(name, parent)
52 {}
53 
54 
56 {}
57 
58 
59 void Dump::execute() {
60  // Dump complete directory in alphabetical order to cerr.
62 }
63 
64 
65 Dump *Dump::clone(const std::string &name) {
66  return new Dump(name, this);
67 }
virtual Dump * clone(const std::string &name)
Make clone.
Definition: Dump.cpp:65
The base class for all OPAL actions.
Definition: Action.h:30
#define ERRORMSG(msg)
Definition: IpplInfo.h:399
virtual void execute()
Execute the command.
Definition: Dump.cpp:59
Dump()
Exemplar constructor.
Definition: Dump.cpp:44
void apply(const ObjectFunction &)
Apply a function to all objects.
Definition: OpalData.cpp:516
The DUMP command.
Definition: Dump.h:28
static OpalData * getInstance()
Definition: OpalData.cpp:209
virtual ~Dump()
Definition: Dump.cpp:55
The base class for all OPAL objects.
Definition: Object.h:48
const std::string name
Abstract base class for functor objects whose argument is an Object.
virtual void operator()(Object *) const
The function to be executed.
Definition: Dump.cpp:36
Inform & endl(Inform &inf)
Definition: Inform.cpp:42