LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
task-register.hh
Go to the documentation of this file.
1
7
#ifndef TASK_TASK_REGISTER_HH
8
# define TASK_TASK_REGISTER_HH
9
10
# include <iosfwd>
11
# include <string>
12
# include <list>
13
# include <map>
14
15
# include <
task/fwd.hh
>
16
# include <
misc/timer.hh
>
17
18
namespace
task
19
{
20
28
class
TaskRegister
29
{
30
// Make it non-copyable.
31
TaskRegister
(
const
TaskRegister
&) =
delete
;
32
TaskRegister
&
operator=
(
const
TaskRegister
&) =
delete
;
33
35
private
:
37
TaskRegister
() =
default
;
38
public
:
40
static
TaskRegister
&
instance
();
41
44
public
:
46
void
register_task
(
const
Task
& task);
48
void
enable_task
(
const
std::string& task_name,
const
char
* arg =
nullptr
);
49
51
int
nb_of_task_to_execute_get
();
55
56
private
:
62
void
resolve_dependencies
(
const
Task
& task);
63
64
public
:
68
char
*
parse_arg
(
int
argc,
char
* argv[]);
69
70
73
public
:
75
std::ostream&
print_task_list
(std::ostream& ostr);
77
std::ostream&
print_task_graph
(std::ostream& ostr);
79
std::ostream&
print_task_order
(std::ostream& ostr);
81
82
85
public
:
87
void
execute
();
92
public
:
94
const
misc::timer
&
timer_get
()
const
;
97
public
:
99
typedef
std::list<Task const*>
tasks_list_type
;
101
typedef
std::map<int, Task const*>
tasks_by_key_type
;
103
const
tasks_by_key_type
&
task_keys_get
()
const
;
104
105
private
:
107
typedef
std::map<const std::string, Task const*>
tasks_by_name_type
;
109
tasks_by_name_type
task_list_
;
110
112
tasks_by_key_type
task_keys_
;
113
115
tasks_list_type
task_order_
;
116
118
misc::timer
timer_
;
119
};
120
121
}
// namespace task
122
123
# include <
task/task-register.hxx
>
124
125
#endif // !TASK_TASK_REGISTER_HH
task
task-register.hh
Generated on Wed Mar 5 2014 15:47:37 for LRDE Tiger Compiler by
1.8.1.2