LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
libtask.hh File Reference

Interface to the Task module. More...

Include dependency graph for libtask.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  task
 Handling of Task.

Macros

#define CONCAT_(A, B)   A ## B
#define CONCAT(A, B)   CONCAT_(A, B)
#define TASK_UNIQUE()   CONCAT(task_, __LINE__)
#define TASK_GROUP(Name)   extern const char* group_name
 Define the current Task group name.
#define TASK_DECLARE(Name, Help, Routine, Deps)   extern void (Routine) ()
 Instantiate a FunctionTask.
#define BOOLEAN_TASK_DECLARE(Name, Help, Flag, Deps)   extern bool Flag;
 Instantiate a BooleanTask.
#define INT_TASK_DECLARE(Name, Min, Max, Help, Flag, Deps)
 Instantiate an IntTask.
#define STRING_TASK_DECLARE(Name, Default, Help, Flag, Deps)   extern std::string Flag;
 Instantiate a StringTask.
#define MULTIPLE_STRING_TASK_DECLARE(Name, Help, Routine, Deps)   extern void (Routine) (std::string);
 Instantiate a MultipleStringTask.
#define DISJUNCTIVE_TASK_DECLARE(Name, Help, Deps)
 Instantiate a DisjunctiveTask.

Detailed Description

Interface to the Task module.

Macro Definition Documentation

#define BOOLEAN_TASK_DECLARE (   Name,
  Help,
  Flag,
  Deps 
)    extern bool Flag;

Instantiate a BooleanTask.

#define CONCAT (   A,
 
)    CONCAT_(A, B)
#define CONCAT_ (   A,
 
)    A ## B

A means to concatenate tokens with delayed evaluation.

#define DISJUNCTIVE_TASK_DECLARE (   Name,
  Help,
  Deps 
)

Instantiate a DisjunctiveTask.

#define INT_TASK_DECLARE (   Name,
  Min,
  Max,
  Help,
  Flag,
  Deps 
)

Instantiate an IntTask.

#define MULTIPLE_STRING_TASK_DECLARE (   Name,
  Help,
  Routine,
  Deps 
)    extern void (Routine) (std::string);

Instantiate a MultipleStringTask.

#define STRING_TASK_DECLARE (   Name,
  Default,
  Help,
  Flag,
  Deps 
)    extern std::string Flag;

Instantiate a StringTask.

#define TASK_DECLARE (   Name,
  Help,
  Routine,
  Deps 
)    extern void (Routine) ()

Instantiate a FunctionTask.

#define TASK_GROUP (   Name)    extern const char* group_name

Define the current Task group name.

#define TASK_UNIQUE ( )    CONCAT(task_, __LINE__)

Make a "unique" token using the line number of invocation of this macro.

Conflicts are possible, but unlikely: tasks declared at the same line number, but in different files, are not a problem, since anyway the tasks are static, and in different namespaces.

Just don't declare two tasks on the same line!