<!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>Crystal Space 1.2.1: iObjectRegistry Struct Reference (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <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="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <h1>iObjectRegistry Struct Reference<br> <small> [<a class="el" href="group__scf.html">Shared Class Facility (SCF)</a>]</small> </h1><!-- doxytag: class="iObjectRegistry" --><!-- doxytag: inherits="iBase" -->This interface serves as a registry of other objects. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="iutil_2objreg_8h-source.html">iutil/objreg.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for iObjectRegistry:</div> <div class="dynsection"> <p><center><img src="structiObjectRegistry__inherit__graph.png" border="0" usemap="#iObjectRegistry__inherit__map" alt="Inheritance graph"></center> <map name="iObjectRegistry__inherit__map"> <area shape="rect" href="classscfImplementation1.html" title="scfImplementation1\< csObjectRegistry, iObjectRegistry \>" alt="" coords="5,161,397,188"><area shape="rect" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one..." alt="" coords="173,7,229,33"><area shape="rect" href="classcsObjectRegistry.html" title="This is an implementation of iObjectRegistry." alt="" coords="137,239,265,265"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="structiObjectRegistry-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">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="structiObjectRegistry.html#41cbf0c1bba0b09fe138558796fd07d1">Clear</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Clear the object registry and release all references. <a href="#41cbf0c1bba0b09fe138558796fd07d1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classcsPtr.html">csPtr</a><br> < <a class="el" href="structiObjectRegistryIterator.html">iObjectRegistryIterator</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="structiObjectRegistry.html#159572bd26f6107918820b7eec8090e6">Get</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get an iterator with all objects in this object registry. <a href="#159572bd26f6107918820b7eec8090e6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classcsPtr.html">csPtr</a><br> < <a class="el" href="structiObjectRegistryIterator.html">iObjectRegistryIterator</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="structiObjectRegistry.html#586c62d9b2c50f2f7b200a64693228d9">Get</a> (<a class="el" href="group__scf.html#ge3095ac94f71a5ff42374271c90222cd">scfInterfaceID</a> id, int version)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get an iterator with all objects implementing the given interface. <a href="#586c62d9b2c50f2f7b200a64693228d9"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="structiBase.html">iBase</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structiObjectRegistry.html#6669b525a825104c70276f7b4ab69de7">Get</a> (char const *tag, <a class="el" href="group__scf.html#ge3095ac94f71a5ff42374271c90222cd">scfInterfaceID</a> id, int version)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the registered object corresponding with the given tag and implementing the specified interface. <a href="#6669b525a825104c70276f7b4ab69de7"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="structiBase.html">iBase</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structiObjectRegistry.html#ba569f17b4f8b4a5201fa36e0793e77e">Get</a> (char const *tag)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the registered object corresponding with the given tag. <a href="#ba569f17b4f8b4a5201fa36e0793e77e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="structiObjectRegistry.html#95698fc00d47a53d011c10c75fefce2e">Register</a> (<a class="el" href="structiBase.html">iBase</a> *obj, char const *tag=0)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Register an object with this registry. <a href="#95698fc00d47a53d011c10c75fefce2e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="structiObjectRegistry.html#071a311e10733e187f4e77b1042a0fde">Unregister</a> (<a class="el" href="structiBase.html">iBase</a> *obj, char const *tag=0)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Unregister an object with this registry. <a href="#071a311e10733e187f4e77b1042a0fde"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This interface serves as a registry of other objects. <p> The object registry is thread-safe.<p> Main creators of instances implementing this interface:<ul> <li><a class="el" href="classcsInitializer.html#92a16794e9daa943a075d8b583ea77a9" title="This function should be called second.">csInitializer::CreateObjectRegistry()</a></li></ul> <p> Main ways to get pointers to this interface:<ul> <li>Stored by application.</li></ul> <p> Main users of this interface:<ul> <li>Everything. </li></ul> <p>Definition at line <a class="el" href="iutil_2objreg_8h-source.html#l00048">48</a> of file <a class="el" href="iutil_2objreg_8h-source.html">objreg.h</a>.</p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="41cbf0c1bba0b09fe138558796fd07d1"></a><!-- doxytag: member="iObjectRegistry::Clear" ref="41cbf0c1bba0b09fe138558796fd07d1" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void iObjectRegistry::Clear </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Clear the object registry and release all references. <p> <p>Implemented in <a class="el" href="classcsObjectRegistry.html#340ad091f9ee9b02cf14bd373adc7674">csObjectRegistry</a>.</p> </div> </div><p> <a class="anchor" name="159572bd26f6107918820b7eec8090e6"></a><!-- doxytag: member="iObjectRegistry::Get" ref="159572bd26f6107918820b7eec8090e6" args="()=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classcsPtr.html">csPtr</a><<a class="el" href="structiObjectRegistryIterator.html">iObjectRegistryIterator</a>> iObjectRegistry::Get </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get an iterator with all objects in this object registry. <p> Note that the iterator iterates over a copy of the elements in the object registry so no thread-locking on the object registry happens except at the time the iterator is created. <p>Implemented in <a class="el" href="classcsObjectRegistry.html#08289f25fd1e6441d77f52ecab98b745">csObjectRegistry</a>.</p> </div> </div><p> <a class="anchor" name="586c62d9b2c50f2f7b200a64693228d9"></a><!-- doxytag: member="iObjectRegistry::Get" ref="586c62d9b2c50f2f7b200a64693228d9" args="(scfInterfaceID id, int version)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classcsPtr.html">csPtr</a><<a class="el" href="structiObjectRegistryIterator.html">iObjectRegistryIterator</a>> iObjectRegistry::Get </td> <td>(</td> <td class="paramtype"><a class="el" href="group__scf.html#ge3095ac94f71a5ff42374271c90222cd">scfInterfaceID</a> </td> <td class="paramname"> <em>id</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>version</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get an iterator with all objects implementing the given interface. <p> Note that the iterator iterates over a copy of the elements in the object registry so no thread-locking on the object registry happens except at the time the iterator is created. <p>Implemented in <a class="el" href="classcsObjectRegistry.html#863d02c63ea22ee9b73f13abd386d792">csObjectRegistry</a>.</p> </div> </div><p> <a class="anchor" name="6669b525a825104c70276f7b4ab69de7"></a><!-- doxytag: member="iObjectRegistry::Get" ref="6669b525a825104c70276f7b4ab69de7" args="(char const *tag, scfInterfaceID id, int version)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="structiBase.html">iBase</a>* iObjectRegistry::Get </td> <td>(</td> <td class="paramtype">char const * </td> <td class="paramname"> <em>tag</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="group__scf.html#ge3095ac94f71a5ff42374271c90222cd">scfInterfaceID</a> </td> <td class="paramname"> <em>id</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>version</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the registered object corresponding with the given tag and implementing the specified interface. <p> <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>The reference count of the returned object will be artifically incremented, so clients must take care to decrement the reference when no longer needed. </dd></dl> <p>Implemented in <a class="el" href="classcsObjectRegistry.html#b0a04cc77fc3a5c6d818de94eb14d023">csObjectRegistry</a>.</p> </div> </div><p> <a class="anchor" name="ba569f17b4f8b4a5201fa36e0793e77e"></a><!-- doxytag: member="iObjectRegistry::Get" ref="ba569f17b4f8b4a5201fa36e0793e77e" args="(char const *tag)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="structiBase.html">iBase</a>* iObjectRegistry::Get </td> <td>(</td> <td class="paramtype">char const * </td> <td class="paramname"> <em>tag</em> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Get the registered object corresponding with the given tag. <p> <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>The reference count of the returned object will be artifically incremented, so clients must take care to decrement the reference when no longer needed. </dd></dl> <p>Implemented in <a class="el" href="classcsObjectRegistry.html#0ea45236f3a515ae06dbac2d288565db">csObjectRegistry</a>.</p> <p>Referenced by <a class="el" href="iutil_2objreg_8h-source.html#l00161">csQueryRegistry()</a>, <a class="el" href="iutil_2objreg_8h-source.html#l00180">csQueryRegistryTag()</a>, and <a class="el" href="iutil_2objreg_8h-source.html#l00189">csQueryRegistryTagInterface()</a>.</p> </div> </div><p> <a class="anchor" name="95698fc00d47a53d011c10c75fefce2e"></a><!-- doxytag: member="iObjectRegistry::Register" ref="95698fc00d47a53d011c10c75fefce2e" args="(iBase *obj, char const *tag=0)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual bool iObjectRegistry::Register </td> <td>(</td> <td class="paramtype"><a class="el" href="structiBase.html">iBase</a> * </td> <td class="paramname"> <em>obj</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char const * </td> <td class="paramname"> <em>tag</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Register an object with this registry. <p> The same object can be registered multiple times but in that case it is probably best to have different tags so they can be distinguished. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>obj</em> </td><td>Object to place into the registry. </td></tr> <tr><td valign="top"></td><td valign="top"><em>tag</em> </td><td>Optional tag. The tag is interpreted in any way the client sees fit, however some facilities expect tags to follow a certain convention, so be sure to check suitable documentation. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>False if the given tag is already registered; if obj is null; or if the registry is in the process of being cleared. </dd></dl> <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>The reference count of obj will be incremented at registration time. <p> A particular tag can only be registered once. If you need to re-use a tag, first unregister the object to which it is associated. </dd></dl> <p>Implemented in <a class="el" href="classcsObjectRegistry.html#1acb7703a41a4e7eb438a0c2de54c2ae">csObjectRegistry</a>.</p> <p>Referenced by <a class="el" href="plugin_8h-source.html#l00277">csQueryRegistryOrLoad()</a>.</p> </div> </div><p> <a class="anchor" name="071a311e10733e187f4e77b1042a0fde"></a><!-- doxytag: member="iObjectRegistry::Unregister" ref="071a311e10733e187f4e77b1042a0fde" args="(iBase *obj, char const *tag=0)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void iObjectRegistry::Unregister </td> <td>(</td> <td class="paramtype"><a class="el" href="structiBase.html">iBase</a> * </td> <td class="paramname"> <em>obj</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char const * </td> <td class="paramname"> <em>tag</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [pure virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Unregister an object with this registry. <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>obj</em> </td><td>Object to removed from the registry. </td></tr> <tr><td valign="top"></td><td valign="top"><em>tag</em> </td><td>Optional tag. </td></tr> </table> </dl> <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>If tag is not provided, * then it will unregister all occurrences of obj * in the registry (i.e. for all tags). If tag is provided, then only * the particular registration of obj associated with tag will be unregistered. <p> The reference count of obj will be decremented at removal time. </dd></dl> <p>Implemented in <a class="el" href="classcsObjectRegistry.html#fa0d7d0cd0cbfe68b1919dedf31e572d">csObjectRegistry</a>.</p> </div> </div><p> <hr>The documentation for this struct was generated from the following file:<ul> <li>iutil/<a class="el" href="iutil_2objreg_8h-source.html">objreg.h</a></ul> <hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>