本文整理汇总了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;未经允许,请勿转载。 |
请发表评论