File: rtdefs.h

package info (click to toggle)
robotour 3.1.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,596 kB
  • ctags: 2,972
  • sloc: cpp: 17,705; sh: 3,060; ansic: 2,778; makefile: 144
file content (50 lines) | stat: -rwxr-xr-x 1,279 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * rtdefs.h
 * 
 * Copyright (c) 2000-2004 by Florian Fischer (florianfischer@gmx.de)
 * and Martin Trautmann (martintrautmann@gmx.de) 
 * 
 * This file may be distributed and/or modified under the terms of the 
 * GNU General Public License version 2 as published by the Free Software 
 * Foundation. 
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 * 
 */
/** @file
  * Commonly used defines and macros for LibRT.
  */

#ifndef __LRT_DEFS_H__
#define __LRT_DEFS_H__

#if defined _MSC_VER && !defined __MSVC__
#define __MSVC__
#endif

// for template specializations to T* (which are not really supported by VC++)
#ifdef __MSVC__

#define LRT_DEFINE_PTR(T) \
   template<class T> typedef T* LRT_PTR_##T;
#define LRT_PTR(T) LRT_PTR_##T
#define LRT_NPTR(T) LRT_PTR_##T

#else
#define LRT_DEFINE_PTR(T)
#define LRT_PTR(T) T*
#define LRT_NPTR(T) T

#endif // compiler

// There is no RTTI on EPOC (and it can't be enabled)
// that's a real problem, but I don't know an easy solution
#ifndef __SYMBIAN32__
#define LRT_DYNAMIC_CAST(T) dynamic_cast<T>
#else
#define LRT_DYNAMIC_CAST(T) (T)
#endif


#endif // include guard