GEOS
Namespaces | Macros | Enumerations
common.hpp File Reference
#include "common/DataTypes.hpp"
#include "common/logger/Logger.hpp"

Go to the source code of this file.

Namespaces

 geos
 

Macros

#define GEOS_LAI_RUNTIME_ASSERT   1
 
#define GEOS_LAI_ASSERT(expr)   GEOS_ERROR_IF( !(expr), "" )
 
#define GEOS_LAI_ASSERT_MSG(expr, msg)   GEOS_ERROR_IF( !(expr), msg )
 
#define GEOS_LAI_ASSERT_EQ(lhs, rhs)   GEOS_ERROR_IF_NE( lhs, rhs )
 
#define GEOS_LAI_ASSERT_NE(lhs, rhs)   GEOS_ERROR_IF_EQ( lhs, rhs )
 
#define GEOS_LAI_ASSERT_GT(lhs, rhs)   GEOS_ERROR_IF_GE( rhs, lhs )
 
#define GEOS_LAI_ASSERT_GE(lhs, rhs)   GEOS_ERROR_IF_GT( rhs, lhs )
 
#define GEOS_LAI_CHECK_ERROR(call)
 
#define GEOS_LAI_CHECK_ERROR_NNEG(call)
 

Enumerations

enum class  geos::LAIOutputFormat {
  NATIVE_ASCII , NATIVE_BINARY , MATLAB_ASCII , MATLAB_BINARY ,
  MATRIX_MARKET
}
 

Macro Definition Documentation

◆ GEOS_LAI_ASSERT

#define GEOS_LAI_ASSERT (   expr)    GEOS_ERROR_IF( !(expr), "" )

Assert expression is true

Parameters
exprexpression

Definition at line 35 of file common.hpp.

◆ GEOS_LAI_ASSERT_EQ

#define GEOS_LAI_ASSERT_EQ (   lhs,
  rhs 
)    GEOS_ERROR_IF_NE( lhs, rhs )

Assert lhs equals rhs

Parameters
lhsleft hand side
rhsright hand side

Definition at line 49 of file common.hpp.

◆ GEOS_LAI_ASSERT_GE

#define GEOS_LAI_ASSERT_GE (   lhs,
  rhs 
)    GEOS_ERROR_IF_GT( rhs, lhs )

Assert lhs greater than or equal to rhs

Parameters
lhsleft hand side
rhsright hand side

Definition at line 70 of file common.hpp.

◆ GEOS_LAI_ASSERT_GT

#define GEOS_LAI_ASSERT_GT (   lhs,
  rhs 
)    GEOS_ERROR_IF_GE( rhs, lhs )

Assert lhs greater than rhs

Parameters
lhsleft hand side
rhsright hand side

Definition at line 63 of file common.hpp.

◆ GEOS_LAI_ASSERT_MSG

#define GEOS_LAI_ASSERT_MSG (   expr,
  msg 
)    GEOS_ERROR_IF( !(expr), msg )

Assert expression and output message if false

Parameters
exprexpression
msgmessage

Definition at line 42 of file common.hpp.

◆ GEOS_LAI_ASSERT_NE

#define GEOS_LAI_ASSERT_NE (   lhs,
  rhs 
)    GEOS_ERROR_IF_EQ( lhs, rhs )

Assert lhs not equal to rhs

Parameters
lhsleft hand side
rhsright hand side

Definition at line 56 of file common.hpp.

◆ GEOS_LAI_CHECK_ERROR

#define GEOS_LAI_CHECK_ERROR (   call)
Value:
do { \
auto const ierr = call; \
GEOS_ERROR_IF_NE_MSG( ierr, 0, "Error in call to " << #call ); \
} while( false )

Macro for checking and reporting error codes from TPL packages

Parameters
callcall to check function

Definition at line 119 of file common.hpp.

◆ GEOS_LAI_CHECK_ERROR_NNEG

#define GEOS_LAI_CHECK_ERROR_NNEG (   call)
Value:
do { \
auto const ierr = call; \
GEOS_ERROR_IF_GT_MSG( 0, ierr, "Error in call to " << #call ); \
} while( false )

Macro for checking and reporting non-negative error codes from TPL packages

Parameters
callcall to check function

Definition at line 129 of file common.hpp.

◆ GEOS_LAI_RUNTIME_ASSERT

#define GEOS_LAI_RUNTIME_ASSERT   1

Whether to check preconditions at runtime in LAI functions

Definition at line 28 of file common.hpp.