src/report.cc
/*
     * create a report file for the given program and place, and open it
     * return an ofstream to it
     */
create a report file for the given program and place, and open it
return an ofstream to it
create a report file for the given program and place and open it return an ofstream to it
std::ofstream report_open(ql::quantum_program* programp,
                const std::string               in_or_out,
                const std::string               pass_name
               )
    {
        std::ofstream ofs;
        if( ql::options::get("write_report_files") != "yes")
        {
            ofs.setstate(std::ios::badbit);
            return ofs;
        }
        std::stringstream fname;
        fname = report_compose_report_name(programp->unique_name, in_or_out, pass_name, "report");
        ofs.open(fname.str(), std::ofstream::trunc);
        if (ofs.fail())
        {
            FATAL("[x] error opening file '" << fname.str() << "' !" << std::endl
              << "    make sure the output directory exists for '" << fname.str() << "'" << std::endl);
        }
        return ofs;
    }
std :: ofstream report_open ( ql :: quantum_program * programp , const std :: string in_or_out , const std :: string pass_name ) { std :: ofstream ofs ; if ( ql :: options :: get ( " " ) != " " ) { ofs . setstate ( std :: ios :: badbit ) ; return ofs ; } std :: stringstream fname ; fname = report_compose_report_name ( programp -> unique_name , in_or_out , pass_name , " " ) ; ofs . open ( fname . str ( ) , std :: ofstream :: trunc ) ; if ( ofs . fail ( ) ) { FATAL ( " " << fname . str ( ) << " " << std :: endl << " " << fname . str ( ) << " " << std :: endl ) ; } return ofs ; }
create a report file for the given program and place, and open it
 return an ofstream to it
create a report file for the given program and place and open it return an ofstream to it
// DOUT("report_open: " << programp->unique_name << " in_or_out: " << in_or_out << " pass_name: " << pass_name); // DOUT("report_open no report [done]"); // DOUT("report_open [done]");