Otawa  0.10
AbstractFeature.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * AbstractFeature class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2008, IRIT UPS.
7  *
8  * OTAWA is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * OTAWA is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with OTAWA; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 #ifndef OTAWA_PROC_ABSTRACT_FEATURE_H
23 #define OTAWA_PROC_ABSTRACT_FEATURE_H
24 
25 #include <elm/string.h>
26 #include <otawa/prop/PropList.h>
27 #include <otawa/prop/Identifier.h>
28 #include <otawa/proc/Processor.h>
29 
30 namespace otawa {
31 
32 using namespace elm;
33 class WorkSpace;
34 
35 // AbstractFeature class
36 class AbstractFeature: public Identifier<Processor *> {
37 public:
39 
41  virtual ~AbstractFeature(void);
42  virtual void process(WorkSpace *fw,
43  const PropList& props = PropList::EMPTY) const = 0;
44  virtual void check(WorkSpace *fw) const = 0;
45  virtual void clean(WorkSpace *ws) const = 0;
46 };
47 
48 
49 // feature class
50 namespace p {
51  class feature: public AbstractFeature {
52  public:
54  ~feature(void);
55  virtual void process(WorkSpace *ws, const PropList& props) const;
56  virtual void check(WorkSpace *fw) const;
57  virtual void clean(WorkSpace *ws) const;
58  private:
60  };
61 }
62 
63 } // otawa
64 
65 #endif /* OTAWA_PROC_ABSTRACT_FEATURE_H */
Definition: Registration.h:151
static AbstractFeature & null
Null value for features.
Definition: AbstractFeature.h:38
static const PropList EMPTY
This is an empty proplist for convenience.
Definition: PropList.h:66
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
AbstractMaker * _maker
Definition: AbstractFeature.h:59
This class represents identifier with a typed associated value.
Definition: Identifier.h:51
cstring name
Definition: odisasm.cpp:107
See Feature.
Definition: AbstractFeature.h:36
This a list of properties.
Definition: PropList.h:63
Shortcut to create a feature with a maker (without the mess of SilentFeature).
Definition: AbstractFeature.h:51