Macros | |
#define | ecl_assert_throw(expression, exception) if ( !(expression) ) { throw exception; } |
Debug mode throw with a logical condition check. More... | |
#define | ecl_assert_throw_decl(exception) throw(exception) |
Assure throw exception declaration. More... | |
#define | ecl_catch(exception) catch(exception) |
The catch part of a try-catch macro matching ecl_throw calls. More... | |
#define | ecl_compile_time_concept_check(Model) enum { ecl_concept_check_name(__LINE__) = ecl::concepts::CONCEPT_CHECK< Model >::instantiate } |
Compile time concept checking assertion. More... | |
#define | ecl_compile_time_concept_test(Model) |
Convenient notational macro for setting up a concept testing function. More... | |
#define | ECL_CXX11_NOT_FOUND |
C++11 support is available. More... | |
#define | ecl_debug_catch(exception) catch(exception) |
The catch part of a try-catch macro matching ecl_debug_throw/ecl_assert_throw calls. More... | |
#define | ecl_debug_throw(exception) throw exception; |
Debug mode exception throw. More... | |
#define | ecl_debug_throw_decl(exception) throw(exception) |
Debug mode throw exception declaration. More... | |
#define | ecl_debug_try try |
The try part of a try-catch macro matching ecl_debug_throw/ecl_assert_throw calls. More... | |
#define | ECL_DEPRECATED |
Deprecated compiler warnings. More... | |
#define | ECL_DONT_INLINE |
Prevents a function from being inlined. More... | |
#define | ECL_HAS_CLOCK_MONOTONIC |
Can utilise monotonic clocks. More... | |
#define | ECL_HAS_CPUTIME |
Can set clocks measuring time spent on the cpu (-lrt). More... | |
#define | ECL_HAS_POSIX_THREADS |
Platform uses posix threads. More... | |
#define | ECL_HAS_RT_TIMERS |
Ecl uses the real time (-lrt) timers. More... | |
#define | ECL_HAS_SHARED_LIBS 1 |
Ecl exceptions are disabled. More... | |
#define | ECL_IS_POSIX |
Platform is posix-based. More... | |
#define | ECL_PRIVATE_HAS_CLOCK_GETTIME |
The platform has clock_gettime() from -lrt. More... | |
#define | ECL_PRIVATE_HAS_CLOCK_NANOSLEEP |
The platform has clock_nanosleep() from -lrt. More... | |
#define | ECL_SIZE_OF_CHAR 1 |
Defines the number of bytes for a char type. More... | |
#define | ECL_SIZE_OF_DOUBLE 8 |
Defines the number of bytes for a double type. More... | |
#define | ECL_SIZE_OF_FLOAT 4 |
Defines the number of bytes for a float type. More... | |
#define | ECL_SIZE_OF_INT 4 |
Defines the number of bytes for a int type. More... | |
#define | ECL_SIZE_OF_LONG 8 |
Defines the number of bytes for a long type. More... | |
#define | ECL_SIZE_OF_LONG_DOUBLE 16 |
Defines the number of bytes for a long double type. More... | |
#define | ECL_SIZE_OF_LONG_LONG 8 |
Defines the number of bytes for a long long type. More... | |
#define | ECL_SIZE_OF_SHORT 2 |
Defines the number of bytes for a short type. More... | |
#define | ecl_throw(exception) throw exception; |
Standard ecl throw exception throw. More... | |
#define | ecl_throw_decl(exception) throw(exception) |
Standard ecl throw exception declaration. More... | |
#define | ecl_try try |
The try part of a try-catch macro matching ecl_throw calls. More... | |
#define | FLUSH(logStream) |
Enables flushing of log streams. More... | |
#define | LOC __FILE__ ":" TOSTRING(__LINE__) " " |
Stringify the line of code you are at. More... | |
#define | LOG(logStream, mode) |
Enables log streaming. More... | |
Macros that characterise the platform's time implementation.
#define ecl_assert_throw | ( | expression, | |
exception | |||
) | if ( !(expression) ) { throw exception; } |
Debug mode throw with a logical condition check.
Does a simple logical check before throwing, only works if NDEBUG is not defined.
Definition at line 129 of file ecl/exceptions/macros.hpp.
#define ecl_assert_throw_decl | ( | exception | ) | throw(exception) |
Assure throw exception declaration.
Use when declaring a function that throws the assert mode exceptions. If NDEBUG is not defined, this simply inserts the required exception statement, otherwise it inserts nothing. This is exactly the same as the ecl_debug_throw_decl, but added here for convenience as its confusing to have to use the ecl_debug_throw_decl when also using ecl_assert_throw.
Definition at line 120 of file ecl/exceptions/macros.hpp.
#define ecl_catch | ( | exception | ) | catch(exception) |
The catch part of a try-catch macro matching ecl_throw calls.
Definition at line 86 of file ecl/exceptions/macros.hpp.
#define ecl_compile_time_concept_check | ( | Model | ) | enum { ecl_concept_check_name(__LINE__) = ecl::concepts::CONCEPT_CHECK< Model >::instantiate } |
Compile time concept checking assertion.
This macro checks a class to verify if it conforms to a compile time metaprogramming concept.
Usage:
The input argument to this macro function is the concept class type with the testing class as its template parameter.
Definition at line 92 of file ecl/concepts/macros.hpp.
#define ecl_compile_time_concept_test | ( | Model | ) |
Convenient notational macro for setting up a concept testing function.
The actual mechanics of concept testing has to be implemented in the concept class' destructor. This macro is purely just a notational convenience that makes it clear when programming the precise meaning of what is intended for your concept class.
Usage:
Definition at line 116 of file ecl/concepts/macros.hpp.
#define ECL_CXX11_NOT_FOUND |
C++11 support is available.
This is a very dodgy way of checking - haven't tested across compilers very well, and it doesn't take into account the partial completeness of the implementations.
It does however, provide a way for headers to use c++11 symbols in a non-destructive way for users (we often define typedefs for shared ptr variations).
Definition at line 61 of file ecl/config/macros.hpp.
#define ecl_debug_catch | ( | exception | ) | catch(exception) |
The catch part of a try-catch macro matching ecl_debug_throw/ecl_assert_throw calls.
Definition at line 161 of file ecl/exceptions/macros.hpp.
#define ecl_debug_throw | ( | exception | ) | throw exception; |
Debug mode exception throw.
Use when throwing a debug mode only (NDEBUG is not defined) exception. This simply inserts the required exception constructor, otherwise it inserts nothing.
Definition at line 149 of file ecl/exceptions/macros.hpp.
#define ecl_debug_throw_decl | ( | exception | ) | throw(exception) |
Debug mode throw exception declaration.
Use when declaring a function that throws the debug mode exceptions. If NDEBUG is not defined, this simply inserts the required exception statement, otherwise it inserts nothing.
Definition at line 139 of file ecl/exceptions/macros.hpp.
#define ecl_debug_try try |
The try part of a try-catch macro matching ecl_debug_throw/ecl_assert_throw calls.
Definition at line 155 of file ecl/exceptions/macros.hpp.
#define ECL_DEPRECATED |
Deprecated compiler warnings.
The following macro emits deprecated compiler warnings by both gnu or msvc compilers.
Definition at line 85 of file ecl/config/macros.hpp.
#define ECL_DONT_INLINE |
Prevents a function from being inlined.
The following macro prevents functions from being inlined by both gnu or msvc compilers.
Definition at line 44 of file ecl/config/macros.hpp.
#define ECL_HAS_CLOCK_MONOTONIC |
Can utilise monotonic clocks.
These come with -lrt and allow use of timers which are guaranteed not to jump.
Definition at line 58 of file time_lite/config.hpp.
#define ECL_HAS_CPUTIME |
Can set clocks measuring time spent on the cpu (-lrt).
Definition at line 64 of file time_lite/config.hpp.
#define ECL_HAS_POSIX_THREADS |
#define ECL_HAS_RT_TIMERS |
Ecl uses the real time (-lrt) timers.
This assumption was made by checking for the presence of clock_gettime, and clock_nanosleep. See also:
Definition at line 99 of file time_lite/config.hpp.
#define ECL_HAS_SHARED_LIBS 1 |
Ecl exceptions are disabled.
By default, ecl builds all its libraries with exceptions enabled. These can be disabled by passing -DECL_DISABLE_EXCEPTIONS:bool=true to cmake, or, if building in ros, setting this variable in $ROS_ROOT/rosconfig.cmake to be true.
Defined if ecl was built as shared libraries.
If both shared and static ecl libs are present on the system, the user should predefine this if they wish to use ecl's shared libraries.
#define ECL_IS_POSIX |
#define ECL_PRIVATE_HAS_CLOCK_GETTIME |
The platform has clock_gettime() from -lrt.
Definition at line 39 of file time_lite/config.hpp.
#define ECL_PRIVATE_HAS_CLOCK_NANOSLEEP |
The platform has clock_nanosleep() from -lrt.
Definition at line 45 of file time_lite/config.hpp.
#define ECL_SIZE_OF_CHAR 1 |
#define ECL_SIZE_OF_DOUBLE 8 |
#define ECL_SIZE_OF_FLOAT 4 |
#define ECL_SIZE_OF_INT 4 |
#define ECL_SIZE_OF_LONG 8 |
#define ECL_SIZE_OF_LONG_DOUBLE 16 |
#define ECL_SIZE_OF_LONG_LONG 8 |
#define ECL_SIZE_OF_SHORT 2 |
#define ecl_throw | ( | exception | ) | throw exception; |
Standard ecl throw exception throw.
Use when throwing a function that throws a normal exception. If ECL_DISABLE_EXCEPTIONS is not defined, this simply inserts the required exception constructor otherwise it inserts nothing.
Definition at line 74 of file ecl/exceptions/macros.hpp.
#define ecl_throw_decl | ( | exception | ) | throw(exception) |
Standard ecl throw exception declaration.
Use when declaring a function that throws a normal exception. If ECL_DISABLE_EXCEPTIONS is not defined, this simply inserts the required exception statement, otherwise it inserts nothing.
Definition at line 64 of file ecl/exceptions/macros.hpp.
#define ecl_try try |
The try part of a try-catch macro matching ecl_throw calls.
Definition at line 80 of file ecl/exceptions/macros.hpp.
#define FLUSH | ( | logStream | ) |
Enables flushing of log streams.
Use this with LOG and LogStream to flush the stream to the shared file.
Definition at line 56 of file log_stream.hpp.
#define LOC __FILE__ ":" TOSTRING(__LINE__) " " |
Stringify the line of code you are at.
This uses a couple of simpler string macros to indicate in which file and at what line this piece of code is at.
Definition at line 67 of file ecl/errors/macros.hpp.
#define LOG | ( | logStream, | |
mode | |||
) |
Enables log streaming.
Simply use this alongside LogStream's << operator - it will provide the usual text stream functionality, but additionally provides the ability to insert header/timestamp information automatically into the beginning of the stream.
Definition at line 43 of file log_stream.hpp.