humoto
humoto_helpers.h
Go to the documentation of this file.
1 /**
2  @file
3  @author Alexander Sherikov
4  @author Jan Michalczyk
5  @copyright 2014-2017 INRIA. Licensed under the Apache License, Version 2.0.
6  (see @ref LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
7 
8  @brief Very basic definitions
9 
10  @note This header need not be included directly.
11 */
12 
13 #pragma once
14 
15 #include "build_config.h"
16 #include "export_import.h"
17 
18 #include <algorithm>
19 #include <vector>
20 #include <map>
21 #include <stack>
22 #include <queue>
23 #include <list>
24 #include <string>
25 #include <string>
26 #include <cmath>
27 #include <utility>
28 #include <limits>
29 #include <fstream>
30 #include <iostream>
31 #include <iomanip>
32 #include <sys/time.h>
33 #include <stdexcept>
34 
35 #include <boost/shared_ptr.hpp>
36 #include <boost/lexical_cast.hpp>
37 #include <boost/math/special_functions/fpclassify.hpp>
38 
39 #ifdef HUMOTO_USE_THREADS_FOR_LOGGING
40 #include <boost/thread.hpp>
41 #endif
42 
43 #ifdef DNDEBUG
44 #else
45 #define EIGEN_INITIALIZE_MATRICES_BY_NAN
46 #endif
47 
48 #include <Eigen/Core>
49 #include <Eigen/Geometry>
50 
51 
52 //=============================================================================
53 // Configuration
54 //=============================================================================
55 
56 // The defines, which are disabled by default should be kept here.
57 #ifdef HUMOTO_DOXYGEN_PROCESSING
58 
59 /// Define this to enable logging
60 #define HUMOTO_GLOBAL_LOGGER_ENABLED
61 
62 #endif // HUMOTO_DOXYGEN_PROCESSING
63 
64 //=============================================================================
65 
66 
67 /**
68  * @brief HUMOTO_THROW_MSG throws an error message concatenated with the name
69  * of the function (if supported).
70  */
71 #ifdef HUMOTO_COMPILER_SUPPORTS_FUNC_
72  #define HUMOTO_THROW_MSG(s) throw std::runtime_error(std::string("In ") + __func__ + "() // " + (s))
73 #else
74  #ifdef HUMOTO_COMPILER_SUPPORTS_FUNCTION_
75  #define HUMOTO_THROW_MSG(s) throw std::runtime_error(std::string("In ") + __FUNCTION__ + "() // " + (s))
76  #else
77  #define HUMOTO_THROW_MSG(s) throw std::runtime_error(s)
78  #endif
79 #endif // HUMOTO_COMPILER_SUPPORTS_FUNC_
80 
81 
82 
83 #ifdef DNDEBUG
84 #define HUMOTO_ASSERT(condition, message)
85 #else
86 #define HUMOTO_ASSERT(condition, message) if (!(condition)) {HUMOTO_THROW_MSG(message);};
87 #endif
88 
89 
90 #define HUMOTO_MACRO_SUBSTITUTE(arg) arg
91 
92 
93 /**
94  * @brief The root namespace of HuMoTo.
95  */
96 namespace humoto
97 {
98 }
99 
100 #include "eigentools.h"
101 
102 #include "humoto/logger.h"
103 
104 #include "humoto/constants.h"
105 #include "humoto/utility.h"
106 #include "humoto/leftright.h"
107 
108 #include "humoto/time.h"
based on the example taken from https://gcc.gnu.org/wiki/Visibility
The root namespace of HuMoTo.
Definition: config.h:12