(file) Return to PegasusProgrammingGuidelines.htm CVS log (file) (dir) Up to [Pegasus] / pegasus / doc / WorkPapers

Diff for /pegasus/doc/WorkPapers/PegasusProgrammingGuidelines.htm between version 1.1 and 1.1.2.1

version 1.1, 2001/07/05 20:25:19 version 1.1.2.1, 2001/07/25 16:33:15
Line 15 
Line 15 
  
 <b>AUTHORS:</b>&nbsp;M. Brasher, K. Schopmeyer <b>AUTHORS:</b>&nbsp;M. Brasher, K. Schopmeyer
 <p><font size="1">Last Update <!--webbot bot="Timestamp" <p><font size="1">Last Update <!--webbot bot="Timestamp"
 S-Type="EDITED" S-Format="%A, %B %d, %Y %I:%M %p" startspan -->Thursday, July 05, 2001 05:15 PM<!--webbot bot="Timestamp" i-CheckSum="5835" endspan -->  S-Type="EDITED" S-Format="%A, %B %d, %Y %I:%M %p" startspan -->Tuesday, July 24, 2001 08:48 PM<!--webbot bot="Timestamp" i-CheckSum="54098" endspan -->
 </font></p> </font></p>
 <p>Revision Status</p> <p>Revision Status</p>
 <table border="1" width="80%"> <table border="1" width="80%">
Line 32 
Line 32 
     <td width="25%">first Draft</td>     <td width="25%">first Draft</td>
   </tr>   </tr>
   <tr>   <tr>
     <td width="25%">&nbsp;</td>      <td width="25%">0.2</td>
     <td width="25%">&nbsp;</td>      <td width="25%">24 July 2001</td>
     <td width="25%">&nbsp;</td>      <td width="25%">M. Brasher, K. Schopmeyer</td>
     <td width="25%">&nbsp;</td>     <td width="25%">&nbsp;</td>
   </tr>   </tr>
   <tr>   <tr>
Line 58 
Line 58 
  
 <p>NOTE: This is a draft copy for comment.</p> <p>NOTE: This is a draft copy for comment.</p>
  
   <p>RULES and Suggestions - A number of the guidelines below are absolute rules
   that we must follow in the Pegasus project.&nbsp; These are the things that will
   help insure portability and effective interoperability of the components.</p>
   
   <p>Other area are &quot;suggestions&quot; that we strongly suggest be followed
   so that 1) the code will be readable and usable, 2) we develop a single look to
   our source code, etc.&nbsp; In some cases, there may be reasons to bypass some
   of these suggestiions but we strongly encourage everybody to follow them.&nbsp;
   In fact, if there is a real reason we will change to what the group wants and
   suggestions.</p>
   
 <h2>Coding Conventions</h2> <h2>Coding Conventions</h2>
 <OL> <OL>
 <LI><b>Indenting Code</b> - Indent by increments of 4 characters (with tabsize of <LI><b>Indenting Code</b> - Indent by increments of 4 characters (with tabsize of
 8).&nbsp; ??? Using Tabs???.  8).&nbsp; Use the TAB character.&nbsp; This is the accepted norm for open source
     code.
  
 <LI><b>Naming Conventions</b> -&nbsp;&nbsp;&nbsp;<font face="Courier New"> ThisIsAClassName</font> - no underscores. <LI><b>Naming Conventions</b> -&nbsp;&nbsp;&nbsp;<font face="Courier New"> ThisIsAClassName</font> - no underscores.
   <font face="Courier New">   <font face="Courier New">
Line 73 
Line 85 
 <LI><b>Code Line Length</b> - Lines should not span more than 80 columns. <LI><b>Code Line Length</b> - Lines should not span more than 80 columns.
 When methods span more than 80 columns, do this: When methods span more than 80 columns, do this:
 <pre> <pre>
 &nbsp;&nbsp;&nbsp; void MyClass::myMethod(      void MyClass::myMethod(
   
 &nbsp;&nbsp;&nbsp;               const char* someReallyLongName, &nbsp;&nbsp;&nbsp;               const char* someReallyLongName,
   
 &nbsp;&nbsp;&nbsp;               const char* someOtherReallyLongName); &nbsp;&nbsp;&nbsp;               const char* someOtherReallyLongName);
 </pre> </pre>
 <LI> Use "char* x" rather than "char *x".  <LI> Use "char* x" rather than "char *x". Either is normally legal for the
 <LI><b>Use of <font face="Courier New">const</font></b>. Use const whenever possible.    majority of compilers.
 Use const methods whenever possible.  <LI><b>Use of <font face="Courier New">const</font></b>. Use <font face="Courier New"> const</font> whenever possible.
   Use <font face="Courier New"> const</font> methods whenever possible.
 <LI><b>Braces</b> -&nbsp; Put opening brace on a line by itself. Braces must be aligned with control keyword: <LI><b>Braces</b> -&nbsp; Put opening brace on a line by itself. Braces must be aligned with control keyword:
 <pre> <pre>
         for(...)         for(...)
Line 93 
Line 104 
 <pre>   for (...) <pre>   for (...)
           {           {
           ....           ....
           }            }</pre>
 </pre>  or this:<pre>   for (...){
               ....
          }</pre>
 <LI><b>Using Space</b> - No spaces after names. <LI><b>Using Space</b> - No spaces after names.
 <br>Separate functions with blank lines. <br>Separate functions with blank lines.
 <pre>    class X <pre>    class X
Line 119 
Line 132 
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blah3);</font>&gt;/pre&gt;<br>   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blah3);</font>&gt;/pre&gt;<br>
 <LI> <LI>
   <pre>Avoid this:   <pre>Avoid this:
 </pre>  
 <pre>  
         int        x;         int        x;
         float      y;         float      y;
 </pre> </pre>
Line 215 
Line 227 
 <p>&lt;&lt;&lt;THIS SECTION NEED TO BE COMPLETED&gt;&gt;&gt; <p>&lt;&lt;&lt;THIS SECTION NEED TO BE COMPLETED&gt;&gt;&gt;
 </p> </p>
  
   <h2>Portability Issues</h2>
   
   <p>TBD</p>
   
 <h2>The Source Tree Structure</h2> <h2>The Source Tree Structure</h2>
  
 <p>We work from a single source tree in CVS.&nbsp; We have a fixed structure for <p>We work from a single source tree in CVS.&nbsp; We have a fixed structure for


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2