cppSaveCD
UseCase3
// COM1205 Propagation Pattern for DemDraw Project.
//
// Created by Tom Kneeland (tomk@ccs.neu.edu)
//
// This propagation pattern allows the user to save the internal graph
// structure to a text file, to be reloaded at a later date. (save the
// cd graph they have been working on).
// It is called by tcl passing a character string containing the name
// of the file to save to. The propagation pattern then creates an ofstream
// object with the file name, and passes the ostream object to g_print which
// outputs the Graph object to the specified file. This file can then
// be reloaded using cppOpenCD.
//
// Modification History:
//
// 11/29/95 - Tom Kneeland (tomk@ccs.neu.edu)
// Created.
//
(@
#include <fstream.h>
@)
*operation* void cppSaveCD(char* fileName)
*wrapper* Graph
(@
ofstream OutputFile(fileName);
this->g_print(OutputFile);
@)