Main Page   Reference Manual   Namespace List   Compound List   Namespace Members   Compound Members   File Members  

control_flag.h
Go to the documentation of this file.
1 // $Header$
2 //
3 // Copyright (C) 2000 - 2004, by
4 //
5 // Carlo Wood, Run on IRC <carlo@alinoe.com>
6 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt
7 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61
8 //
9 // This file may be distributed under the terms of the Q Public License
10 // version 1.0 as appearing in the file LICENSE.QPL included in the
11 // packaging of this file.
12 //
13 
18 #ifndef LIBCWD_CONTROL_FLAG_H
19 #define LIBCWD_CONTROL_FLAG_H
20 
21 #ifndef LIBCWD_CONFIG_H
22 #include "config.h"
23 #endif
24 
25 namespace libcwd {
26 
31 typedef unsigned int control_flag_t;
32 
33 // The control bits:
36 
38 control_flag_t const noprefix_cf = 0x0002;
39 
41 control_flag_t const nolabel_cf = 0x0004;
42 
45 
48 
51 
53 control_flag_t const cerr_cf = 0x0040;
54 
56 control_flag_t const flush_cf = 0x0080;
57 
59 control_flag_t const wait_cf = 0x0100;
60 
62 control_flag_t const error_cf = 0x0200;
63 
64 // Special mask bits.
65 control_flag_t const continued_cf_maskbit = 0x0400;
66 control_flag_t const continued_expected_maskbit = 0x0800;
67 
68 // Mask bits of all special channels:
69 control_flag_t const fatal_maskbit = 0x1000;
70 control_flag_t const coredump_maskbit = 0x2000;
71 control_flag_t const continued_maskbit = 0x4000;
72 control_flag_t const finish_maskbit = 0x8000;
73 
77 };
78 
80 inline control_flag_t cond_nonewline_cf(bool cond) { return cond ? nonewline_cf : 0; }
82 inline control_flag_t cond_noprefix_cf(bool cond) { return cond ? noprefix_cf : 0; }
84 inline control_flag_t cond_nolabel_cf(bool cond) { return cond ? nolabel_cf : 0; }
86 inline control_flag_t cond_error_cf(bool err) { return err ? error_cf : 0; }
87 
90 } // namespace libcwd
91 
92 #endif // LIBCWD_CONTROL_FLAG_H
93 
control_flag_t const blank_marker_cf
Replace marker by white space.
Definition: control_flag.h:50
control_flag_t cond_noprefix_cf(bool cond)
Returns noprefix_cf when cond is true.
Definition: control_flag.h:82
control_flag_t const noprefix_cf
Omit margin, label, marker and indentation.
Definition: control_flag.h:38
control_flag_t const nolabel_cf
Omit label, marker and indentation.
Definition: control_flag.h:41
control_flag_t cond_nonewline_cf(bool cond)
Returns nonewline_cf when cond is true.
Definition: control_flag.h:80
control_flag_t cond_nolabel_cf(bool cond)
Returns nolabel_cf when cond is true.
Definition: control_flag.h:84
unsigned int control_flag_t
Definition: control_flag.h:31
control_flag_t cond_error_cf(bool err)
Returns error_cf when cond is true.
Definition: control_flag.h:86
control_flag_t const nonewline_cf
Omit the default new line at the end.
Definition: control_flag.h:35
control_flag_t const blank_margin_cf
Replace margin by white space.
Definition: control_flag.h:44
continued_cf_nt
continued_cf has its own type for overloading purposes.
Definition: control_flag.h:75
control_flag_t const error_cf
Append error string according to errno.
Definition: control_flag.h:62
control_flag_t const cerr_cf
Force output to be written to cerr.
Definition: control_flag.h:53
control_flag_t const blank_label_cf
Replace label by white space.
Definition: control_flag.h:47
control_flag_t const wait_cf
If interactive, wait till return is pressed.
Definition: control_flag.h:59
control_flag_t const flush_cf
Flush ostream after writing this output.
Definition: control_flag.h:56
@ continued_cf
Start a continued debug output.
Definition: control_flag.h:76
namespace for libcwd.
Definition: debug.cc:87
Copyright © 2001 - 2004 Carlo Wood.  All rights reserved.