| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
| <title>oscl_error_allocator.h Source File</title> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"> |
| </head><body> |
| <!-- Generated by Doxygen 1.2.18 --> |
| <center> |
| <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> |
| <hr><h1>oscl_error_allocator.h</h1><a href="oscl__error__allocator_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span> |
| 00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> |
| 00003 |
| 00004 <span class="comment">// O S C L _ E R R O R _ A L L O C A T O R</span> |
| 00005 |
| 00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> |
| 00007 |
| 00019 <span class="preprocessor">#ifndef OSCL_ERROR_ALLOCATOR_H_INCLUDED</span> |
| 00020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_ERROR_ALLOCATOR_H_INCLUDED</span> |
| 00021 <span class="preprocessor"></span> |
| 00022 <span class="comment">// - - Inclusion - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span> |
| 00023 |
| 00024 <span class="preprocessor">#ifndef OSCL_BASE_H_INCLUDED</span> |
| 00025 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base_8h.html">oscl_base.h</a>"</span> |
| 00026 <span class="preprocessor">#endif</span> |
| 00027 <span class="preprocessor"></span> |
| 00028 <span class="preprocessor">#ifndef OSCL_BASE_MACROS_H_INCLUDED</span> |
| 00029 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__base__macros_8h.html">oscl_base_macros.h</a>"</span> |
| 00030 <span class="preprocessor">#endif</span> |
| 00031 <span class="preprocessor"></span> |
| 00032 <span class="preprocessor">#ifndef OSCLCONFIG_ERROR_H_INCLUDED</span> |
| 00033 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="osclconfig__error_8h.html">osclconfig_error.h</a>"</span> |
| 00034 <span class="preprocessor">#endif</span> |
| 00035 <span class="preprocessor"></span> |
| 00036 <span class="preprocessor">#ifndef OSCL_ASSERT_H_INCLUDED</span> |
| 00037 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__assert_8h.html">oscl_assert.h</a>"</span> |
| 00038 <span class="preprocessor">#endif</span> |
| 00039 <span class="preprocessor"></span> |
| 00040 <span class="preprocessor">#ifndef OSCL_DEFALLOC_H_INCLUDED</span> |
| 00041 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__defalloc_8h.html">oscl_defalloc.h</a>"</span> |
| 00042 <span class="preprocessor">#endif</span> |
| 00043 <span class="preprocessor"></span> |
| 00044 |
| 00046 |
| <a name="l00049"></a><a class="code" href="classOsclErrorAllocator.html">00049</a> <span class="keyword">class </span><a class="code" href="classOsclErrorAllocator.html">OsclErrorAllocator</a> |
| 00050 { |
| 00051 <span class="keyword">public</span>: |
| 00053 |
| <a name="l00056"></a><a class="code" href="classOsclErrorAllocator.html#a0">00056</a> <a class="code" href="classOsclErrorAllocator.html#a0">OsclErrorAllocator</a>(<a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* <a class="code" href="classallocator.html">allocator</a>) |
| 00057 { |
| 00058 iAllocator = allocator; |
| 00059 } |
| 00061 |
| <a name="l00064"></a><a class="code" href="classOsclErrorAllocator.html#d0">00064</a> <span class="keyword">static</span> <a class="code" href="group__osclbase.html#a25">OsclAny</a>* <a class="code" href="classOsclErrorAllocator.html#d0">allocate</a>(uint32 aSize) |
| 00065 { |
| 00066 <a class="code" href="group__osclbase.html#a78">OSCL_ASSERT</a>(iAllocator != <a class="code" href="group__osclbase.html#a81">NULL</a>); |
| 00067 <span class="keywordflow">return</span> iAllocator->ALLOCATE(aSize); |
| 00068 } |
| 00069 |
| 00071 |
| <a name="l00074"></a><a class="code" href="classOsclErrorAllocator.html#d1">00074</a> <span class="keyword">static</span> <a class="code" href="group__osclbase.html#a25">OsclAny</a> <a class="code" href="classOsclErrorAllocator.html#d1">deallocate</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aPointer) |
| 00075 { |
| 00076 <a class="code" href="group__osclbase.html#a78">OSCL_ASSERT</a>(iAllocator != <a class="code" href="group__osclbase.html#a81">NULL</a>); |
| 00077 iAllocator-><a class="code" href="classOscl__DefAlloc.html#a2">deallocate</a>(aPointer); |
| 00078 } |
| 00079 |
| <a name="l00081"></a><a class="code" href="classOsclErrorAllocator.html#a1">00081</a> <span class="keywordtype">void</span>* <a class="code" href="classOsclErrorAllocator.html#a1">operator new</a>(uint32 size, <a class="code" href="group__osclbase.html#a25">OsclAny</a>* aPtr) |
| 00082 { |
| 00083 <a class="code" href="group__osclbase.html#a89">OSCL_UNUSED_ARG</a>(size); |
| 00084 <span class="keywordflow">return</span> aPtr; |
| 00085 } |
| 00086 |
| <a name="l00088"></a><a class="code" href="classOsclErrorAllocator.html#a2">00088</a> <span class="keywordtype">void</span> <a class="code" href="classOsclErrorAllocator.html#a2">operator delete</a>(<a class="code" href="group__osclbase.html#a25">OsclAny</a>* aPtr, <a class="code" href="group__osclbase.html#a25">OsclAny</a>* aPtr2) |
| 00089 { |
| 00090 <a class="code" href="group__osclbase.html#a89">OSCL_UNUSED_ARG</a>(aPtr); |
| 00091 <a class="code" href="group__osclbase.html#a89">OSCL_UNUSED_ARG</a>(aPtr2); |
| 00092 } |
| 00093 |
| 00094 <span class="keyword">private</span>: |
| 00095 <span class="keyword">static</span> <a class="code" href="classOscl__DefAlloc.html">Oscl_DefAlloc</a>* iAllocator; |
| 00096 }; |
| 00097 |
| 00098 |
| 00099 |
| 00100 <span class="preprocessor">#endif //OSCL_ERROR_ALLOCATOR_H_INCLUDED</span> |
| 00101 <span class="preprocessor"></span> |
| </pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> |
| <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> |
| </small></address> |
| </body> |
| </html> |