Otawa  0.10
StatInfo.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * StatInfo class interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2011, 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 
23 #ifndef OTAWA_STATS_STATINFO_H_
24 #define OTAWA_STATS_STATINFO_H_
25 
26 #include <otawa/prop/Identifier.h>
27 #include <elm/genstruct/Vector.h>
28 #include "StatCollector.h"
29 
30 namespace otawa {
31 
32 using namespace elm::genstruct;
33 class WorkSpace;
34 
35 class StatInfo {
36 public:
38 
39  static void add(WorkSpace *ws, StatCollector& stats);
40  static void remove(WorkSpace *ws, StatCollector& stats);
41 
42  class Iter: public Vector<StatCollector *>::Iterator {
43  public:
44  Iter(WorkSpace *ws);
45  };
46 
47 private:
48  static Vector<StatCollector *>& get(WorkSpace *ws);
50 };
51 
52 } // otawa
53 
54 #endif /* OTAWA_STATS_STATINFO_H_ */
Aggregator of statistics put on the workspace.
Definition: StatInfo.h:35
Definition: StatInfo.h:42
Vector< StatCollector * > stats
Definition: StatInfo.h:49
A statistics collector allows to access statistics produced by an analysis.
Definition: StatCollector.h:30
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
inst add(int d, int a, int b)
Definition: inst.h:163
static Identifier< StatInfo * > ID
Identifier of statistics information.
Definition: StatInfo.h:37
This class represents identifier with a typed associated value.
Definition: Identifier.h:51