Otawa  0.10
SilentFeature.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * SilentFeature 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_SILENTFEATURE_H_
23 #define OTAWA_PROC_SILENTFEATURE_H_
24 
26 
27 namespace otawa {
28 
29 using namespace elm;
30 
31 // SilentFeature class
33 public:
34 
35  template <class C>
36  class Maker: public AbstractMaker {
37  public:
38  virtual Processor *make(void) const { return new C(); }
39  };
40 
41  inline SilentFeature(cstring name, const AbstractMaker& maker): AbstractFeature(name), _maker(maker) { }
42  virtual void process(WorkSpace *fw, const PropList& props = PropList::EMPTY) const;
43  virtual void check(otawa::WorkSpace*) const { }
44  virtual void clean(otawa::WorkSpace*) const { }
45 
46 private:
48 };
49 
50 } // otawa
51 
52 #endif /* OTAWA_PROC_SILENTFEATURE_H_ */
The usual Feature class has as drawback to exhibit completely the processing of the feature and there...
Definition: SilentFeature.h:32
Definition: Registration.h:151
static const PropList EMPTY
This is an empty proplist for convenience.
Definition: PropList.h:66
const AbstractMaker & _maker
Definition: SilentFeature.h:47
virtual Processor * make(void) const
Definition: SilentFeature.h:38
The processor class is implemented by all code processor.
Definition: Processor.h:49
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
virtual void clean(otawa::WorkSpace *) const
This method is called each time a feature is invalidated.
Definition: SilentFeature.h:44
virtual void check(otawa::WorkSpace *) const
Check if the framework really implement the current feature.
Definition: SilentFeature.h:43
cstring name
Definition: odisasm.cpp:107
Definition: SilentFeature.h:36
SilentFeature(cstring name, const AbstractMaker &maker)
Build a silent feature.
Definition: SilentFeature.h:41
See Feature.
Definition: AbstractFeature.h:36
This a list of properties.
Definition: PropList.h:63