[Insight-developers] Insight code walkthrough

Bill Hoffman bill.hoffman@kitware.com
Tue, 18 Sep 2001 17:22:20 -0400


--=====================_1232154093==_.ALT
Content-Type: text/plain; charset="us-ascii"


>    * We need to find a way to reduce the amount of whitespace in the header files.  Perhaps we can condense documentation before each method to a single line comment block or group typedefs so that they do not have a separate comment block (especially for typedefs that inherited from the superclass).  


This can be done most of the time, for example:

class ITK_EXPORT ObjectFactoryBase : public Object
{
public:  
  /**
   * Standard "Self" typedef.
   */
  typedef ObjectFactoryBase   Self;

  /**
   * Standard "Superclass" typedef.
   */
  typedef Object  Superclass;

  /** 
   * Smart pointer typedef support.
   */
  typedef SmartPointer<Self>  Pointer;
  typedef SmartPointer<const Self>  ConstPointer;

  /**
   * Class Methods used to interface with the registered factories
   */
  
  /** 
   * Run-time type information (and related methods).
   */
  itkTypeMacro(ObjectFactoryBase, Object);


or 

class ITK_EXPORT ObjectFactoryBase : public Object
{
public:  
  ///! Standard "Self" typedef.
  typedef ObjectFactoryBase   Self;

  ///! Standard "Superclass" typedef.
  typedef Object  Superclass;

   ///!Smart pointer typedef support.
   typedef SmartPointer<Self>  Pointer;
   typedef SmartPointer<const Self>  ConstPointer;

  ///! Run-time type information (and related methods).
  itkTypeMacro(ObjectFactoryBase, Object);
--=====================_1232154093==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<blockquote type=cite class=cite cite>
<ul><font size=2>
<li>We need to find a way to reduce the amount of whitespace in the
header files.&nbsp; Perhaps we can condense documentation before each
method to a single line comment block or group typedefs so that they do
not have a separate comment block (especially for typedefs that inherited
from the superclass).&nbsp; </blockquote>
</ul><br>
<br>
This can be done most of the time, for example:<br>
<br>
class ITK_EXPORT ObjectFactoryBase : public Object<br>
{<br>
public:&nbsp; <br>
&nbsp; /**<br>
&nbsp;&nbsp; * Standard &quot;Self&quot; typedef.<br>
&nbsp;&nbsp; */<br>
&nbsp; typedef ObjectFactoryBase&nbsp;&nbsp; Self;<br>
<br>
&nbsp; /**<br>
&nbsp;&nbsp; * Standard &quot;Superclass&quot; typedef.<br>
&nbsp;&nbsp; */<br>
&nbsp; typedef Object&nbsp; Superclass;<br>
<br>
&nbsp; /** <br>
&nbsp;&nbsp; * Smart pointer typedef support.<br>
&nbsp;&nbsp; */<br>
&nbsp; typedef SmartPointer&lt;Self&gt;&nbsp; Pointer;<br>
&nbsp; typedef SmartPointer&lt;const Self&gt;&nbsp; ConstPointer;<br>
<br>
&nbsp; /**<br>
&nbsp;&nbsp; * Class Methods used to interface with the registered
factories<br>
&nbsp;&nbsp; */<br>
&nbsp; <br>
&nbsp; /** <br>
&nbsp;&nbsp; * Run-time type information (and related methods).<br>
&nbsp;&nbsp; */<br>
&nbsp; itkTypeMacro(ObjectFactoryBase, Object);<br>
<br>
<br>
or <br>
<br>
class ITK_EXPORT ObjectFactoryBase : public Object<br>
{<br>
public:&nbsp; <br>
&nbsp; ///! Standard &quot;Self&quot; typedef.<br>
&nbsp; typedef ObjectFactoryBase&nbsp;&nbsp; Self;<br>
<br>
&nbsp; ///! Standard &quot;Superclass&quot; typedef.<br>
&nbsp; typedef Object&nbsp; Superclass;<br>
<br>
&nbsp;&nbsp; ///!Smart pointer typedef support.<br>
&nbsp;&nbsp; typedef SmartPointer&lt;Self&gt;&nbsp; Pointer;<br>
&nbsp;&nbsp; typedef SmartPointer&lt;const Self&gt;&nbsp;
ConstPointer;<br>
<br>
&nbsp; ///! Run-time type information (and related methods).<br>
&nbsp; itkTypeMacro(ObjectFactoryBase, Object);</font></html>

--=====================_1232154093==_.ALT--