qptrutil.hh
Go to the documentation of this file.
1 
9 #pragma once
10 
11 
12 // Define macros to cast QPointers to their raw pointer types using Operator T*
13 // when TRAVISCI is defined, otherwise just use the QPointer.
14 #ifdef TRAVISCI
15 #define QSERIALPORTPTR(P) static_cast<QSerialPort *>(P)
16 #define QTHREADPTR(P) static_cast<QThread *>(P)
17 #define QTIMERPTR(P) static_cast<QTimer *>(P)
18 #define APPTR(P) static_cast<dfti::Autopilot *>(P)
19 #define LOGPTR(P) static_cast<dfti::Logger *>(P)
20 #define RIOPTR(P) static_cast<dfti::RIO *>(P)
21 #define SRVPTR(P) static_cast<dfti::Server *>(P)
22 #define UADCPTR(P) static_cast<dfti::uADC *>(P)
23 #define VN200PTR(P) static_cast<dfti::VN200 *>(P)
24 #else
25 #define QSERIALPORTPTR(P) P
26 #define QTHREADPTR(P) P
27 #define QTIMERPTR(P) P
28 #define APPTR(P) P
29 #define LOGPTR(P) P
30 #define RIOPTR(P) P
31 #define SRVPTR(P) P
32 #define UADCPTR(P) P
33 #define VN200PTR(P) P
34 #endif