1 /*
2  * hunt-console eases the creation of beautiful and testable command line interfaces.
3  *
4  * Copyright (C) 2018-2019, HuntLabs
5  *
6  * Website: https://www.huntlabs.net
7  *
8  * Licensed under the Apache-2.0 License.
9  *
10  */
11  
12 module hunt.console.output.NullOutput;
13 
14 import hunt.console.formatter.DefaultOutputFormatter;
15 import hunt.console.formatter.OutputFormatter;
16 import hunt.console.output.Output;
17 import hunt.console.output.OutputType;
18 import hunt.console.output.Verbosity;
19 
20 class NullOutput : Output
21 {
22     override public void write(string message)
23     {
24         // do nothing
25     }
26 
27     override public void write(string message, bool newline)
28     {
29         // do nothing
30     }
31 
32     override public void write(string message, bool newline, OutputType type)
33     {
34         // do nothing
35     }
36 
37     override public void writeln(string message)
38     {
39         // do nothing
40     }
41 
42     override public void writeln(string message, OutputType type)
43     {
44         // do nothing
45     }
46 
47     override public void setVerbosity(Verbosity verbosity)
48     {
49         // do nothing
50     }
51 
52     override public Verbosity getVerbosity()
53     {
54         return Verbosity.QUIET;
55     }
56 
57     override public void setDecorated(bool decorated)
58     {
59         // do nothing
60     }
61 
62     override public bool isDecorated()
63     {
64         return false;
65     }
66 
67     /* override */ public void setFormatter(OutputFormatter formatter)
68     {
69         // do nothing
70     }
71 
72     /* override */ public OutputFormatter getFormatter()
73     {
74         return new DefaultOutputFormatter();
75     }
76 
77     public bool isQuiet()
78     {
79         return true;
80     }
81 
82     public bool isVerbose()
83     {
84         return false;
85     }
86 
87     public bool isVeryVerbose()
88     {
89         return false;
90     }
91 
92     public bool isDebug()
93     {
94         return false;
95     }
96 }