OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
Place.cpp
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2// $RCSfile: Place.cpp,v $
3// ------------------------------------------------------------------------
4// $Revision: 1.1.1.1 $
5// ------------------------------------------------------------------------
6// Copyright: see Copyright.readme
7// ------------------------------------------------------------------------
8//
9// Class: Place
10// A class used to parse place attributes.
11//
12// ------------------------------------------------------------------------
13//
14// $Date: 2000/03/27 09:33:36 $
15// $Author: Andreas Adelmann $
16//
17// ------------------------------------------------------------------------
18
19#include "Attributes/Place.h"
22#include "Expressions/SValue.h"
24
25using namespace Expressions;
26
27// Class Place
28// ------------------------------------------------------------------------
29
30namespace Attributes {
31
32 Place::Place(const std::string& name, const std::string& help)
33 : AttributeHandler(name, help, 0) {}
34
36
37 const std::string& Place::getType() const {
38 static const std::string type("place");
39 return type;
40 }
41
42 void Place::parse(Attribute& attr, Statement& stat, bool) const {
43 attr.set(new SValue<PlaceRep>(parsePlace(stat)));
44 }
45
46}; // namespace Attributes
Abstract base class for attribute parsers.
A representation of an Object attribute.
Definition Attribute.h:52
void set(AttributeBase *newBase)
Define new value.
Definition Attribute.cpp:86
virtual ~Place()
Definition Place.cpp:35
virtual const std::string & getType() const
Return attribute type string `‘place’'.
Definition Place.cpp:37
virtual void parse(Attribute &, Statement &, bool) const
Parse the attribute.
Definition Place.cpp:42
Object attribute with a constant scalar value.
Definition SValue.h:34
Interface for statements.
Definition Statement.h:37
A collection of routines to construct object Attributes and retrieve.
Representation objects and parsers for attribute expressions.
PlaceRep parsePlace(Statement &)
Parse place specification.