libcwd: The C++ Debugging Support Library - Reference Manual
Author: Carlo Wood
Description: C++ debugging support library with ostream debug output
Keywords: libcwd, debug output, debug facility, debug channel, object orientation, OO, C++, nested debug output, ostream, memory allocation, debugging, source file and line number

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

# libcwd/control_flag.h

Go to the documentation of this file.

    00001 // $Header$
    00002 //
    00003 // Copyright (C) 2000 - 2004, by
    00004 //
    00005 // Carlo Wood, Run on IRC <carlo@alinoe.com>
    00006 // RSA-1024 0x624ACAD5 1997-01-26                    Sign & Encrypt
    00007 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6  F6 F6 55 DD 1C DC FF 61
    00008 //
    00009 // This file may be distributed under the terms of the Q Public License
    00010 // version 1.0 as appearing in the file LICENSE.QPL included in the
    00011 // packaging of this file.
    00012 //
    00013
    00018 #ifndef LIBCWD_CONTROL_FLAG_H
    00019 #define LIBCWD_CONTROL_FLAG_H
    00020
    00021 #ifndef LIBCWD_CONFIG_H
    00022 #include <libcwd/config.h>
    00023 #endif
    00024
    00025 namespace libcwd {
    00026
    00031 typedef unsigned int control_flag_t;
    00032
    00033 // The control bits:
    00035 control_flag_t const nonewline_cf               = 0x0001;
    00036
    00038 control_flag_t const noprefix_cf                = 0x0002;
    00039
    00041 control_flag_t const nolabel_cf                 = 0x0004;
    00042
    00044 control_flag_t const blank_margin_cf            = 0x0008;
    00045
    00047 control_flag_t const blank_label_cf             = 0x0010;
    00048
    00050 control_flag_t const blank_marker_cf            = 0x0020;
    00051
    00053 control_flag_t const cerr_cf                    = 0x0040;
    00054
    00056 control_flag_t const flush_cf                   = 0x0080;
    00057
    00059 control_flag_t const wait_cf                    = 0x0100;
    00060
    00062 control_flag_t const error_cf                   = 0x0200;
    00063
    00064 // Special mask bits.
    00065 control_flag_t const continued_cf_maskbit       = 0x0400;
    00066 control_flag_t const continued_expected_maskbit = 0x0800;
    00067
    00068 // Mask bits of all special channels:
    00069 control_flag_t const fatal_maskbit              = 0x1000;
    00070 control_flag_t const coredump_maskbit           = 0x2000;
    00071 control_flag_t const continued_maskbit          = 0x4000;
    00072 control_flag_t const finish_maskbit             = 0x8000;
    00073
    00075 enum continued_cf_nt {
    00076   continued_cf
    00077 };
    00078
    00080 inline control_flag_t cond_nonewline_cf(bool cond) { return cond ? nonewline_cf : 0; }
    00082 inline control_flag_t cond_noprefix_cf(bool cond) { return cond ? noprefix_cf : 0; }
    00084 inline control_flag_t cond_nolabel_cf(bool cond) { return cond ? nolabel_cf : 0; }
    00086 inline control_flag_t cond_error_cf(bool err) { return err ? error_cf : 0; }
    00087
    00090 } // namespace libcwd
    00091
    00092 #endif // LIBCWD_CONTROL_FLAG_H
    00093