root/juggler/branches/1.0/Doc/CodingStandard.html

Revision 3416, 2.2 kB (checked in by anonymous, 8 years ago)

This commit was manufactured by cvs2svn to create branch 'RELENG_1_0'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <HTML>
2 <HEAD>
3    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
4    <META NAME="GENERATOR" CONTENT="Mozilla/4.05 [en] (X11; I; IRIX64 6.4 IP30) [Netscape]">
5 </HEAD>
6 <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000">
7
8 <CENTER>
9 <H1>
10 Coding Standard</H1></CENTER>
11 The following link has a good desciption of a coding standard and why one
12 is needed:
13 <BR><A HREF="http://www.possibility.com/Cpp/CppCodingStandard.html">http://www.possibility.com/Cpp/CppCodingStandard.html</A>
14
15 <P>The coding standard for VR Juggler will be based on a simplified version
16 of the above standard.&nbsp; The standard will be minimal and still try
17 to allow for flexibility.&nbsp; We just need a way to make the source code
18 readably and maintainable across all classes.
19 <BR>&nbsp;
20 <H4>
21 Documentation</H4>
22 We will be using a modified PERCEPS script to automatically create documentation.&nbsp;
23 In order to allow for this, the source code must be commented with this
24 in mind.
25 <BR>&nbsp;
26 <H4>
27 &nbsp;Code Standard</H4>
28 The following is a brief summary of the way the code in VR Juggler should
29 be written.&nbsp; Of course there are always various exceptions, but if
30 the code is relatively consistent it will make it much easier for us all.
31 <BR>&nbsp;
32 <H4>
33 Names</H4>
34
35 <UL>
36 <LI>
37 Class Names:&nbsp; Name the class after what it does</LI>
38
39 <LI>
40 Method Names: Name it after the actions it does</LI>
41
42 <UL>
43 <LI>
44 Suffixes are sometimes useful:</LI>
45 </UL>
46 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Max - to mean the maximum value
47 something can have.
48 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cnt - the current count
49 of a running count variable.
50 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Key - key value.
51 <BR>&nbsp;&nbsp;&nbsp; For example: RetryMax to mean the maximum number
52 of retries, RetryCnt to mean the current
53 <BR>&nbsp;&nbsp;&nbsp; retry count.
54 <UL>
55 <LI>
56 &nbsp;&nbsp;&nbsp; Prefixes are sometimes useful:</LI>
57 </UL>
58 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is - to ask a question about
59 something. Whenever someone sees Is they will know it's a question.
60 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Get - get a value.
61 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set - set a value.</UL>
62
63 </BODY>
64 </HTML>
Note: See TracBrowser for help on using the browser.