LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
A simple Task that sets an Int variable. More...
#include <int-task.hh>
Public Types | |
typedef TaskRegister::tasks_list_type | tasks_list_type |
typedef std::list< std::string > | deps_type |
Public Member Functions | |
IntTask (int &var, int min, int max, const char *module_name, const char *desc, const char *name, std::string deps) | |
virtual bool | check () const override |
Check that the preconditions are verified. | |
virtual void | execute () const override |
Execute this task. | |
virtual deps_type | resolve_dependencies (tasks_list_type &active_tasks) const |
void | print_dependencies () const |
Display dependencies of this task . | |
Accessors. | |
const char * | name_get () const |
const char * | module_name_get () const |
Access to 'module_name'. | |
int | key_get () const |
Access to 'key'. | |
const char * | desc_get () const |
Access to 'desc'. | |
const char * | argname_get () const |
The argument name. | |
void | argname_set (const char *) |
void | arg_set (const char *arg) const |
The argument. | |
const char * | arg_get () const |
const deps_type & | dependencies_get () const |
Access to tasks dependencies. |
Static Public Member Functions | |
static std::string | normalize (const std::string &task_name) |
Normalize the name of a task. |
Protected Attributes | |
std::string | name_ |
Task name. | |
const char * | module_name_ |
Module name to which the task belongs. | |
int | key_ |
The integer key provided by the this task to the option parser. | |
const char * | desc_ |
A short description of this task (displayed in program usage). | |
const char * | argname_ |
The name of the argument to display in the –help message. | |
const char * | arg_ |
The actual argument value. | |
deps_type | dependencies_ |
Contains the name of the tasks on which this one depends. |
Private Attributes | |
int & | var_ |
int | min_ |
int | max_ |
A simple Task that sets an Int variable.
|
inherited |
|
inherited |
task::IntTask::IntTask | ( | int & | var, |
int | min, | ||
int | max, | ||
const char * | module_name, | ||
const char * | desc, | ||
const char * | name, | ||
std::string | deps | ||
) |
References task::Task::argname_set().
|
inlineinherited |
References task::Task::arg_.
Referenced by check(), task::StringTask::check(), and task::MultipleStringTask::check().
|
inlineinherited |
|
inlineinherited |
The argument name.
References task::Task::argname_.
|
inlineinherited |
References task::Task::argname_.
Referenced by IntTask(), task::MultipleStringTask::MultipleStringTask(), and task::StringTask::StringTask().
|
overridevirtual |
Check that the preconditions are verified.
Implements task::Task.
References task::Task::arg_get(), max_, min_, program_name, and var_.
|
inlineinherited |
Access to tasks dependencies.
References task::Task::dependencies_.
Referenced by task::TaskRegister::print_task_graph(), and task::TaskRegister::resolve_dependencies().
|
inlineinherited |
Access to 'desc'.
References task::Task::desc_.
|
overridevirtual |
Execute this task.
Implements task::Task.
|
inlineinherited |
|
inlineinherited |
Access to 'module_name'.
References task::Task::module_name_.
|
inlineinherited |
Access to 'name'.
'const char*' is preferred to 'std::string' because TaskRegister calls C functions, that expect 'const char*'. The use of 'std::string::c_str()' is so forbidden and a call to 'strdup(std::string::c_str())' would implies dummy memory leaks.
References task::Task::name_.
Referenced by task::TaskRegister::print_task_graph(), task::TaskRegister::register_task(), and task::TaskRegister::resolve_dependencies().
|
staticinherited |
Normalize the name of a task.
Referenced by task::Task::Task().
|
inherited |
Display dependencies of this task .
Display dependencies of this task.
References task::Task::dependencies_, and task::Task::name_.
|
virtualinherited |
Reimplemented in task::DisjunctiveTask.
References task::Task::dependencies_.
Referenced by task::TaskRegister::resolve_dependencies().
|
mutableprotectedinherited |
The actual argument value.
Referenced by task::Task::arg_get(), and task::Task::arg_set().
|
protectedinherited |
The name of the argument to display in the –help message.
Referenced by task::Task::argname_get(), and task::Task::argname_set().
|
protectedinherited |
Contains the name of the tasks on which this one depends.
Referenced by task::Task::dependencies_get(), task::Task::print_dependencies(), task::DisjunctiveTask::resolve_dependencies(), task::Task::resolve_dependencies(), and task::Task::Task().
|
protectedinherited |
A short description of this task (displayed in program usage).
Referenced by task::Task::desc_get().
|
protectedinherited |
The integer key provided by the this task to the option parser.
From 'argp ()': "If key has a value that is a printable ASCII character (i.e., isascii (key) is true), it also specifies a short option '-char' where char is the ASCII character with the code key"
Referenced by task::Task::key_get(), and task::Task::Task().
|
private |
Referenced by check().
|
private |
Referenced by check().
|
protectedinherited |
Module name to which the task belongs.
Referenced by task::Task::module_name_get().
|
protectedinherited |
Task name.
Referenced by task::Task::name_get(), task::Task::print_dependencies(), and task::Task::Task().
|
private |
Referenced by check().