Sophie

Sophie

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

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: csutil/inputdef.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>csutil/inputdef.h</h1><a href="inputdef_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">    Crystal Space input library</span>
<a name="l00003"></a>00003 <span class="comment">    Copyright (C) 2000 by Andrew Zabolotny &lt;bit@eltech.ru&gt;</span>
<a name="l00004"></a>00004 <span class="comment">    Copyright (C) 2002, 04 by Mathew Sutcliffe &lt;oktal@gmx.co.uk&gt;</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">    This library is free software; you can redistribute it and/or</span>
<a name="l00007"></a>00007 <span class="comment">    modify it under the terms of the GNU Library General Public</span>
<a name="l00008"></a>00008 <span class="comment">    License as published by the Free Software Foundation; either</span>
<a name="l00009"></a>00009 <span class="comment">    version 2 of the License, or (at your option) any later version.</span>
<a name="l00010"></a>00010 <span class="comment"></span>
<a name="l00011"></a>00011 <span class="comment">    This library is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00014"></a>00014 <span class="comment">    Library General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">    You should have received a copy of the GNU Library General Public</span>
<a name="l00017"></a>00017 <span class="comment">    License along with this library; if not, write to the Free</span>
<a name="l00018"></a>00018 <span class="comment">    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00019"></a>00019 <span class="comment">*/</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#ifndef __CS_UTIL_INPUTDEF_H__</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define __CS_UTIL_INPUTDEF_H__</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <span class="preprocessor">#include "csextern.h"</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="csstring_8h.html" title="String utility class.">csutil/csstring.h</a>"</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="comparator_8h.html" title="Template providing various comparison and ordering functions.">csutil/comparator.h</a>"</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="csutil_2eventnames_8h.html" title="Event naming and name relations.">csutil/eventnames.h</a>"</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="hash_8h.html" title="A generic hash table.">csutil/hash.h</a>"</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="evdefs_8h.html" title="Event system related interfaces.">iutil/evdefs.h</a>"</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="iutil_2event_8h.html" title="Event system related interfaces.">iutil/event.h</a>"</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="keyword">struct </span><a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a>;
<a name="l00039"></a>00039 <span class="keyword">class </span><a class="code" href="classcsInputBinder.html" title="Use this class to bind input events (keypress, button press, mouse move, etc.">csInputBinder</a>;
<a name="l00040"></a>00040 
<a name="l00045"></a><a class="code" href="classcsInputDefinition.html">00045</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a>
<a name="l00046"></a>00046 {
<a name="l00047"></a>00047 <span class="keyword">public</span>:
<a name="l00048"></a><a class="code" href="classcsInputDefinition.html#92970f4aff0639b6c6aaa60b1ff94000">00048</a>   <a class="code" href="classcsRef.html" title="A smart pointer.">csRef&lt;iEventNameRegistry&gt;</a> name_reg;
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="keyword">protected</span>:
<a name="l00051"></a><a class="code" href="classcsInputDefinition.html#4eec8d356d031ed2673b30f6a2e48221">00051</a>   <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&amp;#39;s hierarchical name...">csEventID</a> containedName;
<a name="l00052"></a>00052 
<a name="l00053"></a><a class="code" href="classcsInputDefinition.html#aa59f6a56e177e3aff175490379d0570">00053</a>   <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> modifiersHonored;
<a name="l00054"></a><a class="code" href="classcsInputDefinition.html#1ff3fdb7c99850a6184ba45a16715134">00054</a>   <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a> modifiers;
<a name="l00055"></a>00055   <span class="comment">// The (basis-0) identifier for the device from which this event came</span>
<a name="l00056"></a><a class="code" href="classcsInputDefinition.html#dd58852c1db4a3dbc1a49515404f34e6">00056</a>   <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> deviceNumber;
<a name="l00057"></a>00057   <span class="keyword">union</span>
<a name="l00058"></a>00058   {
<a name="l00059"></a>00059     <span class="keyword">struct</span>
<a name="l00060"></a>00060     {
<a name="l00061"></a><a class="code" href="classcsInputDefinition.html#9db4b4c1dac1aeab49383a37777b46e6">00061</a>       <a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a> code;
<a name="l00062"></a><a class="code" href="classcsInputDefinition.html#ba6e52d1efc4d6176a635c0d32109580">00062</a>       <span class="keywordtype">bool</span> isCooked;
<a name="l00063"></a>00063     } keyboard;
<a name="l00064"></a><a class="code" href="classcsInputDefinition.html#1c13e364f08301425f998496bb51378e">00064</a>     <span class="keywordtype">int</span> mouseButton;
<a name="l00065"></a><a class="code" href="classcsInputDefinition.html#057b3e1875a16c361b18530852cc1c6d">00065</a>     <span class="keywordtype">int</span> mouseAxis;
<a name="l00066"></a><a class="code" href="classcsInputDefinition.html#ed379594aed5122620591816f6ff4782">00066</a>     <span class="keywordtype">int</span> joystickButton;
<a name="l00067"></a><a class="code" href="classcsInputDefinition.html#049b5183ef18cdfdd1c121d6f65cb4f8">00067</a>     <span class="keywordtype">int</span> joystickAxis;
<a name="l00068"></a>00068   };
<a name="l00069"></a>00069 
<a name="l00070"></a>00070   <span class="keywordtype">void</span> Initialize (<a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> honorModifiers, <span class="keywordtype">bool</span> useCookedCode);
<a name="l00071"></a>00071   <span class="keywordtype">void</span> InitializeFromEvent (<a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *ev);
<a name="l00072"></a>00072 
<a name="l00073"></a><a class="code" href="classcsInputDefinition.html#e8470ff8b7c40e0bef64bcc4291043dc">00073</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcsInputBinder.html" title="Use this class to bind input events (keypress, button press, mouse move, etc.">csInputBinder</a>;
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 <span class="keyword">public</span>:
<a name="l00082"></a>00082   <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a>* name_reg, 
<a name="l00083"></a>00083                      <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> honorModifiers = 0, <span class="keywordtype">bool</span> useCookedCode = <span class="keyword">false</span>);
<a name="l00084"></a>00084 
<a name="l00086"></a>00086   <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> (<span class="keyword">const</span> <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> &amp;other);
<a name="l00087"></a>00087 
<a name="l00095"></a>00095   <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a>* name_reg, <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event,
<a name="l00096"></a>00096                      <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> honorModifiers = 0, <span class="keywordtype">bool</span> useCookedCode = <span class="keyword">false</span>);
<a name="l00097"></a>00097 
<a name="l00104"></a>00104   <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a>* name_reg, <a class="code" href="structiEvent.html" title="This interface describes any system event.">iEvent</a> *event, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> axis);
<a name="l00105"></a>00105 
<a name="l00121"></a>00121   <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a>* name_reg, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>,
<a name="l00122"></a>00122                      <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> honorModifiers = 0, <span class="keywordtype">bool</span> useCookedCode = <span class="keyword">false</span>);
<a name="l00123"></a>00123 
<a name="l00131"></a>00131   <a class="code" href="classcsString.html" title="Thin wrapper around csStringFast&amp;lt;&amp;gt; with its default buffer size.">csString</a> ToString (<span class="keywordtype">bool</span> distinguishModifiers = <span class="keyword">true</span>) <span class="keyword">const</span>;
<a name="l00132"></a>00132 
<a name="l00134"></a>00134   <span class="keywordtype">bool</span> IsValid () <span class="keyword">const</span>;
<a name="l00135"></a>00135 
<a name="l00137"></a><a class="code" href="classcsInputDefinition.html#7dec1d9733513ecc084ab10a943a2f29">00137</a>   <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&amp;#39;s hierarchical name...">csEventID</a> GetName ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> containedName; }
<a name="l00138"></a>00138 
<a name="l00140"></a><a class="code" href="classcsInputDefinition.html#90c4736317c202d1fae549f78c42972c">00140</a>   <span class="keywordtype">void</span> SetName (<a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&amp;#39;s hierarchical name...">csEventID</a> n) { containedName = n; }
<a name="l00141"></a>00141 
<a name="l00148"></a><a class="code" href="classcsInputDefinition.html#908d40dd2341064d33230ac3ceb61fbd">00148</a>   <span class="keywordtype">bool</span> GetKeyCode (<a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a> &amp;code, <span class="keywordtype">bool</span> &amp;isCooked)<span class="keyword"> const</span>
<a name="l00149"></a>00149 <span class="keyword">  </span>{ code = keyboard.code;
<a name="l00150"></a>00150     isCooked = keyboard.isCooked;
<a name="l00151"></a>00151     <span class="keywordflow">return</span> (containedName == <a class="code" href="group__event__handling.html#g0385e2999e453091f80f2a5c529a79a3" title="Generic keyboard event.">csevKeyboardEvent</a>(name_reg)); }
<a name="l00152"></a>00152 
<a name="l00154"></a><a class="code" href="classcsInputDefinition.html#73b0b6e735842d0a252d165ddc2a927c">00154</a>   <span class="keywordtype">bool</span> SetKeyCode (<a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a> code)
<a name="l00155"></a>00155   { <span class="keywordflow">if</span> (containedName != <a class="code" href="group__event__handling.html#g0385e2999e453091f80f2a5c529a79a3" title="Generic keyboard event.">csevKeyboardEvent</a>(name_reg)) <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00156"></a>00156     keyboard.code = code;
<a name="l00157"></a>00157     <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00158"></a>00158 
<a name="l00164"></a><a class="code" href="classcsInputDefinition.html#6627a258f1fd966254b9c36e965052b5">00164</a>   <span class="keywordtype">int</span> GetNumber ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mouseButton; }
<a name="l00165"></a>00165 
<a name="l00171"></a><a class="code" href="classcsInputDefinition.html#51f1eee87159cb3738100c506c3950c0">00171</a>   <span class="keywordtype">void</span> SetNumber (<span class="keywordtype">int</span> n) { mouseButton = n; }
<a name="l00172"></a>00172 
<a name="l00174"></a><a class="code" href="classcsInputDefinition.html#dda703bd70b80b23151db79d1216f6a9">00174</a>   <span class="keyword">const</span> <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a>&amp; GetModifiers ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> modifiers; }
<a name="l00175"></a>00175 
<a name="l00177"></a><a class="code" href="classcsInputDefinition.html#590cb1a6209b79664176da8e9a6291b7">00177</a>   <span class="keyword">const</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> GetDeviceNumber ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> deviceNumber; }
<a name="l00178"></a>00178 
<a name="l00180"></a><a class="code" href="classcsInputDefinition.html#a266244583a8c8208267fadfe82056a0">00180</a>   <span class="keywordtype">void</span> SetModifiers (<span class="keyword">const</span> <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a> &amp;mods) { modifiers = mods; }
<a name="l00181"></a>00181 
<a name="l00183"></a>00183   <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> ComputeHash () <span class="keyword">const</span>;
<a name="l00184"></a>00184 
<a name="l00186"></a>00186   <span class="keywordtype">int</span> Compare (<a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> <span class="keyword">const</span> &amp;) <span class="keyword">const</span>;
<a name="l00187"></a>00187 
<a name="l00200"></a>00200   <span class="keyword">static</span> <span class="keywordtype">bool</span> ParseKey (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a>* reg, 
<a name="l00201"></a>00201                         <span class="keyword">const</span> <span class="keywordtype">char</span> *iStr, <a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a> *oKeyCode,
<a name="l00202"></a>00202                         <a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a> *oCookedCode, <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a> *oModifiers);
<a name="l00203"></a>00203 
<a name="l00220"></a>00220   <span class="keyword">static</span> <span class="keywordtype">bool</span> ParseOther (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a>* reg, 
<a name="l00221"></a>00221                           <span class="keyword">const</span> <span class="keywordtype">char</span> *iStr, <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&amp;#39;s hierarchical name...">csEventID</a> *oType, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> *oDevice,
<a name="l00222"></a>00222                           <span class="keywordtype">int</span> *oNumeric, <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a> *oModifiers);
<a name="l00223"></a>00223 
<a name="l00235"></a>00235   <span class="keyword">static</span> <a class="code" href="classcsString.html" title="Thin wrapper around csStringFast&amp;lt;&amp;gt; with its default buffer size.">csString</a> GetKeyString (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a>* reg,
<a name="l00236"></a>00236                                 <a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a> code, <span class="keyword">const</span> <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a> *mods,
<a name="l00237"></a>00237                                 <span class="keywordtype">bool</span> distinguishModifiers = <span class="keyword">true</span>);
<a name="l00238"></a>00238 
<a name="l00253"></a>00253   <span class="keyword">static</span> <a class="code" href="classcsString.html" title="Thin wrapper around csStringFast&amp;lt;&amp;gt; with its default buffer size.">csString</a> GetOtherString (<a class="code" href="structiEventNameRegistry.html" title="This interface represents a general event name resolver.">iEventNameRegistry</a>* reg,
<a name="l00254"></a>00254                                   <a class="code" href="group__event__handling.html#g51e1762faeeefdadf693499fc93db757" title="A csEventID is a handle for a string representing an event&amp;#39;s hierarchical name...">csEventID</a> type, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> device, <span class="keywordtype">int</span> num, 
<a name="l00255"></a>00255                                   <span class="keyword">const</span> <a class="code" href="struct__csKeyModifiers.html" title="Flags for all currently pressed modifiers.">csKeyModifiers</a> *mods,
<a name="l00256"></a>00256                                   <span class="keywordtype">bool</span> distinguishModifiers = <span class="keyword">true</span>);
<a name="l00257"></a>00257 };
<a name="l00258"></a>00258 
<a name="l00263"></a>00263 <span class="keyword">template</span>&lt;&gt;
<a name="l00264"></a><a class="code" href="classcsComparator_3_01csInputDefinition_00_01csInputDefinition_01_4.html">00264</a> <span class="keyword">class </span><a class="code" href="classcsComparator.html" title="A template providing various comparison and ordering functions.">csComparator</a>&lt;<a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a>, <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a>&gt;
<a name="l00265"></a>00265 {
<a name="l00266"></a>00266 <span class="keyword">public</span>:
<a name="l00267"></a><a class="code" href="classcsComparator_3_01csInputDefinition_00_01csInputDefinition_01_4.html#8a75b3a9379471ec64fba61120a4c6ff">00267</a>   <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classcsComparator.html#91f6c9cfaa52ebbc6245dc0ba5f944d7" title="Compare two objects of the same type or different types (T1 and T2).">Compare</a> (<a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> <span class="keyword">const</span>&amp; r1, <a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> <span class="keyword">const</span>&amp; r2)
<a name="l00268"></a>00268   {
<a name="l00269"></a>00269     <span class="keywordflow">return</span> r1.<a class="code" href="classcsInputDefinition.html#5edd91c2fdf91e3879c0e0b72067acff" title="Returns a number indicating the relation of the two definitions.">Compare</a> (r2);
<a name="l00270"></a>00270   }
<a name="l00271"></a>00271 };
<a name="l00272"></a>00272 
<a name="l00277"></a>00277 <span class="keyword">template</span>&lt;&gt;
<a name="l00278"></a><a class="code" href="classcsHashComputer_3_01csInputDefinition_01_4.html">00278</a> <span class="keyword">class </span><a class="code" href="classcsHashComputer.html" title="Template for hash value computing.">csHashComputer</a>&lt;<a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a>&gt;
<a name="l00279"></a>00279 {
<a name="l00280"></a>00280 <span class="keyword">public</span>:
<a name="l00281"></a><a class="code" href="classcsHashComputer_3_01csInputDefinition_01_4.html#2e54ebcf62b4190c95d756162b7a2d7c">00281</a>   <span class="keyword">static</span> <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> <a class="code" href="classcsHashComputer.html#28098b758683db0027dd7fafb900096b" title="Compute a hash value for key.">ComputeHash</a> (<a class="code" href="classcsInputDefinition.html" title="This class holds a description of a physical source of input events, such as a keyboard...">csInputDefinition</a> <span class="keyword">const</span>&amp; key)
<a name="l00282"></a>00282   {
<a name="l00283"></a>00283     <span class="keywordflow">return</span> key.<a class="code" href="classcsInputDefinition.html#4953f1f757a0dbc759e24d377a8dc5a5" title="Generate a hash value from the object.">ComputeHash</a> (); 
<a name="l00284"></a>00284   }
<a name="l00285"></a>00285 };
<a name="l00286"></a>00286 
<a name="l00287"></a>00287 <span class="preprocessor">#endif // __CS_UTIL_INPUTDEF_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>