aboutsummaryrefslogtreecommitdiff
path: root/doc/oscl_html/oscl__base__macros_8h_source.html
blob: c1c264951454ab296268c06bebe5a4a9cdbccb50 (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>oscl: oscl_base_macros.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<h1>oscl_base_macros.h</h1><a href="oscl__base__macros_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- c++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
<a name="l00003"></a>00003 
<a name="l00004"></a>00004 <span class="comment">//               O S C L B A S E _ M A C R O S</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
<a name="l00007"></a>00007 
<a name="l00018"></a>00018 <span class="preprocessor">#ifndef OSCL_BASE_MACROS_H_INCLUDED</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_BASE_MACROS_H_INCLUDED</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span>
<a name="l00021"></a>00021 <span class="comment">// Pick up any platform-specific definitions for the common</span>
<a name="l00022"></a>00022 <span class="comment">// macros.</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="osclconfig_8h.html" title="This file contains configuration information for the linux platform.">osclconfig.h</a>&quot;</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="comment">// Define default values for the common macros</span>
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef OSCL_EXPORT_REF</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_EXPORT_REF</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 <span class="preprocessor">#ifndef OSCL_IMPORT_REF</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_IMPORT_REF</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="comment">//static const char NULL_TERM_CHAR = &#39;\0&#39;;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#ifndef NULL_TERM_CHAR</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define NULL_TERM_CHAR &#39;\0&#39;</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>
<a name="l00041"></a>00041 <span class="preprocessor">#ifndef NULL</span>
<a name="l00042"></a><a class="code" href="group__osclbase.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define NULL (0)</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045 <span class="preprocessor">#if (OSCL_DISABLE_INLINES)</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_INLINE</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_COND_EXPORT_REF OSCL_EXPORT_REF</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_COND_IMPORT_REF OSCL_IMPORT_REF</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00050"></a><a class="code" href="group__osclbase.html#gaf9da29085597a032c4dd2f3ef4c1b9e6">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_INLINE inline</span>
<a name="l00051"></a><a class="code" href="group__osclbase.html#gae077275bef28134e570917ff468c8ff1">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_COND_EXPORT_REF</span>
<a name="l00052"></a><a class="code" href="group__osclbase.html#gaead960804cd6ebf1d776c7d58159ce91">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_COND_IMPORT_REF</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00055"></a>00055 <span class="comment">//this macro may not be defined in all configurations</span>
<a name="l00056"></a>00056 <span class="comment">//so a default is defined here.</span>
<a name="l00057"></a>00057 
<a name="l00059"></a>00059 
<a name="l00064"></a><a class="code" href="group__osclbase.html#ga6f367c891edd99381c917e6dafeff544">00064</a> <span class="preprocessor">#define OSCL_CONST_CAST(type,exp)           ((type)(exp))</span>
<a name="l00065"></a><a class="code" href="group__osclbase.html#ga6872259ca6fd7080c6299210e4b13a6f">00065</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_STATIC_CAST(type,exp)          ((type)(exp))</span>
<a name="l00066"></a><a class="code" href="group__osclbase.html#ga02b042a816d2157bbed1792b26604cd8">00066</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_REINTERPRET_CAST(type,exp)     ((type)(exp))</span>
<a name="l00067"></a><a class="code" href="group__osclbase.html#gabbc39f0338f358ef4df50a75373749d0">00067</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_DYNAMIC_CAST(type, exp)        ((type)(exp))</span>
<a name="l00068"></a><a class="code" href="group__osclbase.html#ga4fd9dfc2eae26696c83cfba1fbc73448">00068</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_VIRTUAL_BASE(type)               type</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span>
<a name="l00070"></a>00070 
<a name="l00085"></a><a class="code" href="group__osclbase.html#ga0ac3a7c93a978fa6d04c2a5d810612dd">00085</a> <span class="preprocessor">#define OSCL_UNUSED_ARG(vbl) (void)(vbl)</span>
<a name="l00086"></a><a class="code" href="group__osclbase.html#ga06bf2e405c0ab3a123fa20acc804dd3f">00086</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_UNUSED_RETURN(value) return value</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span>
<a name="l00088"></a>00088 <span class="comment">/* The __TFS__ macro is used to optionally expand to &quot;&lt;&gt;&quot; depending on the</span>
<a name="l00089"></a>00089 <span class="comment"> * compiler.  Some compilers require it to indicate that the friend function</span>
<a name="l00090"></a>00090 <span class="comment"> * is a template function as specified in the standard, but others don&#39;t</span>
<a name="l00091"></a>00091 <span class="comment"> * like it so it will handled with a macro expansion that depends on the</span>
<a name="l00092"></a>00092 <span class="comment"> * compiler.</span>
<a name="l00093"></a>00093 <span class="comment"> */</span>
<a name="l00094"></a>00094 <span class="preprocessor">#ifndef __TFS__</span>
<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor">#define __TFS__</span>
<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00097"></a>00097 <span class="preprocessor"></span>
<a name="l00098"></a><a class="code" href="group__osclbase.html#ga82593faa416c10b2f5c8cb542f61509c">00098</a> <span class="preprocessor">#define OSCL_MIN(a,b) ((a) &lt; (b) ? (a) : (b))</span>
<a name="l00099"></a><a class="code" href="group__osclbase.html#ga30ee9dc0d74e3248228cc6a24c0295bb">00099</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_MAX(a,b) ((a) &gt; (b) ? (a) : (b))</span>
<a name="l00100"></a><a class="code" href="group__osclbase.html#ga5a5b28cd02cdf30b86facadca7c18a54">00100</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_ABS(a) ((a) &gt; (0) ? (a) : -(a))</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span>
<a name="l00102"></a>00102 <span class="comment">// the syntax for explicitly calling the destructor varies on some platforms</span>
<a name="l00103"></a>00103 <span class="comment">// below is the default syntax as defined in the C++ standard</span>
<a name="l00104"></a>00104 <span class="preprocessor">#ifndef OSCL_TEMPLATED_DESTRUCTOR_CALL</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_TEMPLATED_DESTRUCTOR_CALL(type,simple_type) type :: ~simple_type ()</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00107"></a>00107 <span class="preprocessor"></span>
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 <span class="comment">/*</span>
<a name="l00110"></a>00110 <span class="comment"> * The OSCL_UNSIGNED_CONST macro is used to optionally add a suffix to the</span>
<a name="l00111"></a>00111 <span class="comment"> * end of integer constants to identify them as unsigned constants.  It is</span>
<a name="l00112"></a>00112 <span class="comment"> * usually only necessary to do that for very large constants that are too</span>
<a name="l00113"></a>00113 <span class="comment"> * big to fit within the range of a signed integer. Some compilers will issue</span>
<a name="l00114"></a>00114 <span class="comment"> * warnings for that.  The default behavior will be to add no suffix.</span>
<a name="l00115"></a>00115 <span class="comment"> */</span>
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 <span class="preprocessor">#ifndef OSCL_UNSIGNED_CONST</span>
<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_UNSIGNED_CONST(x) x</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span>
<a name="l00121"></a>00121 <span class="comment">/*</span>
<a name="l00122"></a>00122 <span class="comment"> * These macros are used by MTP to avoid byte aligning structures.</span>
<a name="l00123"></a>00123 <span class="comment"> */</span>
<a name="l00124"></a>00124 <span class="preprocessor">#ifndef OSCL_PACKED_VAR</span>
<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_PACKED_VAR     &quot;error&quot;</span>
<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00127"></a>00127 <span class="preprocessor"></span>
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="comment">/* The following macros enumerate the possible values of the build flag PV_COMPILER */</span>
<a name="l00130"></a>00130 
<a name="l00131"></a><a class="code" href="group__osclbase.html#ga1aaad20bf2402f23ad9d1634f57a5a32">00131</a> <span class="preprocessor">#define EPV_ARM_GNUC  1 </span><span class="comment">/* for GNU compiler */</span>
<a name="l00132"></a><a class="code" href="group__osclbase.html#gaf269da83bd3aa18a95dd69ee1850029b">00132</a> <span class="preprocessor">#define EPV_ARM_RVCT  2 </span><span class="comment">/* for RVCT compiler from ARM */</span>
<a name="l00133"></a><a class="code" href="group__osclbase.html#ga3d0754c087c9fee64c81795b3000c8df">00133</a> <span class="preprocessor">#define EPV_ARM_MSEVC 3 </span><span class="comment">/* for MS Embedded VC compiler */</span>
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 <span class="comment">/* PV_COMPILER value must be set to build command.</span>
<a name="l00136"></a>00136 <span class="comment">   In addition, PV_CPU_ARCH_VERSION must be defined to take on an integer value that specifies the version of target</span>
<a name="l00137"></a>00137 <span class="comment">   ARM architecture. */</span>
<a name="l00138"></a>00138 
<a name="l00139"></a>00139 
<a name="l00142"></a>00142 <span class="preprocessor">#endif  // OSCL_BASE_MACROS_H_INCLUDED</span>
</pre></div></div>
<hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: CORE_9.004.1.1 </small>
</small></address>
</body>
</html>