Otawa  0.10
DynProcessor.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * DynProcessor class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2009, 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_DYNPROCESSOR_H_
23 #define OTAWA_PROC_DYNPROCESSOR_H_
24 
25 #include <otawa/proc/Processor.h>
26 
27 namespace otawa {
28 
29 // ProcessorNotFound exception
31 public:
32  ProcessorNotFound(string name);
33  inline const string& name(void) const { return _name; }
34 private:
35  string _name;
36 };
37 
38 // DynProcessor class
39 class DynProcessor {
40 public:
42  ~DynProcessor(void);
43  inline string name(void) const { return proc->name(); }
44  inline Version version(void) const { return proc->version(); }
45  inline void configure(const PropList &props) { proc->configure(props); }
46  void process(WorkSpace *ws, const PropList &props=PropList::EMPTY);
47 
48 private:
50 };
51 
52 } // otawa
53 
54 #endif /* OTAWA_PROC_DYNPROCESSOR_H_ */
virtual void configure(const PropList &props)
This method may be called for configuring a processor thanks to information passed in the property li...
Definition: proc_Processor.cpp:407
elm::String name(void) const
Definition: Processor.h:91
Version version(void) const
Get the version of the processor.
Definition: DynProcessor.h:44
void configure(const PropList &props)
Configure the processor.
Definition: DynProcessor.h:45
string _name
Definition: DynProcessor.h:35
static const PropList EMPTY
This is an empty proplist for convenience.
Definition: PropList.h:66
Processor * proc
Definition: DynProcessor.h:49
const string & name(void) const
Get the name of the not found processor.
Definition: DynProcessor.h:33
Base class of Otawa exceptions.
Definition: base.h:168
The processor class is implemented by all code processor.
Definition: Processor.h:49
string name(void) const
Get the name of the processor.
Definition: DynProcessor.h:43
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
This pseudo-processor allows to call processor based on their name.
Definition: DynProcessor.h:39
elm::Version version(void) const
Definition: Processor.h:92
ProcessorNotFound(string name)
Build the exception.
Definition: proc_DynProcessor.cpp:39
DynProcessor(cstring name)
Find the processor whose name is given.
Definition: proc_DynProcessor.cpp:67
~DynProcessor(void)
Definition: proc_DynProcessor.cpp:76
This a list of properties.
Definition: PropList.h:63
This exception is thrown when a code processor can not be found.
Definition: DynProcessor.h:30
void process(WorkSpace *ws, const PropList &props=PropList::EMPTY)
Process the given workspace on the processor.
Definition: proc_DynProcessor.cpp:107