<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ITK: itkCommand.h Source File</title> <link href="DoxygenStyle.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Section customized for INSIGHT : Tue Jul 17 01:02:45 2001 --> <center> <a href="index.html" class="qindex">Main Page</a> <a href="modules.html" class="qindex">Groups</a> <a href="namespaces.html" class="qindex">Namespace List</a> <a href="hierarchy.html" class="qindex">Class Hierarchy</a> <a href="classes.html" class="qindex">Alphabetical List</a> <a href="annotated.html" class="qindex">Compound List</a> <a href="files.html" class="qindex">File List</a> <a href="namespacemembers.html" class="qindex">Namespace Members</a> <a href="functions.html" class="qindex">Compound Members</a> <a href="globals.html" class="qindex">File Members</a> <a href="pages.html" class="qindex">Concepts</a></center> <!-- Generated by Doxygen 1.5.9 --> <div class="navpath"><a class="el" href="dir_02e23d841c198393a6e961e9a0678fff.html">Code</a> » <a class="el" href="dir_ea7fc529ede9a38b0438cf13831ae873.html">Common</a> </div> <div class="contents"> <h1>itkCommand.h</h1><a href="itkCommand_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"></span> <a name="l00003"></a>00003 <span class="comment"> Program: Insight Segmentation & Registration Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: itkCommand.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> Language: C++</span> <a name="l00006"></a>00006 <span class="comment"> Date: $Date: 2007-01-26 14:28:44 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.36 $</span> <a name="l00008"></a>00008 <span class="comment"></span> <a name="l00009"></a>00009 <span class="comment"> Copyright (c) Insight Software Consortium. All rights reserved.</span> <a name="l00010"></a>00010 <span class="comment"> See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.</span> <a name="l00011"></a>00011 <span class="comment"></span> <a name="l00012"></a>00012 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even </span> <a name="l00013"></a>00013 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR </span> <a name="l00014"></a>00014 <span class="comment"> PURPOSE. See the above copyright notices for more information.</span> <a name="l00015"></a>00015 <span class="comment"></span> <a name="l00016"></a>00016 <span class="comment">=========================================================================*/</span> <a name="l00017"></a>00017 <span class="preprocessor">#ifndef __itkCommand_h</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkCommand_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="itkObject_8h.html">itkObject.h</a>"</span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="itkObjectFactory_8h.html">itkObjectFactory.h</a>"</span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="keyword">namespace </span>itk <a name="l00025"></a>00025 { <a name="l00026"></a>00026 <a name="l00039"></a>00039 <span class="comment">// The superclass that all commands should be subclasses of</span> <a name="l00040"></a><a class="code" href="classitk_1_1Command.html">00040</a> <span class="keyword">class </span><a class="code" href="itkWin32Header_8h.html#faefe352c9fb4179f5a770afc70ea90f">ITKCommon_EXPORT</a> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> <a name="l00041"></a>00041 { <a name="l00042"></a>00042 <span class="keyword">public</span>: <a name="l00044"></a><a class="code" href="classitk_1_1Command.html#e0f103466a584f2d976e90bc4e0cd608">00044</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>; <a name="l00045"></a><a class="code" href="classitk_1_1Command.html#d57000a50c940955a2fe7f2b90db75ed">00045</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Superclass</a>; <a name="l00046"></a><a class="code" href="classitk_1_1Command.html#fd9f53bfc5e3295cb80e282abe687318">00046</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<Self></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00047"></a><a class="code" href="classitk_1_1Command.html#585071d2bfabc7a44e1985ee431c339c">00047</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<const Self></a> <a class="code" href="classitk_1_1SmartPointer.html">ConstPointer</a>; <a name="l00048"></a>00048 <a name="l00050"></a>00050 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>,<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a>); <a name="l00051"></a>00051 <a name="l00053"></a>00053 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Execute(<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *caller, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & event ) = 0; <a name="l00054"></a>00054 <a name="l00058"></a>00058 <span class="keyword">virtual</span> <span class="keywordtype">void</span> Execute(<span class="keyword">const</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *caller, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & event ) = 0; <a name="l00059"></a>00059 <a name="l00060"></a>00060 <span class="keyword">protected</span>: <a name="l00061"></a>00061 <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>(); <a name="l00062"></a>00062 ~<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>(); <a name="l00063"></a>00063 <a name="l00064"></a>00064 <span class="keyword">private</span>: <a name="l00065"></a>00065 <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00066"></a>00066 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00067"></a>00067 }; <a name="l00068"></a>00068 <a name="l00069"></a>00069 <a name="l00070"></a>00070 <span class="comment">// some implementations for several callback types</span> <a name="l00071"></a>00071 <a name="l00080"></a>00080 <span class="keyword">template</span> <<span class="keyword">class</span> T> <a name="l00081"></a><a class="code" href="classitk_1_1MemberCommand.html">00081</a> <span class="keyword">class </span><a class="code" href="classitk_1_1MemberCommand.html" title="Command subclass that calls a pointer to a member function.">MemberCommand</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a> <a name="l00082"></a>00082 { <a name="l00083"></a>00083 <span class="keyword">public</span>: <a name="l00085"></a><a class="code" href="classitk_1_1MemberCommand.html#546a5f714c4b793b614f18c3603370d7">00085</a> <span class="keyword">typedef</span> void (T::*<a class="code" href="classitk_1_1MemberCommand.html#546a5f714c4b793b614f18c3603370d7">TMemberFunctionPointer</a>)(<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a>*, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> &); <a name="l00086"></a><a class="code" href="classitk_1_1MemberCommand.html#6f3f14b6d35f6c53484df11f6affa891">00086</a> <span class="keyword">typedef</span> void (T::*<a class="code" href="classitk_1_1MemberCommand.html#6f3f14b6d35f6c53484df11f6affa891">TConstMemberFunctionPointer</a>)(<span class="keyword">const</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a>*, <a name="l00087"></a>00087 <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> &); <a name="l00089"></a>00089 <a name="l00091"></a><a class="code" href="classitk_1_1MemberCommand.html#894f0a99128553bdd8e413d7f13ca279">00091</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1MemberCommand.html" title="Command subclass that calls a pointer to a member function.">MemberCommand</a> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>; <a name="l00092"></a><a class="code" href="classitk_1_1MemberCommand.html#434c8677866fe86f70f9eda981d93a47">00092</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<Self></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00093"></a>00093 <a name="l00095"></a>00095 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>); <a name="l00096"></a>00096 <a name="l00098"></a>00098 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1MemberCommand.html" title="Command subclass that calls a pointer to a member function.">MemberCommand</a>,<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>); <a name="l00099"></a>00099 <a name="l00102"></a><a class="code" href="classitk_1_1MemberCommand.html#51a85ac0a9ff799d0ad0e56f6790d76e">00102</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1MemberCommand.html#51a85ac0a9ff799d0ad0e56f6790d76e">SetCallbackFunction</a>(T* <span class="keywordtype">object</span>, <a name="l00103"></a>00103 <a class="code" href="classitk_1_1MemberCommand.html#546a5f714c4b793b614f18c3603370d7">TMemberFunctionPointer</a> memberFunction) <a name="l00104"></a>00104 { <a name="l00105"></a>00105 <a class="code" href="classitk_1_1MemberCommand.html#091d22b7424b7bc406c12c74fb4730da">m_This</a> = object; <a name="l00106"></a>00106 <a class="code" href="classitk_1_1MemberCommand.html#e48b56cba3955b713890085249a28d44">m_MemberFunction</a> = memberFunction; <a name="l00107"></a>00107 } <a name="l00108"></a><a class="code" href="classitk_1_1MemberCommand.html#56ec72b27274bd8db8fbc93cb1a6066c">00108</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1MemberCommand.html#51a85ac0a9ff799d0ad0e56f6790d76e">SetCallbackFunction</a>(T* <span class="keywordtype">object</span>, <a name="l00109"></a>00109 <a class="code" href="classitk_1_1MemberCommand.html#6f3f14b6d35f6c53484df11f6affa891">TConstMemberFunctionPointer</a> memberFunction) <a name="l00110"></a>00110 { <a name="l00111"></a>00111 <a class="code" href="classitk_1_1MemberCommand.html#091d22b7424b7bc406c12c74fb4730da">m_This</a> = object; <a name="l00112"></a>00112 <a class="code" href="classitk_1_1MemberCommand.html#fb427fa001acc962b077ba59cf80c497">m_ConstMemberFunction</a> = memberFunction; <a name="l00113"></a>00113 } <a name="l00115"></a>00115 <a name="l00117"></a><a class="code" href="classitk_1_1MemberCommand.html#88d1ad4fc75be67a623dc3c2ce62c4d5">00117</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1MemberCommand.html#88d1ad4fc75be67a623dc3c2ce62c4d5">Execute</a>(<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *caller, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & event ) <a name="l00118"></a>00118 { <a name="l00119"></a>00119 <span class="keywordflow">if</span>( <a class="code" href="classitk_1_1MemberCommand.html#e48b56cba3955b713890085249a28d44">m_MemberFunction</a> ) <a name="l00120"></a>00120 { <a name="l00121"></a>00121 ((*m_This).*(<a class="code" href="classitk_1_1MemberCommand.html#e48b56cba3955b713890085249a28d44">m_MemberFunction</a>))(caller, event); <a name="l00122"></a>00122 } <a name="l00123"></a>00123 } <a name="l00125"></a>00125 <a name="l00127"></a><a class="code" href="classitk_1_1MemberCommand.html#b0bcef8a8c146e37c2e975c38f30c23d">00127</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1MemberCommand.html#88d1ad4fc75be67a623dc3c2ce62c4d5">Execute</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *caller, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & event ) <a name="l00128"></a>00128 { <a name="l00129"></a>00129 <span class="keywordflow">if</span>( <a class="code" href="classitk_1_1MemberCommand.html#fb427fa001acc962b077ba59cf80c497">m_ConstMemberFunction</a> ) <a name="l00130"></a>00130 { <a name="l00131"></a>00131 ((*m_This).*(<a class="code" href="classitk_1_1MemberCommand.html#fb427fa001acc962b077ba59cf80c497">m_ConstMemberFunction</a>))(caller, event); <a name="l00132"></a>00132 } <a name="l00133"></a>00133 } <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="keyword">protected</span>: <a name="l00137"></a>00137 <a name="l00138"></a><a class="code" href="classitk_1_1MemberCommand.html#091d22b7424b7bc406c12c74fb4730da">00138</a> T* <a class="code" href="classitk_1_1MemberCommand.html#091d22b7424b7bc406c12c74fb4730da">m_This</a>; <a name="l00139"></a><a class="code" href="classitk_1_1MemberCommand.html#e48b56cba3955b713890085249a28d44">00139</a> <a class="code" href="classitk_1_1MemberCommand.html#546a5f714c4b793b614f18c3603370d7">TMemberFunctionPointer</a> <a class="code" href="classitk_1_1MemberCommand.html#e48b56cba3955b713890085249a28d44">m_MemberFunction</a>; <a name="l00140"></a><a class="code" href="classitk_1_1MemberCommand.html#fb427fa001acc962b077ba59cf80c497">00140</a> <a class="code" href="classitk_1_1MemberCommand.html#6f3f14b6d35f6c53484df11f6affa891">TConstMemberFunctionPointer</a> <a class="code" href="classitk_1_1MemberCommand.html#fb427fa001acc962b077ba59cf80c497">m_ConstMemberFunction</a>; <a name="l00141"></a><a class="code" href="classitk_1_1MemberCommand.html#b4098ba226edb253e58363d56d7cc7e0">00141</a> <a class="code" href="classitk_1_1MemberCommand.html#b4098ba226edb253e58363d56d7cc7e0">MemberCommand</a>():<a class="code" href="classitk_1_1MemberCommand.html#e48b56cba3955b713890085249a28d44">m_MemberFunction</a>(0),<a class="code" href="classitk_1_1MemberCommand.html#fb427fa001acc962b077ba59cf80c497">m_ConstMemberFunction</a>(0) {} <a name="l00142"></a><a class="code" href="classitk_1_1MemberCommand.html#0059868153c5c0316bd96429e13a7940">00142</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1MemberCommand.html#0059868153c5c0316bd96429e13a7940">~MemberCommand</a>(){} <a name="l00143"></a>00143 <a name="l00144"></a>00144 <span class="keyword">private</span>: <a name="l00145"></a>00145 <a class="code" href="classitk_1_1MemberCommand.html#b4098ba226edb253e58363d56d7cc7e0">MemberCommand</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1MemberCommand.html#894f0a99128553bdd8e413d7f13ca279">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00146"></a>00146 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="classitk_1_1MemberCommand.html#894f0a99128553bdd8e413d7f13ca279">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00147"></a>00147 <a name="l00148"></a>00148 }; <a name="l00149"></a>00149 <a name="l00150"></a>00150 <a name="l00159"></a>00159 <span class="keyword">template</span> <<span class="keyword">class</span> T> <a name="l00160"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html">00160</a> <span class="keyword">class </span><a class="code" href="classitk_1_1ReceptorMemberCommand.html" title="Command subclass that calls a pointer to a member function.">ReceptorMemberCommand</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a> <a name="l00161"></a>00161 { <a name="l00162"></a>00162 <span class="keyword">public</span>: <a name="l00164"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#4d370fc504966e116a6bf32174241dc9">00164</a> <span class="keyword">typedef</span> void (T::*<a class="code" href="classitk_1_1ReceptorMemberCommand.html#4d370fc504966e116a6bf32174241dc9">TMemberFunctionPointer</a>)(<span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> &); <a name="l00165"></a>00165 <a name="l00167"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#226ff5b7d0e821b034aedef033c83550">00167</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1ReceptorMemberCommand.html" title="Command subclass that calls a pointer to a member function.">ReceptorMemberCommand</a> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>; <a name="l00168"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#342a5feb7d476da1f8544842ed270928">00168</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<Self></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00169"></a>00169 <a name="l00171"></a>00171 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>); <a name="l00172"></a>00172 <a name="l00174"></a>00174 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1ReceptorMemberCommand.html" title="Command subclass that calls a pointer to a member function.">ReceptorMemberCommand</a>,<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>); <a name="l00175"></a>00175 <a name="l00178"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#951e96cf9a8bccdd58369d75c2fc0ccf">00178</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#951e96cf9a8bccdd58369d75c2fc0ccf">SetCallbackFunction</a>(T* <span class="keywordtype">object</span>, <a name="l00179"></a>00179 <a class="code" href="classitk_1_1ReceptorMemberCommand.html#4d370fc504966e116a6bf32174241dc9">TMemberFunctionPointer</a> memberFunction) <a name="l00180"></a>00180 { <a name="l00181"></a>00181 <a class="code" href="classitk_1_1ReceptorMemberCommand.html#12a961e0c6349827ec4186e2f90f9efb">m_This</a> = object; <a name="l00182"></a>00182 <a class="code" href="classitk_1_1ReceptorMemberCommand.html#b99a0386a023aa2c5b1b9b62437e0680">m_MemberFunction</a> = memberFunction; <a name="l00183"></a>00183 } <a name="l00184"></a>00184 <a name="l00186"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#2ea1c32f96817f1f8282d0ceed8dbee3">00186</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#2ea1c32f96817f1f8282d0ceed8dbee3">Execute</a>(<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & event ) <a name="l00187"></a>00187 { <a name="l00188"></a>00188 <span class="keywordflow">if</span>( <a class="code" href="classitk_1_1ReceptorMemberCommand.html#b99a0386a023aa2c5b1b9b62437e0680">m_MemberFunction</a> ) <a name="l00189"></a>00189 { <a name="l00190"></a>00190 ((*m_This).*(<a class="code" href="classitk_1_1ReceptorMemberCommand.html#b99a0386a023aa2c5b1b9b62437e0680">m_MemberFunction</a>))(event); <a name="l00191"></a>00191 } <a name="l00192"></a>00192 } <a name="l00194"></a>00194 <a name="l00196"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#08fc713178dee0d59a460a9583328492">00196</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#2ea1c32f96817f1f8282d0ceed8dbee3">Execute</a>( <span class="keyword">const</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & event ) <a name="l00197"></a>00197 { <a name="l00198"></a>00198 <span class="keywordflow">if</span>( <a class="code" href="classitk_1_1ReceptorMemberCommand.html#b99a0386a023aa2c5b1b9b62437e0680">m_MemberFunction</a> ) <a name="l00199"></a>00199 { <a name="l00200"></a>00200 ((*m_This).*(<a class="code" href="classitk_1_1ReceptorMemberCommand.html#b99a0386a023aa2c5b1b9b62437e0680">m_MemberFunction</a>))(event); <a name="l00201"></a>00201 } <a name="l00202"></a>00202 } <a name="l00204"></a>00204 <a name="l00205"></a>00205 <span class="keyword">protected</span>: <a name="l00206"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#12a961e0c6349827ec4186e2f90f9efb">00206</a> T* <a class="code" href="classitk_1_1ReceptorMemberCommand.html#12a961e0c6349827ec4186e2f90f9efb">m_This</a>; <a name="l00207"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#b99a0386a023aa2c5b1b9b62437e0680">00207</a> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#4d370fc504966e116a6bf32174241dc9">TMemberFunctionPointer</a> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#b99a0386a023aa2c5b1b9b62437e0680">m_MemberFunction</a>; <a name="l00208"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#5f66a957a55a653a3f6ac57aaf530042">00208</a> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#5f66a957a55a653a3f6ac57aaf530042">ReceptorMemberCommand</a>():<a class="code" href="classitk_1_1ReceptorMemberCommand.html#b99a0386a023aa2c5b1b9b62437e0680">m_MemberFunction</a>(0) {} <a name="l00209"></a><a class="code" href="classitk_1_1ReceptorMemberCommand.html#588baffbb4668508bd1697f56a523262">00209</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#588baffbb4668508bd1697f56a523262">~ReceptorMemberCommand</a>() {} <a name="l00210"></a>00210 <a name="l00211"></a>00211 <span class="keyword">private</span>: <a name="l00212"></a>00212 <a class="code" href="classitk_1_1ReceptorMemberCommand.html#5f66a957a55a653a3f6ac57aaf530042">ReceptorMemberCommand</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#226ff5b7d0e821b034aedef033c83550">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00213"></a>00213 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="classitk_1_1ReceptorMemberCommand.html#226ff5b7d0e821b034aedef033c83550">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00214"></a>00214 <a name="l00215"></a>00215 }; <a name="l00216"></a>00216 <a name="l00217"></a>00217 <a name="l00226"></a>00226 <span class="keyword">template</span> <<span class="keyword">class</span> T> <a name="l00227"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html">00227</a> <span class="keyword">class </span><a class="code" href="classitk_1_1SimpleMemberCommand.html" title="Command subclass that calls a pointer to a member function.">SimpleMemberCommand</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a> <a name="l00228"></a>00228 { <a name="l00229"></a>00229 <span class="keyword">public</span>: <a name="l00231"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#a9822eb94d2ab714d65ce79a600fff38">00231</a> <span class="keyword">typedef</span> void (T::*<a class="code" href="classitk_1_1SimpleMemberCommand.html#a9822eb94d2ab714d65ce79a600fff38">TMemberFunctionPointer</a>)(); <a name="l00232"></a>00232 <a name="l00234"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#bc041578565c249708441835bcc41842">00234</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SimpleMemberCommand.html" title="Command subclass that calls a pointer to a member function.">SimpleMemberCommand</a> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>; <a name="l00235"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#4919e0ee2977236c3cd1019e5f9b4fae">00235</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<Self></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00236"></a>00236 <a name="l00238"></a>00238 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1SimpleMemberCommand.html" title="Command subclass that calls a pointer to a member function.">SimpleMemberCommand</a>,<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>); <a name="l00239"></a>00239 <a name="l00241"></a>00241 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>); <a name="l00242"></a>00242 <a name="l00244"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#5ba8979dd11dba4ae11d48cb3502e13a">00244</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1SimpleMemberCommand.html#5ba8979dd11dba4ae11d48cb3502e13a">SetCallbackFunction</a>(T* <span class="keywordtype">object</span>, <a name="l00245"></a>00245 <a class="code" href="classitk_1_1SimpleMemberCommand.html#a9822eb94d2ab714d65ce79a600fff38">TMemberFunctionPointer</a> memberFunction) <a name="l00246"></a>00246 { <a name="l00247"></a>00247 <a class="code" href="classitk_1_1SimpleMemberCommand.html#5bfd5e4129f2dad5c3835f72c4fa7ce1">m_This</a> = object; <a name="l00248"></a>00248 <a class="code" href="classitk_1_1SimpleMemberCommand.html#2e26c2b383e421a73d7462ab594d9c2b">m_MemberFunction</a> = memberFunction; <a name="l00249"></a>00249 } <a name="l00250"></a>00250 <a name="l00252"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#5259d47269a9ecfd3241a49282ab8d57">00252</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1SimpleMemberCommand.html#5259d47269a9ecfd3241a49282ab8d57">Execute</a>(<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *,<span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & ) <a name="l00253"></a>00253 { <a name="l00254"></a>00254 <span class="keywordflow">if</span>( <a class="code" href="classitk_1_1SimpleMemberCommand.html#2e26c2b383e421a73d7462ab594d9c2b">m_MemberFunction</a> ) <a name="l00255"></a>00255 { <a name="l00256"></a>00256 ((*m_This).*(<a class="code" href="classitk_1_1SimpleMemberCommand.html#2e26c2b383e421a73d7462ab594d9c2b">m_MemberFunction</a>))(); <a name="l00257"></a>00257 } <a name="l00258"></a>00258 } <a name="l00259"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#8b0b82ea0ed5428b0d95e4d65e73914d">00259</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1SimpleMemberCommand.html#5259d47269a9ecfd3241a49282ab8d57">Execute</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *,<span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & ) <a name="l00260"></a>00260 { <a name="l00261"></a>00261 <span class="keywordflow">if</span>( <a class="code" href="classitk_1_1SimpleMemberCommand.html#2e26c2b383e421a73d7462ab594d9c2b">m_MemberFunction</a> ) <a name="l00262"></a>00262 { <a name="l00263"></a>00263 ((*m_This).*(<a class="code" href="classitk_1_1SimpleMemberCommand.html#2e26c2b383e421a73d7462ab594d9c2b">m_MemberFunction</a>))(); <a name="l00264"></a>00264 } <a name="l00265"></a>00265 } <a name="l00267"></a>00267 <a name="l00268"></a>00268 <span class="keyword">protected</span>: <a name="l00269"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#5bfd5e4129f2dad5c3835f72c4fa7ce1">00269</a> T* <a class="code" href="classitk_1_1SimpleMemberCommand.html#5bfd5e4129f2dad5c3835f72c4fa7ce1">m_This</a>; <a name="l00270"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#2e26c2b383e421a73d7462ab594d9c2b">00270</a> <a class="code" href="classitk_1_1SimpleMemberCommand.html#a9822eb94d2ab714d65ce79a600fff38">TMemberFunctionPointer</a> <a class="code" href="classitk_1_1SimpleMemberCommand.html#2e26c2b383e421a73d7462ab594d9c2b">m_MemberFunction</a>; <a name="l00271"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#b87c0a278761b6d0c73118eb98fc13bc">00271</a> <a class="code" href="classitk_1_1SimpleMemberCommand.html#b87c0a278761b6d0c73118eb98fc13bc">SimpleMemberCommand</a>():<a class="code" href="classitk_1_1SimpleMemberCommand.html#2e26c2b383e421a73d7462ab594d9c2b">m_MemberFunction</a>(0) {} <a name="l00272"></a><a class="code" href="classitk_1_1SimpleMemberCommand.html#6c1b8b5e3eb5929d868b601f608b6d87">00272</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1SimpleMemberCommand.html#6c1b8b5e3eb5929d868b601f608b6d87">~SimpleMemberCommand</a>() {} <a name="l00273"></a>00273 <a name="l00274"></a>00274 <span class="keyword">private</span>: <a name="l00275"></a>00275 <a class="code" href="classitk_1_1SimpleMemberCommand.html#b87c0a278761b6d0c73118eb98fc13bc">SimpleMemberCommand</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1SimpleMemberCommand.html#bc041578565c249708441835bcc41842">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00276"></a>00276 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="classitk_1_1SimpleMemberCommand.html#bc041578565c249708441835bcc41842">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00277"></a>00277 <a name="l00278"></a>00278 }; <a name="l00279"></a>00279 <a name="l00280"></a>00280 <a name="l00289"></a>00289 <span class="keyword">template</span> <<span class="keyword">class</span> T> <a name="l00290"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html">00290</a> <span class="keyword">class </span><a class="code" href="classitk_1_1SimpleConstMemberCommand.html" title="Command subclass that calls a pointer to a member function.">SimpleConstMemberCommand</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a> <a name="l00291"></a>00291 { <a name="l00292"></a>00292 <span class="keyword">public</span>: <a name="l00294"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#512fcedd868cbf649805dcdfcd23c082">00294</a> <span class="keyword">typedef</span> void (T::*<a class="code" href="classitk_1_1SimpleConstMemberCommand.html#512fcedd868cbf649805dcdfcd23c082">TMemberFunctionPointer</a>)() <span class="keyword">const</span>; <a name="l00295"></a>00295 <a name="l00297"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#58d4a9f43763c033672a1b3f0eed35ca">00297</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html" title="Command subclass that calls a pointer to a member function.">SimpleConstMemberCommand</a> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>; <a name="l00298"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#28e6edd115920e96a8365672c0c82702">00298</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<Self></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00299"></a>00299 <a name="l00301"></a>00301 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1SimpleConstMemberCommand.html" title="Command subclass that calls a pointer to a member function.">SimpleConstMemberCommand</a>,<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>); <a name="l00302"></a>00302 <a name="l00304"></a>00304 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>); <a name="l00305"></a>00305 <a name="l00307"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#da7367f04606e66ecb475b8b2dd1b548">00307</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#da7367f04606e66ecb475b8b2dd1b548">SetCallbackFunction</a>(<span class="keyword">const</span> T* <span class="keywordtype">object</span>, <a name="l00308"></a>00308 <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#512fcedd868cbf649805dcdfcd23c082">TMemberFunctionPointer</a> memberFunction) <a name="l00309"></a>00309 { <a name="l00310"></a>00310 <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#073e3acd0452776411276e66df3055f9">m_This</a> = object; <a name="l00311"></a>00311 <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#dfe779ea0fea9e282dc1cbafc1f164e0">m_MemberFunction</a> = memberFunction; <a name="l00312"></a>00312 } <a name="l00313"></a>00313 <a name="l00315"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#7a9a1d59b7a52537a756513a69b18ede">00315</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#7a9a1d59b7a52537a756513a69b18ede">Execute</a>(<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *,<span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & ) <a name="l00316"></a>00316 { <a name="l00317"></a>00317 <span class="keywordflow">if</span>( <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#dfe779ea0fea9e282dc1cbafc1f164e0">m_MemberFunction</a> ) <a name="l00318"></a>00318 { <a name="l00319"></a>00319 ((*m_This).*(<a class="code" href="classitk_1_1SimpleConstMemberCommand.html#dfe779ea0fea9e282dc1cbafc1f164e0">m_MemberFunction</a>))(); <a name="l00320"></a>00320 } <a name="l00321"></a>00321 } <a name="l00322"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#0fd267f94c59e48ba2faf4d23dd4521b">00322</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#7a9a1d59b7a52537a756513a69b18ede">Execute</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *,<span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & ) <a name="l00323"></a>00323 { <a name="l00324"></a>00324 <span class="keywordflow">if</span>( <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#dfe779ea0fea9e282dc1cbafc1f164e0">m_MemberFunction</a> ) <a name="l00325"></a>00325 { <a name="l00326"></a>00326 ((*m_This).*(<a class="code" href="classitk_1_1SimpleConstMemberCommand.html#dfe779ea0fea9e282dc1cbafc1f164e0">m_MemberFunction</a>))(); <a name="l00327"></a>00327 } <a name="l00328"></a>00328 } <a name="l00330"></a>00330 <a name="l00331"></a>00331 <span class="keyword">protected</span>: <a name="l00332"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#073e3acd0452776411276e66df3055f9">00332</a> <span class="keyword">const</span> T* <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#073e3acd0452776411276e66df3055f9">m_This</a>; <a name="l00333"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#dfe779ea0fea9e282dc1cbafc1f164e0">00333</a> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#512fcedd868cbf649805dcdfcd23c082">TMemberFunctionPointer</a> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#dfe779ea0fea9e282dc1cbafc1f164e0">m_MemberFunction</a>; <a name="l00334"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#bdf5c71d010d819266147194b21e8489">00334</a> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#bdf5c71d010d819266147194b21e8489">SimpleConstMemberCommand</a>():<a class="code" href="classitk_1_1SimpleConstMemberCommand.html#dfe779ea0fea9e282dc1cbafc1f164e0">m_MemberFunction</a>(0) {} <a name="l00335"></a><a class="code" href="classitk_1_1SimpleConstMemberCommand.html#d8f5cc4cf13a17e8db3b5d7aa6af9939">00335</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#d8f5cc4cf13a17e8db3b5d7aa6af9939">~SimpleConstMemberCommand</a>() {} <a name="l00336"></a>00336 <a name="l00337"></a>00337 <span class="keyword">private</span>: <a name="l00338"></a>00338 <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#bdf5c71d010d819266147194b21e8489">SimpleConstMemberCommand</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#58d4a9f43763c033672a1b3f0eed35ca">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00339"></a>00339 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="classitk_1_1SimpleConstMemberCommand.html#58d4a9f43763c033672a1b3f0eed35ca">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00340"></a>00340 <a name="l00341"></a>00341 }; <a name="l00342"></a>00342 <a name="l00343"></a>00343 <a name="l00355"></a><a class="code" href="classitk_1_1CStyleCommand.html">00355</a> <span class="keyword">class </span><a class="code" href="classitk_1_1CStyleCommand.html" title="Command subclass that calls a pointer to a C function.">CStyleCommand</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a> <a name="l00356"></a>00356 { <a name="l00357"></a>00357 <span class="keyword">public</span>: <a name="l00359"></a><a class="code" href="classitk_1_1CStyleCommand.html#e050844175fa7042483508709a24f1e4">00359</a> <span class="keyword">typedef</span> void (*<a class="code" href="classitk_1_1CStyleCommand.html#e050844175fa7042483508709a24f1e4">FunctionPointer</a>)(<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a>*, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> &, <span class="keywordtype">void</span>*); <a name="l00360"></a><a class="code" href="classitk_1_1CStyleCommand.html#1e34a34f7765aee5ab02721dd1889930">00360</a> <span class="keyword">typedef</span> void (*<a class="code" href="classitk_1_1CStyleCommand.html#1e34a34f7765aee5ab02721dd1889930">ConstFunctionPointer</a>)(<span class="keyword">const</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a>*, <a name="l00361"></a>00361 <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> &, <span class="keywordtype">void</span>*); <a name="l00362"></a><a class="code" href="classitk_1_1CStyleCommand.html#42f208d9e854fbf8d94bd2dc6bbe534b">00362</a> <span class="keyword">typedef</span> void (*<a class="code" href="classitk_1_1CStyleCommand.html#42f208d9e854fbf8d94bd2dc6bbe534b">DeleteDataFunctionPointer</a>)(<span class="keywordtype">void</span>*); <a name="l00364"></a>00364 <a name="l00366"></a><a class="code" href="classitk_1_1CStyleCommand.html#189eaaee5db7369ed77015af6919c4eb">00366</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1CStyleCommand.html" title="Command subclass that calls a pointer to a C function.">CStyleCommand</a> <a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>; <a name="l00367"></a><a class="code" href="classitk_1_1CStyleCommand.html#aa6df0ced422c7ffb2034faaa24439a7">00367</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<Self></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00368"></a>00368 <a name="l00370"></a>00370 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1CStyleCommand.html" title="Command subclass that calls a pointer to a C function.">CStyleCommand</a>,<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Command</a>); <a name="l00371"></a>00371 <a name="l00373"></a>00373 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1Command.html" title="superclass for callback/observer methods">Self</a>); <a name="l00374"></a>00374 <a name="l00377"></a><a class="code" href="classitk_1_1CStyleCommand.html#c279690f632a0ca72c70f03c13f177da">00377</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1CStyleCommand.html#c279690f632a0ca72c70f03c13f177da">SetClientData</a>(<span class="keywordtype">void</span> *cd) {<a class="code" href="classitk_1_1CStyleCommand.html#93e5f638470c84eaacba0a1c48c8c83f">m_ClientData</a> = cd;} <a name="l00378"></a>00378 <a name="l00380"></a><a class="code" href="classitk_1_1CStyleCommand.html#8f6adbde9b668f8a77bb846dcdcd6d42">00380</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1CStyleCommand.html#8f6adbde9b668f8a77bb846dcdcd6d42">SetCallback</a>(<a class="code" href="classitk_1_1CStyleCommand.html#e050844175fa7042483508709a24f1e4">FunctionPointer</a> f) <a name="l00381"></a>00381 {<a class="code" href="classitk_1_1CStyleCommand.html#472a4c3ed522e43e350fd7446bc37824">m_Callback</a> = f;} <a name="l00382"></a><a class="code" href="classitk_1_1CStyleCommand.html#a1222ed9fe6c578b41e1631de13519aa">00382</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1CStyleCommand.html#a1222ed9fe6c578b41e1631de13519aa">SetConstCallback</a>(<a class="code" href="classitk_1_1CStyleCommand.html#1e34a34f7765aee5ab02721dd1889930">ConstFunctionPointer</a> f) <a name="l00383"></a>00383 {<a class="code" href="classitk_1_1CStyleCommand.html#256985611694d19ef81dd8363b10d62f">m_ConstCallback</a> = f;} <a name="l00385"></a>00385 <a name="l00387"></a><a class="code" href="classitk_1_1CStyleCommand.html#f531712288b9cde2a521c4ee45c802fb">00387</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1CStyleCommand.html#f531712288b9cde2a521c4ee45c802fb">SetClientDataDeleteCallback</a>(<a class="code" href="classitk_1_1CStyleCommand.html#42f208d9e854fbf8d94bd2dc6bbe534b">DeleteDataFunctionPointer</a> f) <a name="l00388"></a>00388 {<a class="code" href="classitk_1_1CStyleCommand.html#824be15c7e893719d154572145cedf7f">m_ClientDataDeleteCallback</a> = f;} <a name="l00389"></a>00389 <a name="l00391"></a><a class="code" href="classitk_1_1CStyleCommand.html#83fde996fe452506b3eab32322e18023">00391</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1CStyleCommand.html#83fde996fe452506b3eab32322e18023">Execute</a>(<a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *caller, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & event ) <a name="l00392"></a>00392 { <a name="l00393"></a>00393 <span class="keywordflow">if</span> (<a class="code" href="classitk_1_1CStyleCommand.html#472a4c3ed522e43e350fd7446bc37824">m_Callback</a>) <a name="l00394"></a>00394 { <a name="l00395"></a>00395 <a class="code" href="classitk_1_1CStyleCommand.html#472a4c3ed522e43e350fd7446bc37824">m_Callback</a>(caller, event, <a class="code" href="classitk_1_1CStyleCommand.html#93e5f638470c84eaacba0a1c48c8c83f">m_ClientData</a> ); <a name="l00396"></a>00396 } <a name="l00397"></a>00397 } <a name="l00399"></a>00399 <a name="l00401"></a><a class="code" href="classitk_1_1CStyleCommand.html#12375a8a0454ae214e1b70f1d543467a">00401</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1CStyleCommand.html#83fde996fe452506b3eab32322e18023">Execute</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> *caller, <span class="keyword">const</span> <a class="code" href="classitk_1_1EventObject.html" title="Abstraction of the Events used to communicating among filters and with GUIs.">EventObject</a> & event ) <a name="l00402"></a>00402 { <a name="l00403"></a>00403 <span class="keywordflow">if</span> (<a class="code" href="classitk_1_1CStyleCommand.html#256985611694d19ef81dd8363b10d62f">m_ConstCallback</a>) <a name="l00404"></a>00404 { <a name="l00405"></a>00405 <a class="code" href="classitk_1_1CStyleCommand.html#256985611694d19ef81dd8363b10d62f">m_ConstCallback</a>(caller, event, <a class="code" href="classitk_1_1CStyleCommand.html#93e5f638470c84eaacba0a1c48c8c83f">m_ClientData</a> ); <a name="l00406"></a>00406 } <a name="l00407"></a>00407 } <a name="l00409"></a>00409 <a name="l00410"></a>00410 <span class="keyword">protected</span>: <a name="l00411"></a><a class="code" href="classitk_1_1CStyleCommand.html#0869a468c68a040cd63e6c1a510b46da">00411</a> <a class="code" href="classitk_1_1CStyleCommand.html#0869a468c68a040cd63e6c1a510b46da">CStyleCommand</a>(): <a class="code" href="classitk_1_1CStyleCommand.html#93e5f638470c84eaacba0a1c48c8c83f">m_ClientData</a>(0), <a class="code" href="classitk_1_1CStyleCommand.html#472a4c3ed522e43e350fd7446bc37824">m_Callback</a>(0), <a class="code" href="classitk_1_1CStyleCommand.html#256985611694d19ef81dd8363b10d62f">m_ConstCallback</a>(0), <a name="l00412"></a>00412 <a class="code" href="classitk_1_1CStyleCommand.html#824be15c7e893719d154572145cedf7f">m_ClientDataDeleteCallback</a>(0) <a name="l00413"></a>00413 { <a name="l00414"></a>00414 <span class="comment">// not implemented</span> <a name="l00415"></a>00415 } <a name="l00416"></a><a class="code" href="classitk_1_1CStyleCommand.html#9fe5d1935f7b03300c9f2c94a798ee81">00416</a> <a class="code" href="classitk_1_1CStyleCommand.html#9fe5d1935f7b03300c9f2c94a798ee81">~CStyleCommand</a>() <a name="l00417"></a>00417 { <a name="l00418"></a>00418 <span class="keywordflow">if</span> (<a class="code" href="classitk_1_1CStyleCommand.html#824be15c7e893719d154572145cedf7f">m_ClientDataDeleteCallback</a>) <a name="l00419"></a>00419 { <a name="l00420"></a>00420 <a class="code" href="classitk_1_1CStyleCommand.html#824be15c7e893719d154572145cedf7f">m_ClientDataDeleteCallback</a>(<a class="code" href="classitk_1_1CStyleCommand.html#93e5f638470c84eaacba0a1c48c8c83f">m_ClientData</a>); <a name="l00421"></a>00421 } <a name="l00422"></a>00422 } <a name="l00423"></a>00423 <a name="l00424"></a><a class="code" href="classitk_1_1CStyleCommand.html#93e5f638470c84eaacba0a1c48c8c83f">00424</a> <span class="keywordtype">void</span> * <a class="code" href="classitk_1_1CStyleCommand.html#93e5f638470c84eaacba0a1c48c8c83f">m_ClientData</a>; <a name="l00425"></a><a class="code" href="classitk_1_1CStyleCommand.html#472a4c3ed522e43e350fd7446bc37824">00425</a> <a class="code" href="classitk_1_1CStyleCommand.html#e050844175fa7042483508709a24f1e4">FunctionPointer</a> <a class="code" href="classitk_1_1CStyleCommand.html#472a4c3ed522e43e350fd7446bc37824">m_Callback</a>; <a name="l00426"></a><a class="code" href="classitk_1_1CStyleCommand.html#256985611694d19ef81dd8363b10d62f">00426</a> <a class="code" href="classitk_1_1CStyleCommand.html#1e34a34f7765aee5ab02721dd1889930">ConstFunctionPointer</a> <a class="code" href="classitk_1_1CStyleCommand.html#256985611694d19ef81dd8363b10d62f">m_ConstCallback</a>; <a name="l00427"></a><a class="code" href="classitk_1_1CStyleCommand.html#824be15c7e893719d154572145cedf7f">00427</a> <a class="code" href="classitk_1_1CStyleCommand.html#42f208d9e854fbf8d94bd2dc6bbe534b">DeleteDataFunctionPointer</a> <a class="code" href="classitk_1_1CStyleCommand.html#824be15c7e893719d154572145cedf7f">m_ClientDataDeleteCallback</a>; <a name="l00428"></a>00428 }; <a name="l00429"></a>00429 <a name="l00430"></a>00430 <a name="l00431"></a>00431 } <span class="comment">// end namespace itk</span> <a name="l00432"></a>00432 <a name="l00433"></a>00433 <span class="preprocessor">#endif</span> <a name="l00434"></a>00434 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Thu May 7 22:25:25 2009 for ITK by <a href="http://www.stack.nl/~dimitri/doxygen/index.html"> <img src="http://www.stack.nl/~dimitri/doxygen/doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53> </a> 1.5.9 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2000</small></address> </body> </html>