GEOS: Assert.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

Assert.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16 #ifndef GEOS_UTIL_ASSERT_H
17 #define GEOS_UTIL_ASSERT_H
18
19 #include <geos/export.h>
20 #include <string>
21
22 // Forward declarations
23 namespace geos {
24 namespace geom {
25 class Coordinate;
26 }
27 }
28
29 namespace geos {
30 namespace util { // geos.util
31
32 class GEOS_DLL Assert {
33 public:
34
35 static void isTrue(bool assertion, const std::string& message);
36
37 static void isTrue(bool assertion) {
38 isTrue(assertion, std::string());
39 }
40
41
42 static void equals(const geom::Coordinate& expectedValue,
43 const geom::Coordinate& actualValue,
44 const std::string& message);
45
46 static void equals(const geom::Coordinate& expectedValue,
47 const geom::Coordinate& actualValue)
48 {
49 equals(expectedValue, actualValue, std::string());
50 }
51
52
53 static void shouldNeverReachHere(const std::string& message);
54
55 static void shouldNeverReachHere() { shouldNeverReachHere(std::string()); }
56 };
57
58 } // namespace geos.util
59 } // namespace geos
60
61
62 #endif // GEOS_UTIL_ASSERT_H
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25