/**************************************************************************** generic.cpp **************************************************************************** File Name : $Source$ Project : Revision : $Revision$ State : $State$ Programmer: John E. Boon, Jr Copyright (c) 2003 John E. Boon, Jr (Work in Progress) Program Description: Program Unit Notebook : http://link_to_file/ExamplePUN.html This is a separate file that contains information about this program that is not appropriate to store here (e.g. programmer metrics data, binary images). Program Goals : "A target action or state." "A program goal is a target action or state of a program or program segment. Programs or program segments are executed to achieve program goals. For example, a program segment goal might be to save data by spilling a buffer to a file whenever the buffer is full. Another might be present sorted data to the user upon request." [Frakes, Software Engineering in the Unix/C Environment,Prentice Hall, 1991, pp 55] References: 1. Scott Myers, Effective C++: 50 Specific Ways to Improve Your Programs and Designs. Reading, MA: Addison-Wesley, 1992. (Section 1.4, pages 14-15) 2. Frakes, William B., Christopher J. Fox, and Brian A. Nejmeh, Software Engineering in the Unix/C Environment, Englewood Cliffs, New Jersey: Prentice Hall, 1991. Reusability Keywords : template Software Metrics (computed by RSM version 6.01): Function: Class.method Cyclomatic Complexity V(g) = a LOC = b; eLOC = c; lLOC = d; Comment = e; Lines = f Runtime Environment: Platform : Intel PentiumPro/Windows 2000 (Service Pack 2) Compiler Used : gcc version 3.3 (djgpp) Compilation Switches: Associated Files : Input Files Needed : none Temporary Files Needed: none Output Files Needed : none Exception Handlers : Condition Checked: Handling Process : Updates Log : $Log$ Header Version : BOON-05-026-2003-GNU-CVS *************************************************************************** generic.cpp **************************************************************************/ /*** defines **************************************************************/ #define MAIN_PGM /*** includes *************************************************************/ #include #include using namespace std; /*** external variables ***************************************************/ extern none; /*** file scope structures & variables for objects contained in this file */ /************************************************************************** Object Role : "A part played by a program object." "The role of a program is the part the object plays in a program. Details about an object's role usually depend on what sort of thing the object is. For example, the role of a variable is to store a particular data value, say a count of bytes in a buffer, or the sum of values encountered so far." [Frakes, Software Engineering in the Unix/C Environment, Prentice Hall, 1991, pp 55] Object Purpose: "The reason an object plays the role it does." "The purpose of a program object is a reason the Object plays the role that it does. An object's purposes are usually explained in the way it serves plans for achieving program goals. For example, the purpose of a byte counter might be to keep track of when a buffer should be spilled." [Frakes, Software Engineering in the Unix/C Environment, Prentice Hall, 1991, pp 56] **************************************************************************/ /*** function prototypes for methods contained in this file *************/ /* Note that the namespace of the function prototype is separate from */ /* the namespace of the first line of the function definition. */ return_type function_name(formal_parameters or formal_parameter types); /************************* MAIN PROGRAM BODY ******************************/ /**************************************************************************/ int main(int argc, char *argv[]) { return(0); } /**************************************************************************/ /************************* MAIN PROGRAM BODY ******************************/ /**************************** METHOD NAME ******************************* Method Name: The first sentence should be a summary statement about this Method. Method Signature: function: {source sets} -> {target sets} domain function ::={x member of ? | boolean expression on x} function(x) ::= some value in target set Method Plans : "An outline of steps for achieving a goal." "A plan is an outline of processing steps for achieving program goals. Plans are more abstract than algorithms, but they show how function goals are achieved. For instance, the following plan for adding data to a buffer achieves the goal of saving the data by spilling the buffer to a file when the buffer is full [Boon's note: this plan assumes that the buffer is sized as a multiple of the data item size that is to be added to the buffer]: 1. Add a single data item to the buffer; 2. If the buffer is full, spill it to the file.[Frakes, Software Engineering in the Unix/C Environment, Prentice Hall, 1991, pp 56] Precondition Axioms : (optional) Postcontdition Axioms : (required) Parameters: Returns : Exception Handlers : Condition Checked : Handling Process : **************************************************************************/ return_type function_name(formal_parameters) { } /**************************** METHOD NAME *******************************/ /************************************************************************** generic.cpp **************************************************************************/