Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

assert.C

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------+
00002  | Library QgarLib, graphics analysis and recognition                  |
00003  | Copyright (C) 2002  Qgar Project, LORIA                             |
00004  |                                                                     |
00005  | This library is free software; you can redistribute it and/or       |
00006  | modify it under the terms of the GNU Lesser General Public          |
00007  | License version 2.1, as published by the Free Software Foundation.  |
00008  |                                                                     |
00009  | This library is distributed in the hope that it will be useful,     |
00010  | but WITHOUT ANY WARRANTY; without even the implied warranty of      |
00011  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                |
00012  | See the GNU Lesser General Public License for more details.         |
00013  |                                                                     |
00014  | The GNU Lesser General Public License is included in the file       |
00015  | LICENSE.LGPL, in the root directory of the Qgar packaging. See      |
00016  | http://www.gnu.org/licenses/lgpl.html for the terms of the licence. |
00017  | To receive a paper copy, write to the Free Software Foundation,     |
00018  | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.       |
00019  |                                                                     |
00020  | Contact Project Qgar for any information:                           |
00021  |   LORIA - équipe Qgar                                               |
00022  |   B.P. 239, 54506 Vandoeuvre-lès-Nancy Cedex, France                |
00023  |   email: qgar-contact@loria.fr                                      |
00024  |   http://www.qgar.org/                                              |
00025  *---------------------------------------------------------------------*/
00026 
00027 
00028 /**
00029  * @file   assert.C
00030  * @brief  Implementation of functions from assert.H.
00031  *
00032  * @author <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Gerald Masini">Gerald Masini</a>
00033  * @date   July 4, 2001  17:09
00034  * @since  qgar 1.0
00035  */
00036 
00037 
00038 
00039 // STL
00040 #include <iostream>
00041 // QGAR
00042 #include <qgarlib/assert.H>
00043 
00044 
00045 
00046 namespace qgar
00047 {
00048 
00049 // -------------------------------------------------------------------
00050 // GLOBAL FUNCTIONS
00051 // -------------------------------------------------------------------
00052 
00053 // Print a diagnostic message about failure of assertion EXPR.
00054 // FILE is the name of the source file including the assertion
00055 // and LINE is the line number of the assertion in the file.
00056 
00057 void
00058 __qgPrintAssert(const char* anExpr, const char* aFile, int aLine)
00059 {
00060   std::cerr << "QGAR ASSERT>>> Assertion failure: "
00061             << anExpr
00062             << std::endl
00063             << "  at line "
00064             << aLine
00065             << " in file "
00066             << aFile
00067             << std::endl;
00068 }
00069 
00070 // -------------------------------------------------------------------
00071 
00072 } // namespace qgar