Main Page   Reference Manual   Compound List   File List  

libecc/debug.h

Go to the documentation of this file.
00001 //
00011 //
00012 // This file is part of the libecc package.
00013 // Copyright (C) 2002, 2004 by
00014 //
00015 // Carlo Wood, Run on IRC <carlo@alinoe.com>
00016 // RSA-1024 0x624ACAD5 1997-01-26                    Sign & Encrypt
00017 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6  F6 F6 55 DD 1C DC FF 61
00018 //
00019 // This program is free software; you can redistribute it and/or
00020 // modify it under the terms of the GNU General Public License
00021 // as published by the Free Software Foundation; either version 2
00022 // of the License, or (at your option) any later version.
00023 //
00024 // This program is distributed in the hope that it will be useful,
00025 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00026 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00027 // GNU General Public License for more details.
00028 //
00029 // You should have received a copy of the GNU General Public License
00030 // along with this program; if not, write to the Free Software
00031 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00032 
00033 #ifndef LIBECC_DEBUG_H
00034 #define LIBECC_DEBUG_H
00035 
00036 #ifdef CWDEBUG
00037 #include <libcwd/libraries_debug.h>
00038 
00039 namespacelibecc {
00040   namespacedebug {
00041     namespacechannels {
00042       namespacedc {
00043         using namespacelibcwd::channels::dc;
00044         extern libcwd::channel_ct ecc;
00045         extern libcwd::channel_ct polynomial;
00046         extern libcwd::channel_ct bitsetfind1;
00047         extern libcwd::channel_ct bitsetshift;
00048         extern libcwd::channel_ct gaussj;
00049       }
00050     }
00051   }
00052 }
00053 #endif // CWDEBUG
00054 
00055 // Define private debug output macros for use in header files of the library.
00056 #define LibEccDebug(STATEMENT...) LibcwDebug(libecc::debug::channels, STATEMENT)
00057 #define LibEccDout(cntrl, data) LibcwDout(libecc::debug::channels, libcwd::libcw_do, cntrl, data)
00058 #define LibEccDoutFatal(cntrl, data) LibcwDoutFatal(libecc::debug::channels, libcwd::libcw_do, cntrl, data)
00059 #define LibEccForAllDebugChannels(STATEMENT...) LibcwdForAllDebugChannels(libecc::debug::channels, STATEMENT)
00060 #define LibEccForAllDebugObjects(STATEMENT...) LibcwdForAllDebugObjects(libecc::debug::channels, STATEMENT)
00061 
00062 // All other macros might be used in header files of libecc, but need to be
00063 // defined by the debug.h of the application that uses it.
00064 // LIBECC_INTERNAL is defined when the library itself is being compiled (see below).
00065 #if !defined(Debug) && !defined(LIBECC_INTERNAL)
00066 #error The application source file (.cc or .cpp) must use '#include "debug.h"' _before_ including the header file that it includes now, that led to this error.
00067 #endif
00068 
00069 #endif // LIBECC_DEBUG_H
Copyright © 2002-2004 Carlo Wood.  All rights reserved.