45 |
method to do their job. |
method to do their job. |
46 |
*) |
*) |
47 |
|
|
48 |
|
open Env |
49 |
|
|
50 |
class virtual ['a] defaultVisitor = |
class virtual ['a] defaultVisitor = |
51 |
object |
object |
52 |
|
|
53 |
(** |
(** |
54 |
|
The name of visitor's module. This name is mainly needed in order to |
55 |
|
handle verbosity. It must be set by the concrete visitor's constructors. |
56 |
|
*) |
57 |
|
val mutable _moduleName = "unnamed module" |
58 |
|
|
59 |
|
(** |
60 |
The generic visit method. |
The generic visit method. |
61 |
*) |
*) |
62 |
method virtual visit : 'a -> unit |
method virtual visit : 'a -> unit |
63 |
|
|
64 |
|
(** |
65 |
|
Displays a string on the output channel (shortcut to Env's `out' method). |
66 |
|
@param msg The message to be displayed. |
67 |
|
@param min_verbosity_level If _verbosity >= this parameter, the message |
68 |
|
is displayed. |
69 |
|
*) |
70 |
|
method out msg min_verbosity_level = |
71 |
|
(Env.getEnv())#out _moduleName msg min_verbosity_level |
72 |
|
|
73 |
|
(** |
74 |
|
Displays a string on the error channel (shortcut to Env's `err' method). |
75 |
|
@param msg The message to be displayed. |
76 |
|
@param min_verbosity_level If _verbosity >= this parameter, the message |
77 |
|
is displayed. |
78 |
|
*) |
79 |
|
method err msg min_verbosity_level = |
80 |
|
(Env.getEnv())#err _moduleName msg min_verbosity_level |
81 |
|
|
82 |
end |
end |