version 1.1, 2001/07/05 20:25:19
|
version 1.1.2.1, 2001/07/25 16:33:15
|
|
|
| |
<b>AUTHORS:</b> M. Brasher, K. Schopmeyer | <b>AUTHORS:</b> 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%"> |
|
|
<td width="25%">first Draft</td> | <td width="25%">first Draft</td> |
</tr> | </tr> |
<tr> | <tr> |
<td width="25%"> </td> |
<td width="25%">0.2</td> |
<td width="25%"> </td> |
<td width="25%">24 July 2001</td> |
<td width="25%"> </td> |
<td width="25%">M. Brasher, K. Schopmeyer</td> |
<td width="25%"> </td> | <td width="25%"> </td> |
</tr> | </tr> |
<tr> | <tr> |
|
|
| |
<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. These are the things that will |
|
help insure portability and effective interoperability of the components.</p> |
|
|
|
<p>Other area are "suggestions" 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. In some cases, there may be reasons to bypass some |
|
of these suggestiions but we strongly encourage everybody to follow them. |
|
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). ??? Using Tabs???. |
8). Use the TAB character. This is the accepted norm for open source |
|
code. |
| |
<LI><b>Naming Conventions</b> - <font face="Courier New"> ThisIsAClassName</font> - no underscores. | <LI><b>Naming Conventions</b> - <font face="Courier New"> ThisIsAClassName</font> - no underscores. |
<font face="Courier New"> | <font face="Courier New"> |
|
|
<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> |
void MyClass::myMethod( |
void MyClass::myMethod( |
|
|
const char* someReallyLongName, | const char* someReallyLongName, |
|
|
const char* someOtherReallyLongName); | 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> - Put opening brace on a line by itself. Braces must be aligned with control keyword: | <LI><b>Braces</b> - Put opening brace on a line by itself. Braces must be aligned with control keyword: |
<pre> | <pre> |
for(...) | for(...) |
|
|
<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 |
|
|
blah3);</font>>/pre><br> | blah3);</font>>/pre><br> |
<LI> | <LI> |
<pre>Avoid this: | <pre>Avoid this: |
</pre> |
|
<pre> |
|
int x; | int x; |
float y; | float y; |
</pre> | </pre> |
|
|
<p><<<THIS SECTION NEED TO BE COMPLETED>>> | <p><<<THIS SECTION NEED TO BE COMPLETED>>> |
</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. We have a fixed structure for | <p>We work from a single source tree in CVS. We have a fixed structure for |