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

C++ status类代码示例

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

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



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

示例1: code_gen

void n_init_decl::code_gen(status& stat, std::ostream& out)
{
	if (left != NULL)
	{
		stat.set_decl(false); // let the id node know that a variable is being declared
		left->code_gen(stat, out);
		stat.set_decl(false);
	}

	if (right != NULL) // if variable is initialised to value
	{
		if (stat.global_var())
		{
			std::stringstream amount;
			right->print(amount);
			out << "\t" << amount.str() << "\n";
		}
		else
		{
			stat.lock_register(out);
			stat.set_assign_expr();
			// evaluate assign expr
			right->code_gen(stat, out);
			stat.set_assign_var(); // let the id node know that a variable is being set to a value
			left->code_gen(stat, out);
			stat.set_assign_var();
			stat.unlock_register(out);
			stat.set_assign_expr();
		}
	}
	else if (stat.global_var())
		out << "\n";

	return;
}
开发者ID:coopersimon,项目名称:Compiler,代码行数:35,代码来源:ast.cpp


示例2: build_status

void v_float::build_status(status& stat, std::ostream& out)
{
	stat.change_text_data("rdata", out);
	out << stat.data_label_gen() << ":\n";
	out << "\t.word\t" << value.i << "\n";
	return;
}
开发者ID:coopersimon,项目名称:Compiler,代码行数:7,代码来源:ast.cpp


示例3: wait_children

inline status wait_children(Children &cs) 
{ 
    BOOST_ASSERT(cs.size() >= 2); 

    typename Children::iterator it = cs.begin(); 
    while (it != cs.end()) 
    { 
        const status s = it->wait(); 
        ++it; 
        if (it == cs.end()) 
            return s; 
        else if (!s.exited() || s.exit_status() != EXIT_SUCCESS) 
        { 
            while (it != cs.end()) 
            { 
                it->wait(); 
                ++it; 
            } 
            return s; 
        } 
    } 

    BOOST_ASSERT(false); 
    return cs.begin()->wait(); 
} 
开发者ID:allannielsen,项目名称:termhub,代码行数:25,代码来源:operations.hpp


示例4: visit

    template < typename K, typename V > static void visit( const K& key, const status& t, V& v )
    {
        v.apply( "t", t.timestamp );
        v.apply( "position", t.get_position() );

        // todo: quick and dirty, output as bitmask (or implement bitmask as csv type)
        v.apply( "con", t.status_response.status.con() );
        v.apply( "exec", t.status_response.status.exec() );
        v.apply( "des", t.status_response.status.des() );
        v.apply( "oslr", t.status_response.status.oslr() );
        v.apply( "cwm", t.status_response.status.cwm() );
        v.apply( "ccwm", t.status_response.status.ccwm() );
        v.apply( "upm", t.status_response.status.upm() );
        v.apply( "dwnm", t.status_response.status.dwnm() );
        
        v.apply( "cwsl", t.status_response.response_pan_status.cwsl() );
        v.apply( "ccwsl", t.status_response.response_pan_status.ccwsl() );
        v.apply( "cwhl", t.status_response.response_pan_status.cwhl() );
        v.apply( "ccwhl", t.status_response.response_pan_status.ccwhl() );
        v.apply( "pan-to", t.status_response.response_pan_status.to() );
        v.apply( "pan-de", t.status_response.response_pan_status.de() );
        
        v.apply( "usl", t.status_response.response_tilt_status.usl() );
        v.apply( "dsl", t.status_response.response_tilt_status.dsl() );
        v.apply( "uhl", t.status_response.response_tilt_status.uhl() );
        v.apply( "dhl", t.status_response.response_tilt_status.dhl() );
        v.apply( "tilt-to", t.status_response.response_tilt_status.to() );
        v.apply( "tilt-de", t.status_response.response_tilt_status.de() );
    }
开发者ID:,项目名称:,代码行数:29,代码来源:


示例5: INV

/// Terminates the current process reproducing the given status.
///
/// The caller process is abruptly terminated.  In particular, no output streams
/// are flushed, no destructors are called, and no atexit(2) handlers are run.
///
/// \param status The status to "re-deliver" to the caller process.
void
process::terminate_self_with(const status& status)
{
    if (status.exited()) {
        ::_exit(status.exitstatus());
    } else {
        INV(status.signaled());
        (void)::kill(::getpid(), status.termsig());
        UNREACHABLE_MSG(F("Signal %s terminated %s but did not terminate "
                          "ourselves") % status.termsig() % status.dead_pid());
    }
}
开发者ID:racktopsystems,项目名称:kyua,代码行数:18,代码来源:operations.cpp


示例6:

bool operator<(status const& lhs, status const& rhs)
{
    return lhs.get_code() < rhs.get_code();
}
开发者ID:ilya-golovenko,项目名称:chat-daemon,代码行数:4,代码来源:status.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ std类代码示例发布时间:2022-05-31
下一篇:
C++ statik类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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