Classes | Namespaces | Macros
include/pinocchio/macros.hpp File Reference
#include <sstream>
#include <exception>
#include <stdexcept>
Include dependency graph for include/pinocchio/macros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pinocchio::helper::argument_type< T >
 
struct  pinocchio::helper::argument_type< T(U)>
 
struct  pinocchio::helper::handle_return_type_without_typename< D, TypeAccess >
 

Namespaces

 pinocchio
 Main pinocchio namespace.
 
 pinocchio::helper
 

Macros

#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_1
 
#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_2(size, expected_size)
 
#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_3(size, expected_size, message)
 
#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_0
 
#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_1(condition)
 
#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_2(condition, message)   PINOCCHIO_THROW(condition, std::invalid_argument, message)
 
#define _PINOCCHIO_EXPAND(x)   x
 
#define _PINOCCHIO_GET_OVERRIDE_FOR_CHECK_ARGUMENT_SIZE(_1, _2, _3, MACRO_NAME, ...)   MACRO_NAME
 
#define _PINOCCHIO_GET_OVERRIDE_FOR_CHECK_INPUT_ARGUMENT(_1, _2, MACRO_NAME, ...)   MACRO_NAME
 
#define PINOCCHIO_ASSERT_MATRIX_SPECIFIC_SIZE(type, M, nrows, ncols)
 Ensure that a matrix (or vector) is of correct size (compile-time and run-time assertion) More...
 
#define PINOCCHIO_CHECK_ARGUMENT_SIZE(...)
 Macro to check if the size of an element is equal to the expected size. More...
 
#define PINOCCHIO_CHECK_INPUT_ARGUMENT(...)
 Macro to check an assert-like condition and throw a std::invalid_argument exception (with a message) if violated. More...
 
#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS
 
#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED
 
#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_SELF_ASSIGN_OVERLOADED
 
#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_VARIADIC_MACROS
 
#define PINOCCHIO_COMPILER_DIAGNOSTIC_POP
 
#define PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH
 macros for pragma push/pop/ignore deprecated warnings More...
 
#define PINOCCHIO_MACRO_EMPTY_ARG
 Empty macro argument. More...
 
#define PINOCCHIO_NOT_A_MACRO
 
#define PINOCCHIO_PRAGMA(x)
 
#define PINOCCHIO_PRAGMA_DEPRECATED(the_message)
 
#define PINOCCHIO_PRAGMA_DEPRECATED_HEADER(old_header, new_header)
 
#define PINOCCHIO_PRAGMA_MESSAGE(the_message)
 
#define PINOCCHIO_PRAGMA_WARNING(the_message)
 
#define PINOCCHIO_PRETTY_FUNCTION   __PRETTY_FUNCTION__
 
#define PINOCCHIO_STATIC_ASSERT(condition, msg)
 
#define PINOCCHIO_STRING_LITERAL(string)   #string
 
#define PINOCCHIO_THROW(condition, exception_type, message)
 Generic macro to throw an exception in Pinocchio if the condition is not met with a given input message. More...
 
#define PINOCCHIO_THROW_PRETTY(exception, message)
 
#define PINOCCHIO_UNUSED_VARIABLE(var)   (void)(var)
 Helper to declare that a parameter is unused. More...
 

Macro Definition Documentation

◆ _PINOCCHIO_CHECK_ARGUMENT_SIZE_1

#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_1

Definition at line 213 of file include/pinocchio/macros.hpp.

◆ _PINOCCHIO_CHECK_ARGUMENT_SIZE_2

#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_2 (   size,
  expected_size 
)
Value:
size, expected_size, \
PINOCCHIO_STRING_LITERAL(size) " is different from " PINOCCHIO_STRING_LITERAL(expected_size))

Definition at line 208 of file include/pinocchio/macros.hpp.

◆ _PINOCCHIO_CHECK_ARGUMENT_SIZE_3

#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_3 (   size,
  expected_size,
  message 
)
Value:
if (size != expected_size) \
{ \
std::ostringstream oss; \
oss << "wrong argument size: expected " << expected_size << ", got " << size << std::endl; \
oss << "hint: " << message << std::endl; \
PINOCCHIO_THROW(false, std::invalid_argument, oss.str()); \
}

Definition at line 199 of file include/pinocchio/macros.hpp.

◆ _PINOCCHIO_CHECK_INPUT_ARGUMENT_0

#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_0

Definition at line 188 of file include/pinocchio/macros.hpp.

◆ _PINOCCHIO_CHECK_INPUT_ARGUMENT_1

#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_1 (   condition)
Value:
condition, "The following check on the input argument has failed: " #condition)

Definition at line 184 of file include/pinocchio/macros.hpp.

◆ _PINOCCHIO_CHECK_INPUT_ARGUMENT_2

#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_2 (   condition,
  message 
)    PINOCCHIO_THROW(condition, std::invalid_argument, message)

Definition at line 181 of file include/pinocchio/macros.hpp.

◆ _PINOCCHIO_EXPAND

#define _PINOCCHIO_EXPAND (   x)    x

Definition at line 178 of file include/pinocchio/macros.hpp.

◆ _PINOCCHIO_GET_OVERRIDE_FOR_CHECK_ARGUMENT_SIZE

#define _PINOCCHIO_GET_OVERRIDE_FOR_CHECK_ARGUMENT_SIZE (   _1,
  _2,
  _3,
  MACRO_NAME,
  ... 
)    MACRO_NAME

Definition at line 197 of file include/pinocchio/macros.hpp.

◆ _PINOCCHIO_GET_OVERRIDE_FOR_CHECK_INPUT_ARGUMENT

#define _PINOCCHIO_GET_OVERRIDE_FOR_CHECK_INPUT_ARGUMENT (   _1,
  _2,
  MACRO_NAME,
  ... 
)    MACRO_NAME

Definition at line 179 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_ASSERT_MATRIX_SPECIFIC_SIZE

#define PINOCCHIO_ASSERT_MATRIX_SPECIFIC_SIZE (   type,
  M,
  nrows,
  ncols 
)
Value:
EIGEN_STATIC_ASSERT( \
(type::RowsAtCompileTime == Eigen::Dynamic || type::RowsAtCompileTime == nrows) \
&& (type::ColsAtCompileTime == Eigen::Dynamic || type::ColsAtCompileTime == ncols), \
THIS_METHOD_IS_ONLY_FOR_MATRICES_OF_A_SPECIFIC_SIZE); \
assert(M.rows() == nrows && M.cols() == ncols);

Ensure that a matrix (or vector) is of correct size (compile-time and run-time assertion)

Definition at line 75 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_CHECK_ARGUMENT_SIZE

#define PINOCCHIO_CHECK_ARGUMENT_SIZE (   ...)
Value:

Macro to check if the size of an element is equal to the expected size.

Definition at line 216 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_CHECK_INPUT_ARGUMENT

#define PINOCCHIO_CHECK_INPUT_ARGUMENT (   ...)
Value:

Macro to check an assert-like condition and throw a std::invalid_argument exception (with a message) if violated.

Definition at line 192 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS

#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_DEPRECECATED_DECLARATIONS

Definition at line 131 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED

#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_MAYBE_UNINITIALIZED

Definition at line 134 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_SELF_ASSIGN_OVERLOADED

#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_SELF_ASSIGN_OVERLOADED

Definition at line 133 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_VARIADIC_MACROS

#define PINOCCHIO_COMPILER_DIAGNOSTIC_IGNORED_VARIADIC_MACROS

Definition at line 132 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_COMPILER_DIAGNOSTIC_POP

#define PINOCCHIO_COMPILER_DIAGNOSTIC_POP

Definition at line 130 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH

#define PINOCCHIO_COMPILER_DIAGNOSTIC_PUSH

macros for pragma push/pop/ignore deprecated warnings

Definition at line 129 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_MACRO_EMPTY_ARG

#define PINOCCHIO_MACRO_EMPTY_ARG

Empty macro argument.

Definition at line 69 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_NOT_A_MACRO

#define PINOCCHIO_NOT_A_MACRO

Definition at line 52 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_PRAGMA

#define PINOCCHIO_PRAGMA (   x)

Definition at line 44 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_PRAGMA_DEPRECATED

#define PINOCCHIO_PRAGMA_DEPRECATED (   the_message)

Definition at line 47 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_PRAGMA_DEPRECATED_HEADER

#define PINOCCHIO_PRAGMA_DEPRECATED_HEADER (   old_header,
  new_header 
)

Definition at line 48 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_PRAGMA_MESSAGE

#define PINOCCHIO_PRAGMA_MESSAGE (   the_message)

Definition at line 45 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_PRAGMA_WARNING

#define PINOCCHIO_PRAGMA_WARNING (   the_message)

Definition at line 46 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_PRETTY_FUNCTION

#define PINOCCHIO_PRETTY_FUNCTION   __PRETTY_FUNCTION__

Definition at line 152 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_STATIC_ASSERT

#define PINOCCHIO_STATIC_ASSERT (   condition,
  msg 
)
Value:
{ \
int msg[(condition) ? 1 : -1]; /*avoid unused-variable warning*/ \
(void)msg; \
}

Static assertion.

Parameters
conditiona boolean convertible expression
msga valid C++ variable name.

Definition at line 85 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_STRING_LITERAL

#define PINOCCHIO_STRING_LITERAL (   string)    #string

Definition at line 30 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_THROW

#define PINOCCHIO_THROW (   condition,
  exception_type,
  message 
)
Value:
if (!(condition)) \
{ \
throw exception_type(message); \
}

Generic macro to throw an exception in Pinocchio if the condition is not met with a given input message.

Definition at line 158 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_THROW_PRETTY

#define PINOCCHIO_THROW_PRETTY (   exception,
  message 
)
Value:
{ \
std::stringstream ss; \
ss << "From file: " << __FILE__ << "\n"; \
ss << "in function: " << PINOCCHIO_PRETTY_FUNCTION << "\n"; \
ss << "at line: " << __LINE__ << "\n"; \
ss << "message: " << message << "\n"; \
throw exception(ss.str()); \
}

Definition at line 164 of file include/pinocchio/macros.hpp.

◆ PINOCCHIO_UNUSED_VARIABLE

#define PINOCCHIO_UNUSED_VARIABLE (   var)    (void)(var)

Helper to declare that a parameter is unused.

Definition at line 72 of file include/pinocchio/macros.hpp.

_PINOCCHIO_EXPAND
#define _PINOCCHIO_EXPAND(x)
Definition: include/pinocchio/macros.hpp:178
_PINOCCHIO_CHECK_INPUT_ARGUMENT_0
#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_0
Definition: include/pinocchio/macros.hpp:188
_PINOCCHIO_CHECK_ARGUMENT_SIZE_1
#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_1
Definition: include/pinocchio/macros.hpp:213
_PINOCCHIO_CHECK_INPUT_ARGUMENT_2
#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_2(condition, message)
Definition: include/pinocchio/macros.hpp:181
_PINOCCHIO_GET_OVERRIDE_FOR_CHECK_ARGUMENT_SIZE
#define _PINOCCHIO_GET_OVERRIDE_FOR_CHECK_ARGUMENT_SIZE(_1, _2, _3, MACRO_NAME,...)
Definition: include/pinocchio/macros.hpp:197
PINOCCHIO_STRING_LITERAL
#define PINOCCHIO_STRING_LITERAL(string)
Definition: include/pinocchio/macros.hpp:30
_PINOCCHIO_GET_OVERRIDE_FOR_CHECK_INPUT_ARGUMENT
#define _PINOCCHIO_GET_OVERRIDE_FOR_CHECK_INPUT_ARGUMENT(_1, _2, MACRO_NAME,...)
Definition: include/pinocchio/macros.hpp:179
pinocchio::Dynamic
const int Dynamic
Definition: fwd.hpp:140
PINOCCHIO_PRETTY_FUNCTION
#define PINOCCHIO_PRETTY_FUNCTION
Definition: include/pinocchio/macros.hpp:152
size
FCL_REAL size() const
_PINOCCHIO_CHECK_INPUT_ARGUMENT_1
#define _PINOCCHIO_CHECK_INPUT_ARGUMENT_1(condition)
Definition: include/pinocchio/macros.hpp:184
M
M
_PINOCCHIO_CHECK_ARGUMENT_SIZE_3
#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_3(size, expected_size, message)
Definition: include/pinocchio/macros.hpp:199
_PINOCCHIO_CHECK_ARGUMENT_SIZE_2
#define _PINOCCHIO_CHECK_ARGUMENT_SIZE_2(size, expected_size)
Definition: include/pinocchio/macros.hpp:208


pinocchio
Author(s):
autogenerated on Mon Dec 16 2024 03:41:06