Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > 58828b263d8f56d90ac336dea07a4586 > files > 332

irrlicht-doc-1.6.1-1mdv2010.1.x86_64.rpm

<!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>Irrlicht Engine: irr::IReferenceCounted Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table class="irrlicht" >
  <tr valign="middle"> 
    <td><font size="2"><a class="qindex" href="index.html"><font color="#FFFFFF">Home</font></a> 
      | <a class="qindex" href="namespaces.html"><font color="#FFFFFF">Namespaces</font></a> 
      | <a class="qindex" href="hierarchy.html"><font color="#FFFFFF">Hierarchy</font></a> 
      | <a class="qindex" href="classes.html"><font color="#FFFFFF">Alphabetical 
      List</font></a> | <a class="qindex" href="annotated.html"><font color="#FFFFFF"> 
      Class list</font></a> | <a class="qindex" href="files.html"><font color="#FFFFFF">Files</font></a> 
      | <a class="qindex" href="namespacemembers.html"><font color="#FFFFFF"> 
      Namespace&nbsp;Members</font></a> | <a class="qindex" href="functions.html"><font color="#FFFFFF">Class 
      members</font></a> | <a class="qindex" href="globals.html"><font color="#FFFFFF">File 
      members</font></a> | <a class="qindex" href="pages.html"><font color="#FFFFFF">Tutorials</font></a></font> </td>
  </tr>
</table>
<!-- Generated by Doxygen 1.5.6 -->
  <div class="navpath"><a class="el" href="namespaceirr.html">irr</a>::<a class="el" href="classirr_1_1_i_reference_counted.html">IReferenceCounted</a>
  </div>
<div class="contents">
<h1>irr::IReferenceCounted Class Reference</h1><!-- doxytag: class="irr::IReferenceCounted" -->Base class of most objects of the Irrlicht Engine.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for irr::IReferenceCounted:</div>
<div class="dynsection">

<p><center><img src="classirr_1_1_i_reference_counted.png" usemap="#irr::IReferenceCounted_map" border="0" alt=""></center>
<map name="irr::IReferenceCounted_map">
<area href="classirr_1_1gui_1_1_i_cursor_control.html" alt="irr::gui::ICursorControl" shape="rect" coords="244,56,478,80">
<area href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html" alt="irr::gui::IGUIElementFactory" shape="rect" coords="244,112,478,136">
<area href="classirr_1_1gui_1_1_i_g_u_i_environment.html" alt="irr::gui::IGUIEnvironment" shape="rect" coords="244,168,478,192">
<area href="classirr_1_1gui_1_1_i_g_u_i_font.html" alt="irr::gui::IGUIFont" shape="rect" coords="244,224,478,248">
<area href="classirr_1_1gui_1_1_i_g_u_i_image_list.html" alt="irr::gui::IGUIImageList" shape="rect" coords="244,280,478,304">
<area href="classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html" alt="irr::gui::IGUISpriteBank" shape="rect" coords="244,336,478,360">
<area href="classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html" alt="irr::gui::IGUITreeViewNode" shape="rect" coords="244,392,478,416">
<area href="classirr_1_1_i_logger.html" alt="irr::ILogger" shape="rect" coords="244,448,478,472">
<area href="classirr_1_1io_1_1_i_archive_loader.html" alt="irr::io::IArchiveLoader" shape="rect" coords="244,504,478,528">
<area href="classirr_1_1io_1_1_i_attribute_exchanging_object.html" alt="irr::io::IAttributeExchangingObject" shape="rect" coords="244,560,478,584">
<area href="classirr_1_1io_1_1_i_attributes.html" alt="irr::io::IAttributes" shape="rect" coords="244,616,478,640">
<area href="classirr_1_1io_1_1_i_file_archive.html" alt="irr::io::IFileArchive" shape="rect" coords="244,672,478,696">
<area href="classirr_1_1io_1_1_i_file_list.html" alt="irr::io::IFileList" shape="rect" coords="244,728,478,752">
<area href="classirr_1_1io_1_1_i_file_system.html" alt="irr::io::IFileSystem" shape="rect" coords="244,784,478,808">
<area href="classirr_1_1io_1_1_i_read_file.html" alt="irr::io::IReadFile" shape="rect" coords="244,840,478,864">
<area href="classirr_1_1io_1_1_i_write_file.html" alt="irr::io::IWriteFile" shape="rect" coords="244,896,478,920">
<area href="classirr_1_1io_1_1_i_x_m_l_writer.html" alt="irr::io::IXMLWriter" shape="rect" coords="244,952,478,976">
<area href="classirr_1_1_i_o_s_operator.html" alt="irr::IOSOperator" shape="rect" coords="244,1008,478,1032">
<area href="classirr_1_1_irrlicht_device.html" alt="irr::IrrlichtDevice" shape="rect" coords="244,1064,478,1088">
<area href="classirr_1_1_i_timer.html" alt="irr::ITimer" shape="rect" coords="244,1120,478,1144">
<area href="classirr_1_1scene_1_1_i_animation_end_call_back.html" alt="irr::scene::IAnimationEndCallBack" shape="rect" coords="244,1176,478,1200">
<area href="classirr_1_1scene_1_1_i_collision_callback.html" alt="irr::scene::ICollisionCallback" shape="rect" coords="244,1232,478,1256">
<area href="classirr_1_1scene_1_1_i_geometry_creator.html" alt="irr::scene::IGeometryCreator" shape="rect" coords="244,1288,478,1312">
<area href="classirr_1_1scene_1_1_i_index_buffer.html" alt="irr::scene::IIndexBuffer" shape="rect" coords="244,1344,478,1368">
<area href="classirr_1_1scene_1_1_i_light_manager.html" alt="irr::scene::ILightManager" shape="rect" coords="244,1400,478,1424">
<area href="classirr_1_1scene_1_1_i_mesh.html" alt="irr::scene::IMesh" shape="rect" coords="244,1456,478,1480">
<area href="classirr_1_1scene_1_1_i_mesh_buffer.html" alt="irr::scene::IMeshBuffer" shape="rect" coords="244,1512,478,1536">
<area href="classirr_1_1scene_1_1_i_mesh_cache.html" alt="irr::scene::IMeshCache" shape="rect" coords="244,1568,478,1592">
<area href="classirr_1_1scene_1_1_i_mesh_loader.html" alt="irr::scene::IMeshLoader" shape="rect" coords="244,1624,478,1648">
<area href="classirr_1_1scene_1_1_i_mesh_manipulator.html" alt="irr::scene::IMeshManipulator" shape="rect" coords="244,1680,478,1704">
<area href="classirr_1_1scene_1_1_i_mesh_writer.html" alt="irr::scene::IMeshWriter" shape="rect" coords="244,1736,478,1760">
<area href="classirr_1_1scene_1_1_i_scene_collision_manager.html" alt="irr::scene::ISceneCollisionManager" shape="rect" coords="244,1792,478,1816">
<area href="classirr_1_1scene_1_1_i_scene_manager.html" alt="irr::scene::ISceneManager" shape="rect" coords="244,1848,478,1872">
<area href="classirr_1_1scene_1_1_i_scene_node_animator_factory.html" alt="irr::scene::ISceneNodeAnimatorFactory" shape="rect" coords="244,1904,478,1928">
<area href="classirr_1_1scene_1_1_i_scene_node_factory.html" alt="irr::scene::ISceneNodeFactory" shape="rect" coords="244,1960,478,1984">
<area href="classirr_1_1scene_1_1_i_triangle_selector.html" alt="irr::scene::ITriangleSelector" shape="rect" coords="244,2016,478,2040">
<area href="classirr_1_1scene_1_1_i_vertex_buffer.html" alt="irr::scene::IVertexBuffer" shape="rect" coords="244,2072,478,2096">
<area href="classirr_1_1scene_1_1quake3_1_1_i_shader_manager.html" alt="irr::scene::quake3::IShaderManager" shape="rect" coords="244,2128,478,2152">
<area href="structirr_1_1scene_1_1quake3_1_1_s_var_group_list.html" alt="irr::scene::quake3::SVarGroupList" shape="rect" coords="244,2184,478,2208">
<area href="structirr_1_1scene_1_1_s_m_d3_mesh.html" alt="irr::scene::SMD3Mesh" shape="rect" coords="244,2240,478,2264">
<area href="structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html" alt="irr::scene::SMD3MeshBuffer" shape="rect" coords="244,2296,478,2320">
<area href="classirr_1_1video_1_1_i_image.html" alt="irr::video::IImage" shape="rect" coords="244,2352,478,2376">
<area href="classirr_1_1video_1_1_i_image_loader.html" alt="irr::video::IImageLoader" shape="rect" coords="244,2408,478,2432">
<area href="classirr_1_1video_1_1_i_image_writer.html" alt="irr::video::IImageWriter" shape="rect" coords="244,2464,478,2488">
<area href="classirr_1_1video_1_1_i_material_renderer.html" alt="irr::video::IMaterialRenderer" shape="rect" coords="244,2520,478,2544">
<area href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html" alt="irr::video::IShaderConstantSetCallBack" shape="rect" coords="244,2576,478,2600">
<area href="classirr_1_1video_1_1_i_texture.html" alt="irr::video::ITexture" shape="rect" coords="244,2632,478,2656">
<area href="classirr_1_1video_1_1_i_video_driver.html" alt="irr::video::IVideoDriver" shape="rect" coords="244,2688,478,2712">
<area href="classirr_1_1video_1_1_i_video_mode_list.html" alt="irr::video::IVideoModeList" shape="rect" coords="244,2744,478,2768">
</map>
</div>

<p>
<a href="classirr_1_1_i_reference_counted-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a">drop</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Drops the object. Decrements the reference counter by one.  <a href="#fb169a857e0d2cdb96b8821cb9bff17a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_reference_counted.html#768e697e55d496e396b3acc5003d2bea">getDebugName</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the debug name of the object.  <a href="#768e697e55d496e396b3acc5003d2bea"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_reference_counted.html#198560456588db46331f06eda909a399">getReferenceCount</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the reference count.  <a href="#198560456588db46331f06eda909a399"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4">grab</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Grabs the object. Increments the reference counter by one.  <a href="#2b7a035532e5f409ca9482dab79185f4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_reference_counted.html#8411682018e68a2752d4c82675c71040">IReferenceCounted</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#8411682018e68a2752d4c82675c71040"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_reference_counted.html#78abc75801cbb13d9db0955b3c07251c">~IReferenceCounted</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#78abc75801cbb13d9db0955b3c07251c"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classirr_1_1_i_reference_counted.html#704c5042d399fe8cd3bdd65a0559002a">setDebugName</a> (const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a> *newName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the debug name of the object.  <a href="#704c5042d399fe8cd3bdd65a0559002a"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Base class of most objects of the Irrlicht Engine. 
<p>
This class provides reference counting through the methods <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> and <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. It also is able to store a debug string for every instance of an object. Most objects of the Irrlicht Engine are derived from <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a>, and so they are reference counted.<p>
When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. This will destroy the object, if <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> was not called in another part of you program, because this part still needs the object. Note, that you only need to call <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> to the object, if you created it, and the method had a 'create' in it.<p>
A simple example:<p>
If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver-&gt;createTexture(dimension2d&lt;u32&gt;(128, 128)); If you no longer need the texture, call texture-&gt;<a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>.<p>
If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver-&gt;loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver. 
<p>Definition at line <a class="el" href="_i_reference_counted_8h-source.html#l00041">41</a> of file <a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="8411682018e68a2752d4c82675c71040"></a><!-- doxytag: member="irr::IReferenceCounted::IReferenceCounted" ref="8411682018e68a2752d4c82675c71040" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">irr::IReferenceCounted::IReferenceCounted           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>

<p>Definition at line <a class="el" href="_i_reference_counted_8h-source.html#l00046">46</a> of file <a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="78abc75801cbb13d9db0955b3c07251c"></a><!-- doxytag: member="irr::IReferenceCounted::~IReferenceCounted" ref="78abc75801cbb13d9db0955b3c07251c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual irr::IReferenceCounted::~IReferenceCounted           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>

<p>Definition at line <a class="el" href="_i_reference_counted_8h-source.html#l00052">52</a> of file <a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="fb169a857e0d2cdb96b8821cb9bff17a"></a><!-- doxytag: member="irr::IReferenceCounted::drop" ref="fb169a857e0d2cdb96b8821cb9bff17a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool irr::IReferenceCounted::drop           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Drops the object. Decrements the reference counter by one. 
<p>
The <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a> class provides a basic reference counting mechanism with its methods <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> and <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. Most objects of the Irrlicht Engine are derived from <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a>, and so they are reference counted.<p>
When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. This will destroy the object, if <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> was not called in another part of you program, because this part still needs the object. Note, that you only need to call <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> to the object, if you created it, and the method had a 'create' in it.<p>
A simple example:<p>
If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver-&gt;createTexture(dimension2d&lt;u32&gt;(128, 128)); If you no longer need the texture, call texture-&gt;<a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver-&gt;loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver. <dl class="return" compact><dt><b>Returns:</b></dt><dd>True, if the object was deleted. </dd></dl>

<p>Definition at line <a class="el" href="_i_reference_counted_8h-source.html#l00116">116</a> of file <a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>.</p>

<p>References <a class="el" href="irr_types_8h-source.html#l00153">_IRR_DEBUG_BREAK_IF</a>.</p>

<p>Referenced by <a class="el" href="_i_scene_node_8h-source.html#l00739">irr::scene::ISceneNode::cloneMembers()</a>, <a class="el" href="_i_q3_shader_8h-source.html#l00769">irr::scene::quake3::getTextures()</a>, <a class="el" href="_c_dynamic_mesh_buffer_8h-source.html#l00057">irr::scene::CDynamicMeshBuffer::setIndexBuffer()</a>, <a class="el" href="_i_scene_node_8h-source.html#l00582">irr::scene::ISceneNode::setParent()</a>, <a class="el" href="_i_scene_node_8h-source.html#l00621">irr::scene::ISceneNode::setTriangleSelector()</a>, <a class="el" href="_c_dynamic_mesh_buffer_8h-source.html#l00047">irr::scene::CDynamicMeshBuffer::setVertexBuffer()</a>, <a class="el" href="_c_dynamic_mesh_buffer_8h-source.html#l00029">irr::scene::CDynamicMeshBuffer::~CDynamicMeshBuffer()</a>, <a class="el" href="_i_scene_node_8h-source.html#l00057">irr::scene::ISceneNode::~ISceneNode()</a>, <a class="el" href="_s_animated_mesh_8h-source.html#l00033">irr::scene::SAnimatedMesh::~SAnimatedMesh()</a>, <a class="el" href="_i_animated_mesh_m_d3_8h-source.html#l00288">irr::scene::SMD3Mesh::~SMD3Mesh()</a>, and <a class="el" href="_s_mesh_8h-source.html#l00029">irr::scene::SMesh::~SMesh()</a>.</p>

</div>
</div><p>
<a class="anchor" name="768e697e55d496e396b3acc5003d2bea"></a><!-- doxytag: member="irr::IReferenceCounted::getDebugName" ref="768e697e55d496e396b3acc5003d2bea" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a>* irr::IReferenceCounted::getDebugName           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the debug name of the object. 
<p>
The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode. <dl class="return" compact><dt><b>Returns:</b></dt><dd>Returns a string, previously set by <a class="el" href="classirr_1_1_i_reference_counted.html#704c5042d399fe8cd3bdd65a0559002a" title="Sets the debug name of the object.">setDebugName()</a>; </dd></dl>

<p>Definition at line <a class="el" href="_i_reference_counted_8h-source.html#l00142">142</a> of file <a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="198560456588db46331f06eda909a399"></a><!-- doxytag: member="irr::IReferenceCounted::getReferenceCount" ref="198560456588db46331f06eda909a399" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#c66849b7a6ed16e30ebede579f9b47c6">s32</a> irr::IReferenceCounted::getReferenceCount           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the reference count. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Current value of the reference counter. </dd></dl>

<p>Definition at line <a class="el" href="_i_reference_counted_8h-source.html#l00133">133</a> of file <a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="2b7a035532e5f409ca9482dab79185f4"></a><!-- doxytag: member="irr::IReferenceCounted::grab" ref="2b7a035532e5f409ca9482dab79185f4" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::IReferenceCounted::grab           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Grabs the object. Increments the reference counter by one. 
<p>
Someone who calls <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> to an object, should later also call <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> to it. If an object never gets as much <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> as <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> calls, it will never be destroyed. The <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a> class provides a basic reference counting mechanism with its methods <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> and <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. Most objects of the Irrlicht Engine are derived from <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a>, and so they are reference counted.<p>
When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. This will destroy the object, if <a class="el" href="classirr_1_1_i_reference_counted.html#2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> was not called in another part of you program, because this part still needs the object. Note, that you only need to call <a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> to the object, if you created it, and the method had a 'create' in it.<p>
A simple example:<p>
If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver-&gt;createTexture(dimension2d&lt;u32&gt;(128, 128)); If you no longer need the texture, call texture-&gt;<a class="el" href="classirr_1_1_i_reference_counted.html#fb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver-&gt;loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver. 
<p>Definition at line <a class="el" href="_i_reference_counted_8h-source.html#l00086">86</a> of file <a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>.</p>

<p>Referenced by <a class="el" href="_i_scene_node_8h-source.html#l00338">irr::scene::ISceneNode::addAnimator()</a>, <a class="el" href="_i_scene_node_8h-source.html#l00270">irr::scene::ISceneNode::addChild()</a>, <a class="el" href="_i_g_u_i_element_8h-source.html#l00389">irr::gui::IGUIElement::addChild()</a>, <a class="el" href="_s_animated_mesh_8h-source.html#l00067">irr::scene::SAnimatedMesh::addMesh()</a>, <a class="el" href="_s_mesh_8h-source.html#l00087">irr::scene::SMesh::addMeshBuffer()</a>, <a class="el" href="_c_dynamic_mesh_buffer_8h-source.html#l00057">irr::scene::CDynamicMeshBuffer::setIndexBuffer()</a>, <a class="el" href="_i_scene_node_8h-source.html#l00582">irr::scene::ISceneNode::setParent()</a>, <a class="el" href="_i_scene_node_8h-source.html#l00621">irr::scene::ISceneNode::setTriangleSelector()</a>, and <a class="el" href="_c_dynamic_mesh_buffer_8h-source.html#l00047">irr::scene::CDynamicMeshBuffer::setVertexBuffer()</a>.</p>

</div>
</div><p>
<a class="anchor" name="704c5042d399fe8cd3bdd65a0559002a"></a><!-- doxytag: member="irr::IReferenceCounted::setDebugName" ref="704c5042d399fe8cd3bdd65a0559002a" args="(const c8 *newName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::IReferenceCounted::setDebugName           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#9395eaea339bcb546b319e9c96bf7410">c8</a> *&nbsp;</td>
          <td class="paramname"> <em>newName</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the debug name of the object. 
<p>
The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newName,:</em>&nbsp;</td><td>New debug name to set. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="_i_reference_counted_8h-source.html#l00153">153</a> of file <a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a>.</p>

<p>Referenced by <a class="el" href="_c_mesh_buffer_8h-source.html#l00021">irr::scene::CMeshBuffer&lt; T &gt;::CMeshBuffer()</a>, <a class="el" href="_i_g_u_i_element_8h-source.html#l00030">irr::gui::IGUIElement::IGUIElement()</a>, <a class="el" href="_s_animated_mesh_8h-source.html#l00022">irr::scene::SAnimatedMesh::SAnimatedMesh()</a>, <a class="el" href="_s_mesh_8h-source.html#l00021">irr::scene::SMesh::SMesh()</a>, <a class="el" href="_s_shared_mesh_buffer_8h-source.html#l00019">irr::scene::SSharedMeshBuffer::SSharedMeshBuffer()</a>, and <a class="el" href="_s_skin_mesh_buffer_8h-source.html#l00022">irr::scene::SSkinMeshBuffer::SSkinMeshBuffer()</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_reference_counted_8h-source.html">IReferenceCounted.h</a></ul>
</div>
<hr size="1">
<address style="align: right;">
<small> </small>
</address>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr> 
    <td width="0"> <div align="left"><small><a href="http://irrlicht.sourceforge.net" target="_blank"><img src="irrlicht.png" alt="The Irrlicht Engine" align="middle" border=0 width=88 height=31></a></small></div></td>
    <td> <div align="left"><small><em><font size="2">The <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht 
        Engine</a> Documentation &copy; 2003-2009 by Nikolaus Gebhardt. Generated 
        on Sun Jan 10 09:24:08 2010 by <a href="http://www.doxygen.org" target="_blank">Doxygen</a> 
        (1.5.6)</font></em></small></div></td>
  </tr>
</table>
<address style="align: right;">
</address>
</body>
</html>