Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1928

crystalspace-doc-1.2.1-5mdv2010.0.i586.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>Crystal Space 1.2.1: iutil/object.h Source File (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&nbsp;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><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>iutil/object.h</h1><a href="iutil_2object_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2000 by Jorrit Tyberghein</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">    This library is free software; you can redistribute it and/or</span>
<a name="l00005"></a>00005 <span class="comment">    modify it under the terms of the GNU Library General Public</span>
<a name="l00006"></a>00006 <span class="comment">    License as published by the Free Software Foundation; either</span>
<a name="l00007"></a>00007 <span class="comment">    version 2 of the License, or (at your option) any later version.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">    This library is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00012"></a>00012 <span class="comment">    Library General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">    You should have received a copy of the GNU Library General Public</span>
<a name="l00015"></a>00015 <span class="comment">    License along with this library; if not, write to the Free</span>
<a name="l00016"></a>00016 <span class="comment">    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00017"></a>00017 <span class="comment">*/</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#ifndef __CS_IOBJECT_OBJECT_H__</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IOBJECT_OBJECT_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="scf__interface_8h.html" title="Crystal Space Shared Class Facility (SCF) - interface creation support.">csutil/scf_interface.h</a>"</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="ref_8h.html" title="Smart Pointers.">csutil/ref.h</a>"</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">struct </span><a class="code" href="structiObjectIterator.html" title="This is an iterator for child objects of a csObject.">iObjectIterator</a>;
<a name="l00031"></a>00031 <span class="keyword">struct </span><a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>;
<a name="l00032"></a>00032 
<a name="l00038"></a><a class="code" href="group__util.html#g885afb1c7f016eb0766e70faff8eacf3">00038</a> <span class="preprocessor">#define CS_GET_CHILD_OBJECT(object,Interface)                        \</span>
<a name="l00039"></a>00039 <span class="preprocessor">  scfQueryInterfaceSafe&lt;Interface&gt;((object)-&gt;GetChild(               \</span>
<a name="l00040"></a>00040 <span class="preprocessor">    scfInterfaceTraits&lt;Interface&gt;::GetID(),                          \</span>
<a name="l00041"></a>00041 <span class="preprocessor">    scfInterfaceTraits&lt;Interface&gt;::GetVersion()))</span>
<a name="l00042"></a>00042 <span class="preprocessor"></span>
<a name="l00047"></a><a class="code" href="group__util.html#g4fe348e850a5569c13651c6b35883bd9">00047</a> <span class="preprocessor">#define CS_GET_NAMED_CHILD_OBJECT(object,Interface,name)             \</span>
<a name="l00048"></a>00048 <span class="preprocessor">  scfQueryInterfaceSafe&lt;Interface&gt;((object)-&gt;GetChild(               \</span>
<a name="l00049"></a>00049 <span class="preprocessor">    scfInterfaceTraits&lt;Interface&gt;::GetID(),                          \</span>
<a name="l00050"></a>00050 <span class="preprocessor">    scfInterfaceTraits&lt;Interface&gt;::GetVersion(),                     \</span>
<a name="l00051"></a>00051 <span class="preprocessor">    name))</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00057"></a><a class="code" href="group__util.html#gd674b1594ed79febb9a9617763f9701b">00057</a> <span class="preprocessor">#define CS_GET_FIRST_NAMED_CHILD_OBJECT(object,Interface,name)       \</span>
<a name="l00058"></a>00058 <span class="preprocessor">  scfQueryInterfaceSafe&lt;Interface&gt;((object)-&gt;GetChild(               \</span>
<a name="l00059"></a>00059 <span class="preprocessor">    scfInterfaceTraits&lt;Interface&gt;::GetID(),                          \</span>
<a name="l00060"></a>00060 <span class="preprocessor">    scfInterfaceTraits&lt;Interface&gt;::GetVersion(),                     \</span>
<a name="l00061"></a>00061 <span class="preprocessor">    name, true))</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00067"></a><a class="code" href="structiObjectNameChangeListener.html">00067</a> <span class="keyword">struct </span><a class="code" href="structiObjectNameChangeListener.html" title="A callback that you can implement to get notified of name changes in an iObject.">iObjectNameChangeListener</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00068"></a>00068 {
<a name="l00069"></a>00069   SCF_INTERFACE (<a class="code" href="structiObjectNameChangeListener.html" title="A callback that you can implement to get notified of name changes in an iObject.">iObjectNameChangeListener</a>, 0, 0, 1);
<a name="l00070"></a>00070 
<a name="l00072"></a>00072   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObjectNameChangeListener.html#7373b34fc9ca459661ae000d06f48994" title="Object name has changed.">NameChanged</a> (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* obj, <span class="keyword">const</span> <span class="keywordtype">char</span>* oldname,
<a name="l00073"></a>00073         <span class="keyword">const</span> <span class="keywordtype">char</span>* newname) = 0;
<a name="l00074"></a>00074 };
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 
<a name="l00092"></a><a class="code" href="structiObject.html">00092</a> <span class="keyword">struct </span><a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00093"></a>00093 {
<a name="l00094"></a>00094   SCF_INTERFACE(<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>,2,0,1);
<a name="l00095"></a>00095 
<a name="l00097"></a>00097   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#2afb56c8850acef9c640d7d152b84a55" title="Set object name.">SetName</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *iName) = 0;
<a name="l00098"></a>00098 
<a name="l00100"></a>00100   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiObject.html#d4cdf16eca8ffd5e03cf592985cd5705" title="Query object name.">GetName</a> () <span class="keyword">const</span> = 0;
<a name="l00101"></a>00101 
<a name="l00103"></a>00103   <span class="keyword">virtual</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> <a class="code" href="structiObject.html#5c449ebb9a7dd534c2910f74f3e4d6ec" title="Get the unique ID associated with this object.">GetID</a> () <span class="keyword">const</span> = 0;
<a name="l00104"></a>00104 
<a name="l00109"></a>00109   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#fdf5db6ec78d5ba13e591eebf3dae730" title="Set the parent iObject.">SetObjectParent</a> (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a> *obj) = 0;
<a name="l00110"></a>00110 
<a name="l00112"></a>00112   <span class="keyword">virtual</span> <a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* <a class="code" href="structiObject.html#3814d9cf1ac4e6555d0483bd8e1c6146" title="Returns the parent iObject.">GetObjectParent</a> () <span class="keyword">const</span> = 0;
<a name="l00113"></a>00113 
<a name="l00115"></a>00115   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#1b43d0eb676349569efb8a7b3f7c9df5" title="Attach a new iObject to the tree.">ObjAdd</a> (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a> *obj) = 0;
<a name="l00116"></a>00116 
<a name="l00118"></a>00118   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#7ce9b15955777c50e656ec8551d38de9" title="Remove an iObject from the tree.">ObjRemove</a> (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a> *obj) = 0;
<a name="l00119"></a>00119 
<a name="l00121"></a>00121   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#512f4e205cc05d34d99c46537f389df1" title="Remove all child objects.">ObjRemoveAll</a> () = 0;
<a name="l00122"></a>00122 
<a name="l00124"></a>00124   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#1db7ce1134a0e32c7f1c526e2374e5bf" title="Add all child objects of the given object.">ObjAddChildren</a> (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a> *Parent) = 0;
<a name="l00125"></a>00125 
<a name="l00135"></a>00135   <span class="keyword">virtual</span> <a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* <a class="code" href="structiObject.html#6f2cc06a839a8c986442c286de0cd881" title="Look for a child object that implements the given interface.">GetChild</a> (<span class="keywordtype">int</span> iInterfaceID, <span class="keywordtype">int</span> iVersion,
<a name="l00136"></a>00136     <span class="keyword">const</span> <span class="keywordtype">char</span> *Name = 0, <span class="keywordtype">bool</span> FirstName = <span class="keyword">false</span>) <span class="keyword">const</span> = 0;
<a name="l00137"></a>00137 
<a name="l00139"></a>00139   <span class="keyword">virtual</span> <a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* <a class="code" href="structiObject.html#6f2cc06a839a8c986442c286de0cd881" title="Look for a child object that implements the given interface.">GetChild</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Name) <span class="keyword">const</span> = 0;
<a name="l00140"></a>00140 
<a name="l00145"></a>00145   <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr&lt;iObjectIterator&gt;</a> <a class="code" href="structiObject.html#7d556c40d0c2f474559145bd257660e6" title="Return an iterator for all child objects.">GetIterator</a> () = 0;
<a name="l00146"></a>00146 
<a name="l00148"></a>00148   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#386a28090c222bbcd522a6a986d83faf">ObjReleaseOld</a> (<a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a> *obj) = 0;
<a name="l00149"></a>00149 
<a name="l00153"></a>00153   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#aa27e930cc8f0e8be946a6f7f0b730be" title="Add a name change listener.">AddNameChangeListener</a> (
<a name="l00154"></a>00154         <a class="code" href="structiObjectNameChangeListener.html" title="A callback that you can implement to get notified of name changes in an iObject.">iObjectNameChangeListener</a>* listener) = 0;
<a name="l00155"></a>00155 
<a name="l00159"></a>00159   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObject.html#d595caccee23cd4934472ff6f3402856" title="Remove a name change listener.">RemoveNameChangeListener</a> (
<a name="l00160"></a>00160         <a class="code" href="structiObjectNameChangeListener.html" title="A callback that you can implement to get notified of name changes in an iObject.">iObjectNameChangeListener</a>* listener) = 0;
<a name="l00161"></a>00161 };
<a name="l00162"></a>00162 
<a name="l00163"></a>00163 
<a name="l00174"></a><a class="code" href="structiObjectIterator.html">00174</a> <span class="keyword">struct </span><a class="code" href="structiObjectIterator.html" title="This is an iterator for child objects of a csObject.">iObjectIterator</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00175"></a>00175 {
<a name="l00176"></a>00176   SCF_INTERFACE(<a class="code" href="structiObjectIterator.html" title="This is an iterator for child objects of a csObject.">iObjectIterator</a>,2,0,0);
<a name="l00178"></a>00178   <span class="keyword">virtual</span> <a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* <a class="code" href="structiObjectIterator.html#2a1175e182c98f29ceba58b3e23f3a00" title="Move forward.">Next</a> () = 0;
<a name="l00179"></a>00179 
<a name="l00181"></a>00181   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiObjectIterator.html#d9d505e11f0c45884baa007e0d955a9f" title="Reset the iterator to the beginning.">Reset</a> () = 0;
<a name="l00182"></a>00182 
<a name="l00184"></a>00184   <span class="keyword">virtual</span> <a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* <a class="code" href="structiObjectIterator.html#7d6db37bbc3af0074faf15657ece7aea" title="Get the parent object.">GetParentObj</a> () <span class="keyword">const</span> = 0;
<a name="l00185"></a>00185 
<a name="l00187"></a>00187   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiObjectIterator.html#03bc80094bd3f11b30fe2b5a2976ae86" title="Check if we have any more children of requested type.">HasNext</a> () <span class="keyword">const</span> = 0;
<a name="l00188"></a>00188 
<a name="l00195"></a>00195   <span class="keyword">virtual</span> <a class="code" href="structiObject.html" title="This interface is an SCF interface for encapsulating csObject.">iObject</a>* <a class="code" href="structiObjectIterator.html#f715d4aef414361ce2c117aa5d24ba78" title="traverses all csObjects and looks for an object with the given name returns object...">FindName</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* name) = 0;
<a name="l00196"></a>00196 };
<a name="l00197"></a>00197 
<a name="l00200"></a>00200 <span class="preprocessor">#endif // __CS_IOBJECT_OBJECT_H__</span>
</pre></div><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>