maliput_malidrive
|
#include <string>
#include <maliput/common/assertion_error.h>
#include <maliput/common/logger.h>
#include <maliput/common/maliput_abort.h>
#include <maliput/common/maliput_copyable.h>
#include <maliput/common/maliput_throw.h>
Macros | |
#define | MALIDRIVE_DEMAND(condition) MALIPUT_DEMAND(condition) |
#define | MALIDRIVE_ABORT_MSG(msg) MALIPUT_ABORT_MESSAGE(msg) |
#define | MALIDRIVE_IS_IN_RANGE(value, min_value, max_value) |
#define | MALIDRIVE_THROW_UNLESS(condition) MALIPUT_THROW_UNLESS(condition) |
#define | MALIDRIVE_THROW_MESSAGE(msg) |
#define | MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN(Classname) MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN(Classname) |
#define | MALIDRIVE_DEFAULT_COPY_AND_MOVE_AND_ASSIGN(Classname) MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN(Classname) |
#define | STR_SIMPLE(x) #x |
#define | STR(x) STR_SIMPLE(x) |
#define | MALIDRIVE_VALIDATE(pred, exctype, message) |
#define | MALIDRIVE_TRACE(msg) |
#define MALIDRIVE_ABORT_MSG | ( | msg | ) | MALIPUT_ABORT_MESSAGE(msg) |
#define MALIDRIVE_DEFAULT_COPY_AND_MOVE_AND_ASSIGN | ( | Classname | ) | MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN(Classname) |
Implements default special member functions for copy-construction, copy-assignment, move-construction, and move-assignment. Invoke this macro in the public section of the class declaration, e.g.:
class Foo { public: MALIDRIVE_DEFAULT_COPY_AND_MOVE_AND_ASSIGN(Foo)
// ... };
*/
#define MALIDRIVE_DEMAND | ( | condition | ) | MALIPUT_DEMAND(condition) |
Used to declare a demand. Will quit execution otherwise.
Aborts the program (via ::abort) with a message showing at least the given message (macro argument), function name, file, and line.
#define MALIDRIVE_IS_IN_RANGE | ( | value, | |
min_value, | |||
max_value | |||
) |
Throws if value
is within [min_value
; max_value
]. It forwards the call to MALIDRIVE_VALIDATE() with a customized string stating the error.
#define MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN | ( | Classname | ) | MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN(Classname) |
Deletes the special member functions for copy-construction, copy-assignment, move-construction, and move-assignment. Invoke this macro in the public section of the class declaration, e.g.:
class Foo { public: MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN(Foo)
// ... };
*/
#define MALIDRIVE_THROW_MESSAGE | ( | msg | ) |
Throws with msg
.
#define MALIDRIVE_THROW_UNLESS | ( | condition | ) | MALIPUT_THROW_UNLESS(condition) |
Used to declare a conditional throw.
#define MALIDRIVE_TRACE | ( | msg | ) |
Rely on maliput::log->trace(). Used to trace log msg
and add information of file, line and function.
#define MALIDRIVE_VALIDATE | ( | pred, | |
exctype, | |||
message | |||
) |
Used to validate that an argument passed into a function or method is true; if not, an exception of type exctype is thrown.
#define STR | ( | x | ) | STR_SIMPLE(x) |
Stringify a token
#define STR_SIMPLE | ( | x | ) | #x |
Internal stringify a token