File utils.hpp¶
FileList > robot_dart > utils.hpp
Go to the source code of this file
#include <exception>
#include <iostream>
#include <robot_dart/utils_headers_external.hpp>
Namespaces¶
Type | Name |
---|---|
namespace | robot_dart |
Classes¶
Type | Name |
---|---|
class | Assertion |
Macros¶
Type | Name |
---|---|
define | M_PIf static_cast<float>(M_PI) |
define | ROBOT_DART_ASSERT (condition, message, returnValue) |
define | ROBOT_DART_EXCEPTION_ASSERT (condition, message) |
define | ROBOT_DART_EXCEPTION_INTERNAL_ASSERT (condition) |
define | ROBOT_DART_INTERNAL_ASSERT (condition) |
define | ROBOT_DART_SHOW_WARNINGS true |
define | ROBOT_DART_UNUSED_VARIABLE (var) (void)(var) |
define | ROBOT_DART_WARNING (condition, message) |
Macro Definition Documentation¶
define M_PIf¶
define ROBOT_DART_ASSERT¶
#define ROBOT_DART_ASSERT (
condition,
message,
returnValue
) do { \
if (!(condition)) { \
std::cerr << __LINE__ << " " << __FILE__ << " -> robot_dart assertion failed: " << message << std::endl; \
return returnValue; \
} \
} while (false)
define ROBOT_DART_EXCEPTION_ASSERT¶
#define ROBOT_DART_EXCEPTION_ASSERT (
condition,
message
) do { \
if (!(condition)) { \
throw robot_dart::Assertion (message); \
} \
} while (false)
define ROBOT_DART_EXCEPTION_INTERNAL_ASSERT¶
#define ROBOT_DART_EXCEPTION_INTERNAL_ASSERT (
condition
) do { \
if (!(condition)) { \
throw robot_dart::Assertion (#condition); \
} \
} while (false)
define ROBOT_DART_INTERNAL_ASSERT¶
#define ROBOT_DART_INTERNAL_ASSERT (
condition
) do { \
if (!(condition)) { \
std::cerr << "Assertion '" << #condition << "' failed in '" << __FILE__ << "' on line " << __LINE__ << std::endl; \
std::abort(); \
} \
} while (false)
define ROBOT_DART_SHOW_WARNINGS¶
define ROBOT_DART_UNUSED_VARIABLE¶
define ROBOT_DART_WARNING¶
#define ROBOT_DART_WARNING (
condition,
message
) if (ROBOT_DART_SHOW_WARNINGS && (condition)) { \
std::cerr << "[robot_dart WARNING]: \"" << message << "\"" << std::endl; \
}
The documentation for this class was generated from the following file robot_dart/utils.hpp