• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ outf函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中outf函数的典型用法代码示例。如果您正苦于以下问题:C++ outf函数的具体用法?C++ outf怎么用?C++ outf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了outf函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: start_vmm

void __init start_vmm ( const struct multiboot_info *mbi )
{
	//Initialize serial port COM1, this must be done before calling outf
	setup_serial();
	outf("\n\n\n!!!!!!!!!!!BEGIN!!!!!!!!!!!\n\n\n");

	//Parse the command line that user pass to GRUB
	struct cmdline_option opt = parse_cmdline ( mbi );

	//Set up memory layout and store the layout in pml
	struct pmem_layout pml;
	setup_memory(mbi, &opt, &pml);

	struct vm_info vm;
	vm_create (&vm, pml.vmm_pmem_start, opt.vmm_pmem_size, &(pml.e820));

	outf("\n++++++ New virtual machine created. Going to start the VM\n");
	vm_init (&vm);

	//Debug
	//e820_print_map(&(pml.e820));

	outf ("\n++++++ Going to GRUB for the 2nd time\n");
	vm_boot (&vm);
}
开发者ID:pombreda,项目名称:hv-sebek,代码行数:25,代码来源:setup.c


示例2: ATIPTR

/*
 * ATIMach64SubsequentMono8x8PatternFillRect --
 *
 * This function performs an 8x8 1bpp pattern fill.
 */
static void
ATIMach64SubsequentMono8x8PatternFillRect
(
    ScrnInfoPtr pScreenInfo,
    int         patx,
    int         paty,
    int         x,
    int         y,
    int         w,
    int         h
)
{
    ATIPtr pATI = ATIPTR(pScreenInfo);

    ATIDRISync(pScreenInfo);

    if (pATI->XModifier != 1)
    {
        x *= pATI->XModifier;
        w *= pATI->XModifier;

        outf(DST_CNTL, SetBits((x / 4) % 6, DST_24_ROT) |
            (DST_X_DIR | DST_Y_DIR | DST_24_ROT_EN));
    }

    /* Disable clipping if it gets in the way */
    ATIMach64ValidateClip(pATI, x, x + w - 1, y, y + h - 1);

    ATIMach64WaitForFIFO(pATI, 2);
    outf(DST_Y_X, SetWord(x, 1) | SetWord(y, 0));
    outf(DST_HEIGHT_WIDTH, SetWord(w, 1) | SetWord(h, 0));
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:37,代码来源:atimach64accel.c


示例3: ipfix_print_drecord

static int ipfix_print_drecord( ipfixs_node_t      *s,
                                ipfixt_node_t      *t,
                                ipfix_datarecord_t *data,
                                void               *arg )
{
    char  tmpbuf[2000];
    int   i;
    FILE  *fp = (FILE*)arg;

    if ( !t || !s || !data )
        return -1;

    outf( fp, "DATA RECORD: \n" );
    outf( fp, " template id:  %u %s\n", t->ipfixt->tid,
          (t->ipfixt->nscopefields)?"(option record)":"" );
    outf( fp, " nfields:      %u\n", t->ipfixt->nfields );
    for ( i=0; i<t->ipfixt->nfields; i++ ) {
        outf( fp, " %s: ", t->ipfixt->fields[i].elem->ft->name );

        t->ipfixt->fields[i].elem->snprint( tmpbuf, sizeof(tmpbuf), 
                                            data->addrs[i], data->lens[i] );
        outf( fp, "%s\n", tmpbuf );
    }

    return 0;
}
开发者ID:SPodjasek,项目名称:libipfix,代码行数:26,代码来源:ipfix_print.c


示例4: debug_back_trace

void
debug_back_trace (outf_channel stream)
{
  outf (stream, "*** Scheme Microcode Back Trace: ***\n");
  Back_Trace (stream);
  outf (stream, "*** End of Back Trace ***\n");
  outf_flush (stream);
}
开发者ID:tali713,项目名称:mit-scheme,代码行数:8,代码来源:osscheme.c


示例5: o_flush

static void o_flush(void)
{
	if (o_qtype == 1)
		outf(") %d %d w\n", o_qh, o_qv);
	if (o_qtype == 2)
		outf("] %d %d g\n", o_qh, o_qv);
	o_qtype = 0;
}
开发者ID:litcave,项目名称:neatpost,代码行数:8,代码来源:ps.c


示例6: outs

void EspServInfo::write_esp_binding_ng_ipp(EspMessageInfo *msgs)
{
    EspMethodInfo *mthi=NULL;

    outs("\n\n");
    outf("template <class base_binding> class CNg%sServiceBinding : public base_binding\n", name_);
    outs("{\npublic:\n");

    outf(1,"CNg%sServiceBinding(IPropertyTree* cfg, const char *bindname=NULL, const char *procname=NULL) : base_binding(cfg, bindname, procname){}\n", name_);
    
    outs(1,"IEspNgRequest* createRequest(const char *method)\n");
    outs(1,"{\n");
    int count=0;
    for (mthi=methods;mthi;mthi=mthi->next) 
    {
        outf(2,"%sif (!stricmp(method, \"%s\"))\n", (count++==0)? "" : "else ", mthi->getName());
        outs(2,"{\n");
        outf(3,"return new CNg%s(\"%s\");\n", mthi->getReq(), name_);
        outs(2,"}\n");
    }
    outs(2,"return NULL;\n");
    outs(1,"}\n\n");

    outs(1,"virtual IEspNgResponse* createResponse(const char *method)\n");
    outs(1,"{\n");
    count=0;
    for (mthi=methods;mthi;mthi=mthi->next) 
    {
        outf(2,"%sif (!stricmp(method, \"%s\"))\n", (count++==0)? "" : "else ", mthi->getName());
        outs(2,"{\n");
        outf(3,"return new CNg%s(\"%s\");\n", mthi->getResp(), name_);
        outs(2,"}\n");
    }
    outs(2,"return NULL;\n");
    outs(1,"}\n\n");

    //method ==> processRequest
    outs(1,"virtual int processRequest(IEspContext &context, const char *method_name, IEspNgRequest* req, IEspNgResponse* resp)\n");
    outs(1,"{\n");
    outf(2, "Owned<IEsp%s> iserv = (IEsp%s*)base_binding::getService();\n", name_, name_);
    count=0;
    for (mthi=methods;mthi;mthi=mthi->next) 
    {
        outf(2,"%sif (!stricmp(method_name, \"%s\")/*||!stricmp(req->queryName(), \"%s\")*/)\n", (count++==0)? "" : "else ", mthi->getName(), mthi->getReq());
        outs(2,"{\n");
        outf(3,"return iserv->on%s(context, *dynamic_cast<IEsp%s*>(req), *dynamic_cast<IEsp%s*>(resp));\n", mthi->getName(), mthi->getReq(), mthi->getResp());
        outs(2,"}\n");
    }
    outs(2,"return 0;\n");
    outs(1,"}\n\n");
    
    //method ==> getServiceName
    outf(1,"StringBuffer & getServiceName(StringBuffer &resp){resp.clear().append(\"%s\");}\n", name_);
    

    outs("};\n\n");
}
开发者ID:afishbeck,项目名称:HPCC-Platform,代码行数:57,代码来源:esdl_esp_ng.cpp


示例7: ipfix_print_newmsg

static int ipfix_print_newmsg( ipfixs_node_t *s, ipfix_hdr_t *hdr, void *arg )
{
    char           timebuf[51];
    FILE           *fp = (FILE*)arg;

    /* print header
     */
    outf( fp, "IPFIX-HDR:\n version=%u,", hdr->version );
    if ( hdr->version == IPFIX_VERSION_NF9 ) {
        outf( fp, " records=%u\n", hdr->u.nf9.count );
        strftime( timebuf, 40, "%Y-%m-%d %T %Z", 
                  localtime( (const time_t *) &(hdr->u.nf9.unixtime) ));
        outf( fp, " sysuptime=%.3fs, unixtime=%lu (%s)\n", 
              (double)(hdr->u.nf9.sysuptime)/1000.0, 
              (u_long)hdr->u.nf9.unixtime, timebuf );
        outf( fp, " seqno=%lu,", (u_long)hdr->seqno );
        outf( fp, " sourceid=%lu\n", (u_long)hdr->sourceid );
    }
    else {
        outf( fp, " length=%u\n", hdr->u.ipfix.length );
        strftime( timebuf, 40, "%Y-%m-%d %T %Z", 
                  localtime( (const time_t *) &(hdr->u.ipfix.exporttime) ));
        outf( fp, " unixtime=%lu (%s)\n", 
              (u_long)hdr->u.ipfix.exporttime, timebuf );
        outf( fp, " seqno=%lu,", (u_long)hdr->seqno );
        outf( fp, " odid=%lu\n", (u_long)hdr->sourceid );
    }

    return 0;
}
开发者ID:SPodjasek,项目名称:libipfix,代码行数:30,代码来源:ipfix_print.c


示例8: _mirrored_text_export

static int _mirrored_text_export(const struct lv_segment *seg, struct formatter *f)
{
        outf(f, "mirror_count = %u", seg->area_count);
        if (seg->status & PVMOVE)
                out_size(f, (uint64_t) seg->extents_copied * seg->lv->vg->extent_size,
                         "extents_moved = %" PRIu32, seg->extents_copied);
        if (seg->log_lv)
                outf(f, "mirror_log = \"%s\"", seg->log_lv->name);
        if (seg->region_size)
                outf(f, "region_size = %" PRIu32, seg->region_size);

        return out_areas(f, seg, "mirror");
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:13,代码来源:mirrored.c


示例9: outf

void ESDLcompiler::write_esp_ng_cpp()
{
    //create the *.esp file
    gOutfile = espngc;
    outf("// *** Source file generated by ESDL Version %s from %s.scm ***\n", ESDLVER, packagename);
    outf("// *** Not to be hand edited (changes will be lost on re-generation) ***\n\n"); 
    outf("#include \"%s_esp_ng.ipp\"\n\n\n", packagename);
    
    EspServInfo *si;
    for (si=servs;si;si=si->next) 
    {
        si->write_esp_binding_ng_cpp(msgs);
        outs("\n\n");
    }
}
开发者ID:afishbeck,项目名称:HPCC-Platform,代码行数:15,代码来源:esdl_esp_ng.cpp


示例10: outf

void LibraryUI::save() {
    QFile outf("libfile");
    outf.open(QIODevice::WriteOnly);
    QTextStream outstr(&outf);
    outstr << m_Lib->toString();
    outf.close();
}
开发者ID:thomas7,项目名称:hw5,代码行数:7,代码来源:libraryui.cpp


示例11: CreateDirectory

void CPluginsDialog::SaveCmds()
{
	CString dir = L"data";
	CreateDirectory(dir,NULL);
	dir += L"/";
	dir += _plugins->name().c_str();
	CreateDirectory(dir,NULL);
	
	CComDispatchDriver spScript;
	if(S_OK != m_spHtmlDoc->get_Script(&spScript))
	{
		return;
	}
	CComVariant varRet;  
	if(S_OK != spScript.Invoke0(L"get_cmds", &varRet))
	{
		return;
	}
	CString str = varRet;
	std::string utf8 = dark::windows::utf::to_utf8(str.GetBuffer());
	std::ofstream outf(dir + L"/cmds.json",std::ios::binary | std::ios::trunc | std::ios::out);
	if(outf.is_open())
	{
		outf.write(utf8.data(),utf8.size());
	}
}
开发者ID:zuiwuchang,项目名称:dark-cpp-ghoul,代码行数:26,代码来源:PluginsDialog.cpp


示例12: outf

void call_dump_ism_entries::_(
  size_t the_ism_index,
  std::iostream::ios_base::openmode open_mode,
  std::string const& filename)
{
  std::ofstream outf(filename.c_str(), open_mode);
  for (
    ism_type::iterator pos = get_ism(the_ism_index).begin();
    pos!= get_ism(the_ism_index).end();
    ++pos
  ) {
    boost::mutex::scoped_lock l(*boost::tuples::get<4>(pos->second));
    if (boost::tuples::get<2>(pos->second)) {
      classad::ClassAd ad_ism_dump;
      ad_ism_dump.InsertAttr("id", pos->first);
      ad_ism_dump.InsertAttr(
        "update_time",
        boost::tuples::get<update_time_entry>(pos->second)
      );
      ad_ism_dump.InsertAttr(
        "expiry_time",
        boost::tuples::get<expiry_time_entry>(pos->second)
      );
      ad_ism_dump.Insert(
        "info",
        boost::tuples::get<ad_ptr_entry>(pos->second).get()->Copy()
      );
      outf << ad_ism_dump;
    }

    l.unlock();
  }
}
开发者ID:italiangrid,项目名称:org.glite.wms,代码行数:33,代码来源:ism.cpp


示例13: FitInvHist

Int_t FitInvHist(TString str_infile, TString png_out_tag) {

	TFile* f_in = new TFile(str_infile);	
    

	vector<Double_t> fit_results = GetBWYieldPlusPoly((TH1F*)f_in->Get("h_massdist_accidsub"),png_out_tag,POLY_ORDER);	
	cout << "Yield of total histogram: " << fit_results[0] << " +/- " << fit_results[1] << " with chi2/ndf: " << fit_results[2] << endl;

    ofstream outf("data.txt");
    outf <<  fit_results[0] << endl;
    outf.close();


	TCanvas* c1 = new TCanvas ("c1","c1",800,600);
    TH1F *h_proton_p_theta_accidsub = (TH1F*)f_in->Get("h_proton_p_theta_accidsub");
    TH1F *h_pip_p_theta_accidsub = (TH1F*)f_in->Get("h_pip_p_theta_accidsub");
    TH1F *h_pim_p_theta_accidsub = (TH1F*)f_in->Get("h_pim_p_theta_accidsub");

    h_proton_p_theta_accidsub->Rebin2D();
    h_proton_p_theta_accidsub->Draw("COLZ");
    c1->Print("deltapi_proton_p_theta.png");
    h_pip_p_theta_accidsub->Rebin2D();
    h_pip_p_theta_accidsub->Draw("COLZ");
    c1->Print("deltapi_pip_p_theta.png");
    h_pim_p_theta_accidsub->Rebin2D();
    h_pim_p_theta_accidsub->Draw("COLZ");
    c1->Print("deltapi_pim_p_theta.png");
    delete c1;
	
	return 0;
}
开发者ID:JeffersonLab,项目名称:gluex_workshops,代码行数:31,代码来源:MakeAndFitHists.C


示例14: local_thr

    //  Function initializes parameter structure for each thread and starts
    //  local_worker_function(s) in separate thread(s).
    void local_thr (i_transport *transport_, size_t msg_size_, 
        int msg_count_)
    {
        
        //  Timestamp captured after receiving first message.
        time_instant_t start_time = 0;

        //  Receive msg_nbr messages of msg_size.
        for (int msg_nbr = 0; msg_nbr < msg_count_; msg_nbr++)
        {
            size_t size = transport_->receive ();

            //  Capture arrival timestamp of the first message (test start).
            if (msg_nbr == 0)
                start_time  = now ();
            
            //  Check incomming message size.
            assert (size == msg_size_);
        }

        //  Capture test stop timestamp.
        time_instant_t stop_time = now();
        
        //  Send sync message to the peer.
        transport_->send (1);

        //  Calculate results.

        //  Test time in [ms] with [ms] resolution, do not use for math!!!
        uint64_t test_time = uint64_t (stop_time - start_time) /
            (uint64_t) 1000000;
                
        //  Throughput [msgs/s].
        uint64_t msg_thput = ((uint64_t) 1000000000 *
            (uint64_t) msg_count_) / (uint64_t) (stop_time - start_time);

        //  Throughput [Mb/s].
        uint64_t tcp_thput = (msg_thput * msg_size_ * 8) /
            (uint64_t) 1000000;
                
        std::cout << "Your average throughput is " << msg_thput 
            << " [msg/s]" << std::endl;
        std::cout << "Your average throughput is " << tcp_thput 
            << " [Mb/s]" << std::endl << std::endl;
 
        //  Save the results into tests.dat file.
        std::ofstream outf ("tests.dat", std::ios::out | std::ios::app);
        assert (outf.is_open ());
        
        //  Output file format, separate line for each run is appended 
        //  to the tests.dat file.
        //
        //  thread count, message count, msg size [B], test time [ms],
        //  throughput [msg/s],throughput [Mb/s]
        //
        outf << "1" << "," << msg_count_ << "," << msg_size_ << "," 
            << test_time << "," << msg_thput << "," << tcp_thput << std::endl;
        
        outf.close (); 
    }
开发者ID:PVanV,项目名称:zeromq1,代码行数:62,代码来源:thr.hpp


示例15: main

nomask private void main()
{
  outf("%s currently has the following quests:\n", mud_name());
  out(implode(QUEST_D->get_goals_for_quests_cmd(),"\n"));
  out("\n\nType help <questname> for more info about a quest.\n");

}
开发者ID:ClockworkSoul,项目名称:MortalRemains,代码行数:7,代码来源:quests.c


示例16: main

int main(int, char **)
{
    QFile outf("./sip/QtOpenGL/opengl_types.sip");

    if (!outf.open(QIODevice::WriteOnly|QIODevice::Truncate|QIODevice::Text))
        return 1;

    QTextStream out(&outf);

    if (sizeof (long) == sizeof (GLint))
        out << "typedef long GLint;\n";
    else
        out << "typedef int GLint;\n";

    if (sizeof (unsigned long) == sizeof (GLuint))
        out << "typedef unsigned long GLuint;\n";
    else
        out << "typedef unsigned GLuint;\n";

    if (sizeof (unsigned long) == sizeof (GLenum))
        out << "typedef unsigned long GLenum;\n";
    else
        out << "typedef unsigned GLenum;\n";

    if (sizeof (unsigned long) == sizeof (GLbitfield))
        out << "typedef unsigned long GLbitfield;\n";
    else
        out << "typedef unsigned GLbitfield;\n";

    out << "typedef float GLfloat;\n";

    return 0;
}
开发者ID:ClydeMojura,项目名称:android-python27,代码行数:33,代码来源:opengl_extras.cpp


示例17: outf

void Dialog::on_pushButton_clicked()
{
    std::ofstream outf("Login Data.dat", std::ios::app);
    for (unsigned int i = 0 ; i < ui->listWidget->count() ; i++)
        outf << ui->listWidget->item(i)->text().toStdString() << std::endl;

}
开发者ID:behnejad,项目名称:Qt_virus_Gui,代码行数:7,代码来源:dialog.cpp


示例18: outf

void Inventory::toFile(std::string filename){
    std::ofstream outf(filename);
    if (outf){
        if(filename == "game.txt"){
            for(int i = 0; i < numGames; i++){
                ItemADT* curr = gameStock.get(i);
                if(curr != nullptr){
                    outf << curr->fileFormat() + ",\n";
                }
            }
        }
        if(filename == "console.txt"){
            for(int i = 0; i < numConsoles; i++){
                ItemADT* curr = consoleStock.get(i);
                if(curr != nullptr){
                    outf << curr->fileFormat() + ",\n";
                }
            }

        }
        if(filename == "accessory.txt"){
            for(int i = 0; i < numAccessories; i++){
                ItemADT* curr = acessStock.get(i);
                if(curr != nullptr){
                    outf << curr->fileFormat() + ",\n";
                }
            }
        }	
//        outf.close();
    }
    else { // Print an error and exit
        outf.close();
        std::cout << "Unable to write to file.\n";
    }
}
开发者ID:daviddorsey,项目名称:CS220-Term-Project,代码行数:35,代码来源:Inventory.cpp


示例19: xsection

void xsection(Double_t rsi)
{
// Macro example for bases calculation.
  gROOT->Reset();
  TFile file("bases.root","RECREATE");

  jsf = new JSFSteer();    // required to read parameter from jsf.conf
  
  bases = new ZZHBases();
  bases->SetEcmInit(rsi);

//  bases->SetNoOfSample(10000);
//  bases->SetIteration1( 0.2, 10);
//  bases->SetIteration2( 0.1, 10);
  bases->Bases();
  bases->Bh_plot();
  bases->Userout();
  bases->Write();

  Double_t rs  = bases->GetEcmInit();
  Double_t sg  = bases->GetEstimate();
  Double_t dsg = bases->GetError();
  ofstream outf("xsection.zzh.dat",std::ios::app);
  outf << rs << " " << sg << " " << dsg << endl;

  file.Write();
}
开发者ID:SimTools,项目名称:physsim,代码行数:27,代码来源:xsection.C


示例20: outs

void ParamInfo::out_parameter(const char * pfx, int forclarion)
{
    if (forclarion && (clarion_special_type()==cte_cstr))
        outs("int, ");
    out_type();
    outf(" %s%s",pfx,name);
}
开发者ID:miguelvazq,项目名称:HPCC-Platform,代码行数:7,代码来源:esdlcomp.cpp



注:本文中的outf函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ outfile函数代码示例发布时间:2022-05-30
下一篇:
C++ outerror函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap