本文整理汇总了C++中Bundle::Stop方法的典型用法代码示例。如果您正苦于以下问题:C++ Bundle::Stop方法的具体用法?C++ Bundle::Stop怎么用?C++ Bundle::Stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bundle
的用法示例。
在下文中一共展示了Bundle::Stop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: us_bundle_stop
pointer us_bundle_stop(scheme* sc, pointer args)
{
if(args == sc->NIL)
{
std::cerr << "Empty argument list" << std::endl;
return sc->F;
}
if (sc->vptr->list_length(sc, args) != 1)
{
return sc->F;
}
pointer arg = pair_car(args);
Bundle bundle;
if (is_string(arg))
{
std::string name = sc->vptr->string_value(arg);
bundle = get_bundle(name);
}
else if (is_integer(arg))
{
bundle = GetBundleContext().GetBundle(ivalue(arg));
}
if (bundle)
{
try
{
bundle.Stop();
return sc->T;
}
catch (const std::exception& e)
{
std::cerr << e.what();
}
}
return sc->F;
}