GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00007 * Copyright (C) 2006 Refractions Research Inc. 00008 * 00009 * This is free software; you can redistribute and/or modify it under 00010 * the terms of the GNU Lesser General Public Licence as published 00011 * by the Free Software Foundation. 00012 * See the COPYING file for more information. 00013 * 00014 **********************************************************************/ 00015 00016 #ifndef GEOS_UTIL_ASSERT_H 00017 #define GEOS_UTIL_ASSERT_H 00018 00019 #include <geos/export.h> 00020 #include <string> 00021 00022 // Forward declarations 00023 namespace geos { 00024 namespace geom { 00025 class Coordinate; 00026 } 00027 } 00028 00029 namespace geos { 00030 namespace util { // geos.util 00031 00032 class GEOS_DLL Assert { 00033 public: 00034 00035 static void isTrue(bool assertion, const std::string& message); 00036 00037 static void isTrue(bool assertion) { 00038 isTrue(assertion, std::string()); 00039 } 00040 00041 00042 static void equals(const geom::Coordinate& expectedValue, 00043 const geom::Coordinate& actualValue, 00044 const std::string& message); 00045 00046 static void equals(const geom::Coordinate& expectedValue, 00047 const geom::Coordinate& actualValue) 00048 { 00049 equals(expectedValue, actualValue, std::string()); 00050 } 00051 00052 00053 static void shouldNeverReachHere(const std::string& message); 00054 00055 static void shouldNeverReachHere() { shouldNeverReachHere(std::string()); } 00056 }; 00057 00058 } // namespace geos.util 00059 } // namespace geos 00060 00061 00062 #endif // GEOS_UTIL_ASSERT_H