Sophie

Sophie

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

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: iengine/sharevar.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>iengine/sharevar.h</h1><a href="sharevar_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) 2002 by Keith Fulton</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_IENGINE_SHAREVAR_H__</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IENGINE_SHAREVAR_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span>
<a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="scf_8h.html" title="Crystal Space Shared Class Facility (SCF).">csutil/scf.h</a>"</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <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="l00033"></a>00033 <span class="keyword">struct </span><a class="code" href="structiSharedVariableListener.html" title="A listener so that you can get notified when a variable is changed.">iSharedVariableListener</a>;
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">class </span><a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>;
<a name="l00036"></a>00036 <span class="keyword">class </span><a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>;
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 
<a name="l00050"></a><a class="code" href="structiSharedVariable.html">00050</a> <span class="keyword">struct </span><a class="code" href="structiSharedVariable.html" title="iSharedVariable implements a refcounted value which can be shared across many objects...">iSharedVariable</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="l00051"></a>00051 {
<a name="l00052"></a>00052   SCF_INTERFACE(<a class="code" href="structiSharedVariable.html" title="iSharedVariable implements a refcounted value which can be shared across many objects...">iSharedVariable</a>, 3,0,0);
<a name="l00054"></a>00054   <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="structiSharedVariable.html#be48000128b6cd565a15c63ff53a71ca" title="Get the private object interface.">QueryObject</a> () = 0;
<a name="l00055"></a>00055 
<a name="l00057"></a>00057   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariable.html#e88c3d5680f2fc065b01c65dc21f77b7" title="iSharedVariables are referenced by name. Here is where you set it.">SetName</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *name) = 0;
<a name="l00058"></a>00058 
<a name="l00060"></a>00060   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="structiSharedVariable.html#43615a1af35703211ec643e39fa213e7" title="Get the name of this variable.">GetName</a> () <span class="keyword">const</span> = 0;
<a name="l00061"></a>00061 
<a name="l00063"></a>00063   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariable.html#3baa9f096dacfd96ff00bc964458755e" title="Set the variable to a floating pt value.">Set</a>(<span class="keywordtype">float</span> val) = 0;
<a name="l00064"></a>00064 
<a name="l00066"></a>00066   <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiSharedVariable.html#4a4d99dab514db69f4ab42240e49e0a0" title="Get the floating point version of the var value.">Get</a> () <span class="keyword">const</span> = 0;
<a name="l00067"></a>00067 
<a name="l00069"></a>00069   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariable.html#f15cf6a1762900824eb83458c77c2e2d" title="Set the variable to store a csColor.">SetColor</a> (<span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>&amp; col) = 0;
<a name="l00070"></a>00070 
<a name="l00072"></a>00072   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsColor.html" title="A class used to represent a color in RGB space.">csColor</a>&amp; <a class="code" href="structiSharedVariable.html#5715316807d55507845988c7da140f6a" title="Get the csColor from the variable.">GetColor</a> () <span class="keyword">const</span> = 0;
<a name="l00073"></a>00073 
<a name="l00075"></a>00075   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariable.html#fafa43673f7ece9edf1da6023683346f" title="Set the variable to store a csVector3.">SetVector</a> (<span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; v) = 0;
<a name="l00076"></a>00076 
<a name="l00078"></a>00078   <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>&amp; <a class="code" href="structiSharedVariable.html#a9cbb45ecbbaccb0e778165a8016fdaa" title="Get the vector from the variable.">GetVector</a> () <span class="keyword">const</span> = 0;
<a name="l00079"></a>00079 
<a name="l00081"></a>00081   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariable.html#efe2441eb60bf05b534cfefa75de8efe" title="Set the string from the variable.">SetString</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* str) = 0;
<a name="l00082"></a>00082 
<a name="l00084"></a>00084   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structiSharedVariable.html#24e6178982c95369c6ebaccb396442ca" title="Get the string from the variable.">GetString</a> () <span class="keyword">const</span> = 0;
<a name="l00085"></a>00085 
<a name="l00087"></a><a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f4">00087</a>   <span class="keyword">enum</span> <a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f4" title="Possible types stored by this class.">SharedVariableType</a>
<a name="l00088"></a>00088   {
<a name="l00089"></a><a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f48f19d9be5d2ea08d0cbba95e70662bab">00089</a>     <a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f48f19d9be5d2ea08d0cbba95e70662bab">SV_UNKNOWN</a> = 0,
<a name="l00090"></a><a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f463b6dd5e6712e779dd532ff96ad68b29">00090</a>     <a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f463b6dd5e6712e779dd532ff96ad68b29">SV_FLOAT</a>   = 1,
<a name="l00091"></a><a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f46bdf786529f64bd593c36e5357d1a533">00091</a>     <a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f46bdf786529f64bd593c36e5357d1a533">SV_COLOR</a>   = 2,
<a name="l00092"></a><a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f41d9ecf0323bbe1bf11c805b0ab5ed9a1">00092</a>     <a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f41d9ecf0323bbe1bf11c805b0ab5ed9a1">SV_VECTOR</a>  = 3,
<a name="l00093"></a><a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f490bed0a4b597ccf73f2b86f6b5249050">00093</a>     <a class="code" href="structiSharedVariable.html#3d92773963c63daf5c1f3339c06549f490bed0a4b597ccf73f2b86f6b5249050">SV_STRING</a>  = 4
<a name="l00094"></a>00094   };
<a name="l00095"></a>00095 
<a name="l00097"></a>00097   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiSharedVariable.html#0d5a4f68a8747f123c070ba09c50ee16" title="Get the type currently stored by this variable.">GetType</a> () <span class="keyword">const</span> = 0;
<a name="l00098"></a>00098 
<a name="l00100"></a>00100   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariable.html#36a80b83d9cc49b1866b839d29c4d5e6" title="Add a listener to variables.">AddListener</a> (<a class="code" href="structiSharedVariableListener.html" title="A listener so that you can get notified when a variable is changed.">iSharedVariableListener</a>* listener) = 0;
<a name="l00101"></a>00101 
<a name="l00103"></a>00103   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariable.html#7e844606f39bb5c9e5d9cf712ad57152" title="Remove a listener.">RemoveListener</a> (<a class="code" href="structiSharedVariableListener.html" title="A listener so that you can get notified when a variable is changed.">iSharedVariableListener</a>* listener) = 0;
<a name="l00104"></a>00104 };
<a name="l00105"></a>00105 
<a name="l00106"></a>00106 
<a name="l00114"></a><a class="code" href="structiSharedVariableListener.html">00114</a> <span class="keyword">struct </span><a class="code" href="structiSharedVariableListener.html" title="A listener so that you can get notified when a variable is changed.">iSharedVariableListener</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="l00115"></a>00115 {
<a name="l00116"></a>00116   SCF_INTERFACE(<a class="code" href="structiSharedVariableListener.html" title="A listener so that you can get notified when a variable is changed.">iSharedVariableListener</a>,2,0,0);
<a name="l00120"></a>00120   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariableListener.html#016a6127e2af2027bbed498ece2a0b11" title="A variable has changed.">VariableChanged</a> (<a class="code" href="structiSharedVariable.html" title="iSharedVariable implements a refcounted value which can be shared across many objects...">iSharedVariable</a>* var) = 0;
<a name="l00121"></a>00121 };
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 
<a name="l00130"></a><a class="code" href="structiSharedVariableList.html">00130</a> <span class="keyword">struct </span><a class="code" href="structiSharedVariableList.html" title="A list of shared variables.">iSharedVariableList</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="l00131"></a>00131 {
<a name="l00132"></a>00132   SCF_INTERFACE(<a class="code" href="structiSharedVariableList.html" title="A list of shared variables.">iSharedVariableList</a>, 2,0,0);
<a name="l00134"></a>00134   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiSharedVariableList.html#a16eeaee214c03576cdb0ee7b34e4f73" title="Return the number of Shared Variables in this list.">GetCount</a> () <span class="keyword">const</span> = 0;
<a name="l00135"></a>00135 
<a name="l00137"></a>00137   <span class="keyword">virtual</span> <a class="code" href="structiSharedVariable.html" title="iSharedVariable implements a refcounted value which can be shared across many objects...">iSharedVariable</a> *<a class="code" href="structiSharedVariableList.html#609915394942bd97eb7f5f71f3e98c7e" title="Return a SharedVariable by index.">Get</a> (<span class="keywordtype">int</span> n) <span class="keyword">const</span> = 0;
<a name="l00138"></a>00138 
<a name="l00140"></a>00140   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiSharedVariableList.html#36e0243ffc5c709a5527030d080ab1ca" title="Add a SharedVariable.">Add</a> (<a class="code" href="structiSharedVariable.html" title="iSharedVariable implements a refcounted value which can be shared across many objects...">iSharedVariable</a> *obj) = 0;
<a name="l00141"></a>00141 
<a name="l00143"></a>00143   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiSharedVariableList.html#6867da1e525db6c23f88a167e7025812" title="Remove a SharedVariable.">Remove</a> (<a class="code" href="structiSharedVariable.html" title="iSharedVariable implements a refcounted value which can be shared across many objects...">iSharedVariable</a> *obj) = 0;
<a name="l00144"></a>00144 
<a name="l00146"></a>00146   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiSharedVariableList.html#6867da1e525db6c23f88a167e7025812" title="Remove a SharedVariable.">Remove</a> (<span class="keywordtype">int</span> n) = 0;
<a name="l00147"></a>00147 
<a name="l00149"></a>00149   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiSharedVariableList.html#d41383206cebf928c3f7d08f37088b1d" title="Remove all SharedVariables.">RemoveAll</a> () = 0;
<a name="l00150"></a>00150 
<a name="l00152"></a>00152   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiSharedVariableList.html#3e2421d19c513c4fad620ac830832ac4" title="Find a SharedVariable and return its index.">Find</a> (<a class="code" href="structiSharedVariable.html" title="iSharedVariable implements a refcounted value which can be shared across many objects...">iSharedVariable</a> *obj) <span class="keyword">const</span> = 0;
<a name="l00153"></a>00153 
<a name="l00155"></a>00155   <span class="keyword">virtual</span> <a class="code" href="structiSharedVariable.html" title="iSharedVariable implements a refcounted value which can be shared across many objects...">iSharedVariable</a> *<a class="code" href="structiSharedVariableList.html#d0a99f3250a957485b57b7fb03c1a8ab" title="Find a SharedVariable by name.">FindByName</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *Name) <span class="keyword">const</span> = 0;
<a name="l00156"></a>00156 
<a name="l00158"></a>00158   <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr&lt;iSharedVariable&gt;</a> <a class="code" href="structiSharedVariableList.html#35b0f575df2458087392200647498540" title="iSharedVariable Factory method. This does not add the new var to the list.">New</a>() = 0;
<a name="l00159"></a>00159 };
<a name="l00160"></a>00160 
<a name="l00163"></a>00163 <span class="preprocessor">#endif // __CS_IENGINE_SHAREVAR_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>