Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

star_io.C

Go to the documentation of this file.
00001 //
00002 // star_io.C
00003 //
00004 
00005 #include "star.h"
00006 #include "util_io.h"
00007 
00008 istream & star::scan_star_story(istream& s)
00009 {
00010     char input_line[MAX_INPUT_LINE_LENGTH];
00011 //    char compare_string[MAX_INPUT_LINE_LENGTH];
00012 
00013 //    if (is_star_in_binary())
00014 //       sscanf(compare_string,")Star");
00015 //    else
00016 //       sscanf(compare_string,")Binary");
00017 
00018     cerr << "\n\nUsing star_io version of scan_star_story()...\n\n";
00019 
00020     while(get_line(s,input_line), strcmp(END_STAR, input_line)){
00021 //    while(get_line(s,input_line), strcmp(compare_string,input_line)){
00022         char keyword[MAX_INPUT_LINE_LENGTH];
00023         getequals(input_line, keyword);         // demand "="
00024         add_story_line(star_story, input_line);
00025     }
00026     return s;
00027 }
00028 
00029 ostream& star::print_star_story(ostream& s,
00030                                 int short_output)       // default = 0
00031 {
00032 //    char star_string[MAX_INPUT_LINE_LENGTH];
00033 
00034 //    if (is_star_in_binary())
00035 //       sscanf(star_string,")Star");
00036 //    else
00037 //       sscanf(star_string,")Binary");
00038 
00039     put_story_header(s, STAR_ID);
00040 
00041     if (star_story)
00042         put_story_contents(s, *star_story);
00043 
00044     put_story_footer(s, STAR_ID);
00045     
00046     return s;
00047 }
00048 
00049 
00050 
00051 
00052 
00053 
00054 

Generated at Sun Feb 24 09:57:17 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001