| THM1176InstrumentDriver 1.2 C++ API for Metrolab THM1176

Loading...
Searching...
No Matches
Helpers.h File Reference

Collection of utility macros for error messages. More...

`#include <iostream>`
`#include <sstream>`
`#include <cassert>`
`#include <thread>`
`#include <chrono>`
Include dependency graph for Helpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | MTL__STR_HELPER__(x)
#define | MTL__STR__(x)
#define | MTL__LOCATION_HELPER__ __FILE__ ":" MTL__STR__(__LINE__)
#define | MTL__LOCATION__ (MTL__LOCATION_HELPER__)
#define | CERR(__X__)
#define | COUT(__X__)
#define | WCOUT(__X__)
#define | MTL_Assert assert
#define | MTL_StaticAssert static_assert
#define | MTL_SleepMs(_ms_)
#define | MTL_Unused(x)

## Detailed Description

Collection of utility macros for error messages.

Definition in file Helpers.h.

## Macro Definition Documentation

## ◆ CERR

#define CERR | ( |  | __X__ | ) |

Value:
std::cerr << __X__

Definition at line 28 of file Helpers.h.

## ◆ COUT

#define COUT | ( |  | __X__ | ) |

Value:
std::cout << __X__

Definition at line 29 of file Helpers.h.

## ◆ MTL__LOCATION__

#define MTL__LOCATION__ (MTL__LOCATION_HELPER__)

Definition at line 22 of file Helpers.h.

## ◆ MTL__LOCATION_HELPER__

#define MTL__LOCATION_HELPER__ __FILE__ ":" MTL__STR__(__LINE__)

Definition at line 21 of file Helpers.h.

## ◆ MTL__STR__

#define MTL__STR__ | ( |  | x | ) |

Value:
MTL__STR_HELPER__(x)
MTL__STR_HELPER__
#define MTL__STR_HELPER__(x)
Definition Helpers.h:19

Definition at line 20 of file Helpers.h.

## ◆ MTL__STR_HELPER__

#define MTL__STR_HELPER__ | ( |  | x | ) |

Value:
#x

Definition at line 19 of file Helpers.h.

## ◆ MTL_Assert

#define MTL_Assert assert

Definition at line 44 of file Helpers.h.

## ◆ MTL_SleepMs

#define MTL_SleepMs | ( |  | _ms_ | ) |

Value:
std::this_thread::sleep_for(std::chrono::milliseconds(_ms_))

Definition at line 46 of file Helpers.h.

## ◆ MTL_StaticAssert

#define MTL_StaticAssert static_assert

Definition at line 45 of file Helpers.h.

## ◆ MTL_Unused

#define MTL_Unused | ( |  | x | ) |

Value:
(void)x;

Definition at line 47 of file Helpers.h.

## ◆ WCOUT

#define WCOUT | ( |  | __X__ | ) |

Value:
std::wcout << __X__

Definition at line 30 of file Helpers.h.