Otawa  0.10
Progress.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * Progress interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2010, 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_PROGRESS_H_
23 #define OTAWA_PROC_PROGRESS_H_
24 
25 #include <elm/string.h>
26 
27 namespace otawa {
28 
29 // External class
30 class Processor;
31 
32 // Progress class
33 class Progress {
34 public:
35  typedef enum {
40  } mode_t;
41 
42  static Progress& null;
43 
44  virtual void start(const Processor& processor, mode_t mode, int max = 0) = 0;
45  virtual void stop(void) = 0;
46  virtual void report(string info, int level) = 0;
47  virtual void restart(string info) = 0;
48 };
49 
50 } // otawa
51 
52 #endif /* OTAWA_PROC_PROGRESS_H_ */
This class is an interface to get progress information about execution of a processor.
Definition: Progress.h:33
virtual void restart(string info)=0
This method is only called in otawa::Processor::fixpoint mode at each step start. ...
Definition: Progress.h:36
Definition: Progress.h:38
virtual void stop(void)=0
Called at the end of the work.
virtual void report(string info, int level)=0
Called each time to inform about the progression.
Definition: Progress.h:37
The processor class is implemented by all code processor.
Definition: Processor.h:49
virtual void start(const Processor &processor, mode_t mode, int max=0)=0
This method is called when the processor is starting.
static Progress & null
Progress handler that do nothing.
Definition: Progress.h:42
mode_t
Definition: Progress.h:35
Definition: Progress.h:39
intn_t max(intn_t a, intn_t b)
Return the max with a signed comparison.
Definition: clp_analysis.cpp:180