Home | Team Info | Documents | News | Progress | Releases | Robots | Concepts | Site Map


RAFS - Code Documentation Plan (Page 2)

Code Documentation Plan (Page 2)

<<Back 1 2 3 Next>>

Class Conventions

As naming conventions go, the name of all source and header files are left to the discretion of the developers as long as they meet the following requirements:

All file names must be contiguous and contain no spaces.

Allowed:
“Class.h”

Not-Allowed:
“My class.h”

All classes must be singular nouns (objects) that begin with a capital letter

Allowed:
“Desk”

Not-Allowed:
“desks”

All methods for inserting data into a class object will be named with the prefix “set” and the next word will be the name of the attribute(s) whose value is being changed. The name of the attribute being changed must begin with a capital letter. No underscores will be permitted in naming class input functions. All class input functions will be of type void and all parameters passed into the function will be passed by value.

Allowed:
void setClientName(string FirstName, string Last Name);

Not-Allowed:
bool Send_Client_Name(string &first_name,
string &last_name);

All methods for retrieving data from a class object will be named with the prefix “get” and the next word will be the name of the attribute(s) whose value is being retrieved. The name of the attribute being retrieved must begin with a capital letter. No underscores will be permitted in naming class output functions. All class input functions will be of type void and all parameters passed into the function will be passed by reference. The parameters for these functions will be the buffers for getting things out of classes.

Allowed:
void getClientName(string &FirstName,
string &Last Name);

Not-Allowed:
bool Gimme_Client_Name(string first_name,
string last_name);

Class attributes of standard types will be named by capitalized nouns, with the exception of Boolean types which will be named an adjective or verb ending in the prefix “ed”.

Allowed:
string Name
int Number
float Average
bool calculated
bool measured

Not-Allowed:
string myName
int myNumber
float classAverage
bool Am_I_measured
bool Am_I_calculated

Documentation of classes will be handled using the following template for C++ source file coding.

// class: <class name>
// description: <a description of what this class is and what it is used
// for>
// attributes:
// <attribute 1> - <description>
// <attribute 2> - <description>
// <attribute 3> - <description>
// <attribute 4> - <description>

<<Back 1 2 3 Next>>