<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ICU 3.8: uobject.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.1 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="classes.html"><span>Data Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </label></td> <td><input type="text" name="query" value="" size="20" accesskey="s"/></td> </tr> </table> </form> </li> </ul></div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul></div> <h1>uobject.h File Reference</h1>C++ API: Common ICU base class <a class="el" href="classUObject.html">UObject</a>. <a href="#_details">More...</a> <p> <code>#include "<a class="el" href="utypes_8h-source.html">unicode/utypes.h</a>"</code><br> <p> <a href="uobject_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html">UMemory</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classUMemory.html">UMemory</a> is the common ICU base class. <a href="classUMemory.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classUObject.html">UObject</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classUObject.html">UObject</a> is the common ICU "boilerplate" class. <a href="classUObject.html#_details">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="uobject_8h.html#9ebf67ac651933234388f16add656f75">U_OVERRIDE_CXX_ALLOCATION</a> 1</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">U_OVERRIDE_CXX_ALLOCATION - Define this to override operator new and delete in <a class="el" href="classUMemory.html">UMemory</a>. <a href="#9ebf67ac651933234388f16add656f75"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="uobject_8h.html#0f8af19e82b45be1de86ad402c164541">U_HAVE_PLACEMENT_NEW</a> 1</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">U_HAVE_PLACEMENT_NEW - Define this to define the placement new and delete in <a class="el" href="classUMemory.html">UMemory</a> for STL. <a href="#0f8af19e82b45be1de86ad402c164541"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="uobject_8h.html#80b308fe1f841cb450772f58197ef018">U_HAVE_DEBUG_LOCATION_NEW</a> 0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">U_HAVE_DEBUG_LOCATION_NEW - Define this to define the MFC debug version of the operator new. <a href="#80b308fe1f841cb450772f58197ef018"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="uobject_8h.html#0415b3e188980bcb82e31c091265f34b">UOBJECT_DEFINE_RTTI_IMPLEMENTATION</a>(myClass)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This is a simple macro to add ICU RTTI to an ICU object implementation. <a href="#0415b3e188980bcb82e31c091265f34b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="uobject_8h.html#a53bdd883d784e4c951b051faffc29d0">UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION</a>(myClass)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">This macro adds ICU RTTI to an ICU abstract class implementation. <a href="#a53bdd883d784e4c951b051faffc29d0"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> C++ API: Common ICU base class <a class="el" href="classUObject.html">UObject</a>. <p> <p> Definition in file <a class="el" href="uobject_8h-source.html">uobject.h</a>.<hr><h2>Define Documentation</h2> <a class="anchor" name="80b308fe1f841cb450772f58197ef018"></a><!-- doxytag: member="uobject.h::U_HAVE_DEBUG_LOCATION_NEW" ref="80b308fe1f841cb450772f58197ef018" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define U_HAVE_DEBUG_LOCATION_NEW 0 </td> </tr> </table> </div> <div class="memdoc"> <p> U_HAVE_DEBUG_LOCATION_NEW - Define this to define the MFC debug version of the operator new. <p> <dl compact><dt><b><a class="el" href="stable.html#_stable001542">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl> <p> Definition at line <a class="el" href="uobject_8h-source.html#l00059">59</a> of file <a class="el" href="uobject_8h-source.html">uobject.h</a>. </div> </div><p> <a class="anchor" name="0f8af19e82b45be1de86ad402c164541"></a><!-- doxytag: member="uobject.h::U_HAVE_PLACEMENT_NEW" ref="0f8af19e82b45be1de86ad402c164541" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define U_HAVE_PLACEMENT_NEW 1 </td> </tr> </table> </div> <div class="memdoc"> <p> U_HAVE_PLACEMENT_NEW - Define this to define the placement new and delete in <a class="el" href="classUMemory.html">UMemory</a> for STL. <p> <dl compact><dt><b><a class="el" href="stable.html#_stable001541">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl> <p> Definition at line <a class="el" href="uobject_8h-source.html#l00049">49</a> of file <a class="el" href="uobject_8h-source.html">uobject.h</a>. </div> </div><p> <a class="anchor" name="9ebf67ac651933234388f16add656f75"></a><!-- doxytag: member="uobject.h::U_OVERRIDE_CXX_ALLOCATION" ref="9ebf67ac651933234388f16add656f75" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define U_OVERRIDE_CXX_ALLOCATION 1 </td> </tr> </table> </div> <div class="memdoc"> <p> U_OVERRIDE_CXX_ALLOCATION - Define this to override operator new and delete in <a class="el" href="classUMemory.html">UMemory</a>. <p> Enabled by default for ICU.<p> Enabling forces all allocation of ICU object types to use ICU's memory allocation. On Windows, this allows the ICU DLL to be used by applications that statically link the C Runtime library, meaning that the app and ICU will be using different heaps.<p> <dl compact><dt><b><a class="el" href="stable.html#_stable001540">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl> <p> Definition at line <a class="el" href="uobject_8h-source.html#l00040">40</a> of file <a class="el" href="uobject_8h-source.html">uobject.h</a>. </div> </div><p> <a class="anchor" name="a53bdd883d784e4c951b051faffc29d0"></a><!-- doxytag: member="uobject.h::UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION" ref="a53bdd883d784e4c951b051faffc29d0" args="(myClass)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION </td> <td>(</td> <td class="paramtype">myClass </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <b>Value:</b><div class="fragment"><pre class="fragment"><a class="code" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> <a class="code" href="platform_8h.html#72bf6d8ec0640a37b1915e5d853b2016">U_EXPORT2</a> myClass::getStaticClassID() { \ <span class="keyword">static</span> <span class="keywordtype">char</span> classID = 0; \ <span class="keywordflow">return</span> (<a class="code" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a>)&classID; \ } </pre></div>This macro adds ICU RTTI to an ICU abstract class implementation. <p> This macro should be invoked in *.cpp files. The corresponding header should declare getStaticClassID.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>myClass</em> </td><td>The name of the class that needs RTTI defined. </td></tr> </table> </dl> <dl compact><dt><b><a class="el" href="internal.html#_internal000050">Internal:</a></b></dt><dd>Do not use. This API is for interal use only. </dd></dl> <p> Definition at line <a class="el" href="uobject_8h-source.html#l00283">283</a> of file <a class="el" href="uobject_8h-source.html">uobject.h</a>. </div> </div><p> <a class="anchor" name="0415b3e188980bcb82e31c091265f34b"></a><!-- doxytag: member="uobject.h::UOBJECT_DEFINE_RTTI_IMPLEMENTATION" ref="0415b3e188980bcb82e31c091265f34b" args="(myClass)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION </td> <td>(</td> <td class="paramtype">myClass </td> <td class="paramname"> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> <b>Value:</b><div class="fragment"><pre class="fragment"><a class="code" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> <a class="code" href="platform_8h.html#72bf6d8ec0640a37b1915e5d853b2016">U_EXPORT2</a> myClass::getStaticClassID() { \ <span class="keyword">static</span> <span class="keywordtype">char</span> classID = 0; \ <span class="keywordflow">return</span> (<a class="code" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a>)&classID; \ } \ <a class="code" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> myClass::getDynamicClassID() const \ { <span class="keywordflow">return</span> myClass::getStaticClassID(); } </pre></div>This is a simple macro to add ICU RTTI to an ICU object implementation. <p> This does not go into the header. This should only be used in *.cpp files.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>myClass</em> </td><td>The name of the class that needs RTTI defined. </td></tr> </table> </dl> <dl compact><dt><b><a class="el" href="internal.html#_internal000049">Internal:</a></b></dt><dd>Do not use. This API is for interal use only. </dd></dl> <p> Definition at line <a class="el" href="uobject_8h-source.html#l00266">266</a> of file <a class="el" href="uobject_8h-source.html">uobject.h</a>. </div> </div><p> <hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:29 2007 for ICU 3.8 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> </body> </html>