head	1.7;
access;
symbols;
locks; strict;
comment	@% @;


1.7
date	92.10.28.10.17.07;	author lacey;	state Exp;
branches;
next	1.6;

1.6
date	92.10.28.10.12.10;	author gaubert;	state Exp;
branches;
next	1.5;

1.5
date	92.10.28.07.54.13;	author lacey;	state Exp;
branches;
next	1.4;

1.4
date	92.10.28.07.12.04;	author lacey;	state Exp;
branches;
next	1.3;

1.3
date	92.10.28.06.06.47;	author lacey;	state Exp;
branches;
next	1.2;

1.2
date	92.10.28.05.53.34;	author gaubert;	state Exp;
branches;
next	1.1;

1.1
date	92.10.25.18.25.24;	author lacey;	state Exp;
branches;
next	;


desc
@@


1.7
log
@*** empty log message ***
@
text
@%*****************************************************************************
% Remember, you need to be as detailed as possible in the description
% of the modules in order to facilitate the coding task. Do not leave any 
% room for ambiguity.
%*****************************************************************************
%
% For each module and major submodule complete the following
% section and subsections
%
\subsection{File Write Module}
This module will write the information from the database to a file
using recursion. 
% 
% Include a data flow diagram for this module
%
\subsubsection{Data Flow Diagram}

Figure~\ref{fw:dfd} on page~\pageref{fw:dfd} presents the
flow of data throughout this module.

\begin{figure}
\centering
\centerline{\psfig{figure=dataflo_writefile.ps,width=6in}}
\caption[Data Flow Diagram for File Write]{Data
flow diagram for file write.}
\label{fw:dfd}
\end{figure}

%
% Include a Structure Chart for this module
%
\subsubsection{Structure Chart}

To gain some insight into the calling structure of this module, refer
to Figure~\ref{fw:sc} on page~\pageref{fw:sc}.

\begin{figure}
\centering
\centerline{\psfig{figure=structure_writefile.ps,width=6in}}
\caption[Structure Chart for File Write]{Structure
chart for file write.}
\label{fw:sc}
\end{figure}

%
% Include a processing narrative for this module
%
\subsubsection{Narrative}
This module is used to save the task information into a file of the
users choice. The parameters of this routine will include the pointer
to the outputfile and the task-list pointer of the first task in
the list. Within the module, there will be two pointers for the
traversal of the lists. The first pointer tem-task-ptr is the pointer
that will move along the main task list. The second pointer is the
pointer that will go through the subtask lists. This routine will run
recursively so that each task list will have a pointer that will go
through its current main task list and a pointer to run through the
subtask lists. When the function returns to the previous call of the
function ( a recursion has been done ) the tem-task-list will go to the
next node in the list, and the sub-task-list will be set to the
tem-task-list which in tern sets both of the pointers to the top of the
next list in the list.

The database will be accessed from this routine by the pointer value
of task-list. All of the variables within the struct of the task-list
pointer coming in from the call of the function will be places in the
print format and written directly to the file. The resources and
dependencies have a list of their own for each task. These lists will
be outputted to the file in the order that they were put into the
database. 

%
% Include a PDL pseudocode description for this module
%
\subsubsection{PDL Description}

\begin{verbatim}

PROCEDURE write-file
INTERFACE ptr(file pointer),task-list;
ptr IS FILE PTR;
tem-task-list IS PTR OF TASK-LIST
sub-task-list IS PTR OF TASK-LIST
   CALL get-main-task-list PROCEDURE WITH sub-task-list;
   WRITE (``task begin\n'');

   DO WHILE tem-task-list != NULL
     WRITE (ptr,``task = {\n'');
     WRITE (ptr,''\t name = %s;\n'', sub-task-list->name);
     WRITE (ptr,''\t description = %s;\n'',sub-task-list->desc);
     WRITE (ptr.''\t planned-start = %d;\n",sub-task-list->planned-start-date);
     WRITE (ptr.''\t planned-end = %d;\n'',sub-task-list->planned-end-date);
     WRITE (ptr.''\t actual-start = %d;\n'',sub-task-list->actual-start-date);
     WRITE (ptr.''\t actual-end = %d;\n'',sub-task-list->actual-end-date);
     WRITE (ptr.''\t forecast-start = %d;\n'',sub-task-list->forecast-start-date);
     WRITE (ptr.''\t forecast-end = %d;\n'',sub-task-list->forecast-end-date);
     WRITE (ptr.''\t earliest-start = %d;\n'',sub-task-list->earliest-start-date);
     WRITE (ptr.''\t earliest-end = %d;\n'',sub-task-list->earliest-end-date);
     WRITE (ptr.''\t latest-start = %d;\n'',sub-task-list->latest-start-date);
     WRITE (ptr.''\t latest-end = %d;\n'',sub-task-list->latest-end-date);
     WRITE (ptr,''\t float = %d;\n'',sub-task-list->fload-time);
     WRITE (ptr,''\t milestone = %s;\n'',sub-task-list->milestone);
     WRITE (ptr,''\t deliverable = %s;\n'',sub-task-list->deliverable);
     IF sub-task-list->resource-list != NULL
       WRITE (ptr,''\t\tbegin resources;\n'')
       DO WHILE sub-task-list->resource-list != NULL
         WRITE (ptr,''\t\t\t \"%s\"\n'',sub-task-list->resource-list);
         sub-task-list->resource-list = sub-task-list->resource-list->next;
       END WHILE
       WRITE (ptr,''\t\tend resources;\n'');
     ENDIF
     IF sub-task-list->dependancy-list != NULL
       WRITE (ptr,''\t\tbegin dependencies;\n'')
       DO WHILE sub-task-list->dependency-list != NULL
         WRITE (ptr,''\t\t\t \"%s\"\n'',sub-task-list->dependency-list);
         task-list->dependency-list = sub-task-list->dependency-list->next;
       END WHILE
       WRITE (ptr,''\t\tend dependencies;\n'');
     ENDIF
     WRITE (ptr,''\tparent = %s;\n'',sub-task-list->parent);
      DO WHILE sub-task-list->subtask != NULL
       CALL write-file PROCEDURE WITH sub-task-list->subtask;
       sub-task-list->subtask = sub-task-list->subtask->next;
     WRITE (ptr,''end task.\n'');
     END WHILE
     tem-task-list = tem-task-list->next;
     sub-task-list = tem-task-list;

   END WHILE

END PROCEDURE file-write

\end{verbatim}

%
% Include a description of the interfaces for this module.
% This should include a list of data elements passed between
% modules.  The data elements described here should either be
% described in the next subsection or in the relevant owner's
% data dictionary
%
\subsubsection{Internal Interfaces}
The internal interfaces from this routine calls to
the database to find the main-task-list. This will return the
main-task-list that is currently being worked on, which could be a
subtask list or a main task list. The pointer used here will allow the
routine to access all of the information needed to print out the
contents of each task into the file. The data that is to be written to
the file will be accessed by the node that contains the list from
its position in the main task list. This function will also call the
fprintf function so that the extra text in formatting the output can be
written to the file.
%
% Include a data dictionary for this module.  The format should be:
%  
% Name: (this is the name of the data item)
% Aliases: (this is a list of aliases, if any)
% Where Used/ How Used: (this is a paired list of where the item is
%     used and how it is used
% Description: (this is a demarco description of the data item)
%
\subsubsection{Data Dictionary}
\begin{enumerate}
\item
\begin{description}
\item[Name:] tem-task-list
\item[Aliases:] task-list
\item[Where/ How Used:] This will be the pointer that will follow the
                         list from the main list across to the last main
                         list in the list.  
\item[Description:] tem-task-list = name + description +
                       planned-start-date +
                       planned-end-date + actual-start-date +
                       actual-end-date + forecast-start-date +
                       forecast-end-date + earliest-start-date +
    		       earliest-end-date + latest-start-date +
                       latest-end-date + float-time + milestone +
                       deliverable + resources + dependencies +
                       parent + subtasks;


               name = *a string of variable length*;
               description = *a string of variable length*;
               planned-start-date = *integer*;
               planned-end-date = *integer*;
               actual-start-date = *integer*;
               actual-end-date = *integer*;
               forecast-start-date = *integer*;
               forecast-end-date = *integer*;
               earliest-start-date = *integer*;
               earliest-end-date = *integer*;
               latest-start-date = *integer*;
               latest-end-date = *integer*;
               float-time = *integer in days*;
               milestone = [true \verb+|+ false];
               deliverable = [true \verb+|+ false];
\end{description}

\item
\begin{description}
\item[Name:] ptr
\item[Where/ How Used:] This is a pointer to a file that will be used in opening, writing and closing the file.
\item[Description:] ptr = *string for filename*
\end{description}
\end{enumerate}

@


1.6
log
@*** empty log message ***
@
text
@d171 9
a179 8
\item[Description:] tem-task-list = [name \+ description + planned-start-date\+
                               planned-end-date \+ actual-start-date \+
                               actual-end-date \+ forecast-start-date \+
                               forecast-end-date \+ earliest-start-date \+
    			       earliest-end-date \+ latest-start-date \+
                               latest-end-date \+ float-time \+ milestone \+
                               deliverable \+ resources \+ dependencies \+
                                parent \+ subtasks];
@


1.5
log
@*** empty log message ***
@
text
@d51 1
a51 1
to the file of output and the task-list pointer of the first task in
d53 1
a53 1
traverse of the lists. This first pointer tem-task-ptr is the pointer
d61 1
a61 1
tem-task-list which intern sets both of the pointers to the top of the
d131 1
a131 1
END PROCEDURE file-write;
d143 1
a143 1
The internal interfaces from this routine contain the use and calls to
d146 1
a146 1
subtask or a main task task-list. The pointer used here will allow the
d149 1
a149 1
the file , will be accessed by the node that contains the list from
d171 8
a178 8
\item[Description:] tem-task-list = [name | description | planned-start-date |
                               planned-end-date | actual-start-date |
                               actual-end-date | forecast-start-date |
                               forecast-end-date | earliest-start-date |
    			       earliest-end-date | latest-start-date |
                               latest-end-date | float-time | milestone |
                               deliverable | resources | dependencies |
                                parent | subtasks];
d183 13
a195 13
               planned-start-date = [integer];
               planned-end-date = [integer];
               actual-start-date = [integer];
               actual-end-date = [integer];
               forecast-start-date = [integer];
               forecast-end-date = [integer];
               earliest-start-date = [integer];
               earliest-end-date = [integer];
               latest-start-date = [integer];
               latest-end-date = [integer];
               float-time = [integer in days];
               milestone = [true | false];
               deliverable = [true | false];
@


1.4
log
@*** empty log message ***
@
text
@d18 11
d33 11
@


1.3
log
@*** empty log message ***
@
text
@d44 1
a44 1
pointer comming in from the call of the function will be places in the
d46 2
a47 2
dependancies have a list of their own for each task. These lists will
be outputed to the file in the order that they were put into the
d94 1
a94 1
         task-list->depentency-list = sub-task-list->dependency-list->next;
d129 1
a129 1
fprintf function so that the extra text in formating the output can be
d155 1
a155 1
                               deliverable | resources | dependancies |
@


1.2
log
@*** empty log message ***
@
text
@d54 3
d110 2
@


1.1
log
@Initial revision
@
text
@d11 2
a12 1

d27 14
d42 8
d54 7
d62 46
d116 10
a125 1

d136 16
d153 25
@
