Send a graph to file. If the operation could not be completed EXIT_FAIL is returned
241{
242 std::ofstream of;
243 of.open ( ofn );
244
245 if ( of.is_open() )
246 {
247 INFO (
"Sending output to file",
"Program execution control",
"File name:", ofn );
248 boost::write_graphviz (
249 of, g, boost::make_label_writer ( boost::get ( >ool::vertex_label::label, g ) ) );
250
251 of.close();
252
253 if ( of.fail() )
254 {
255 ERROR (
"Could not close file",
"Program execution control",
"File name:", ofn );
256 }
257 else
258 {
259 NOTE (
"Output written to file",
"Program execution control success",
"File name:", ofn );
260 }
261 }
262 else
263 {
265 "Output could not be written file", "Stream could not be opened", "File name:", ofn );
266 write_to_cout ( g );
267 }
268}