00001
00002
00003
00004
00005 #include "hydrobase.h"
00006 #include "util_io.h"
00007
00008 istream & hydrobase::scan_hydro_story(istream& s)
00009 {
00010 char input_line[MAX_INPUT_LINE_LENGTH];
00011
00012 while(get_line(s,input_line), !matchbracket(END_HYDRO, input_line)) {
00013 char keyword[MAX_INPUT_LINE_LENGTH];
00014 getequals(input_line, keyword);
00015 add_story_line(hydro_story, input_line);
00016 }
00017 return s;
00018 }
00019
00020 ostream& hydrobase::print_hydro_story(ostream& s)
00021 {
00022 put_story_header(s, HYDRO_ID);
00023
00024 if (hydro_story)
00025 put_story_contents(s, *hydro_story);
00026
00027 put_story_footer(s, HYDRO_ID);
00028
00029 return s;
00030 }