37 #ifndef H_OGF_BASIC_COMMON_COMMON_H
38 #define H_OGF_BASIC_COMMON_COMMON_H
53 #include <geogram/basic/logger.h>
57 #define OGF_EXPORT GEO_EXPORT
58 #define OGF_IMPORT GEO_IMPORT
61 # define BASIC_API OGF_EXPORT
63 # define BASIC_API OGF_IMPORT
66 #define ogf_assert(x) geo_assert(x)
67 #define ogf_debug_assert(x) geo_debug_assert(x)
68 #define ogf_assert_not_reached geo_assert_not_reached
69 #define ogf_argused(x) ::GEO::geo_argused(x)
70 #define ogf_range_assert(x,xmin,xmax) geo_assert((x) >= (xmin) && (x) <= (xmax))
78 template <
class T>
Sign ogf_sgn(
const T& x) {
81 template <
class T>
void ogf_clamp(T& x, T xmin, T xmax) {
84 template <
class T> T ogf_sqr(
const T& x) {
91 static class BASIC_API basic_libinit {
96 static void increment_users() ;
97 static void decrement_users() ;
100 static void initialize() ;
101 static void terminate() ;
103 } basic_libinit_instance ;
A function to suppress unused parameters compilation warnings.
Assertion checking mechanism.
Base class of reference-counted objects, to be used with smart pointers.
Common include file, providing basic definitions. Should be included before anything else by all head...
Types and functions for memory manipulation.
Global Vorpaline namespace.
T geo_sqr(T x)
Gets the square value of a value.
void geo_clamp(T &x, T min, T max)
Clamps a value to a range.
Sign geo_sgn(const T &x)
Gets the sign of a value.
Sign
Integer constants that represent the sign of a value.
Global Graphite namespace.
Types and functions for numbers manipulation.
Pointers with automatic reference counting.
Functions for string manipulation.