本文整理汇总了C++中iface::displayer::show_cpp_code方法的典型用法代码示例。如果您正苦于以下问题:C++ displayer::show_cpp_code方法的具体用法?C++ displayer::show_cpp_code怎么用?C++ displayer::show_cpp_code使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类iface::displayer
的用法示例。
在下文中一共展示了displayer::show_cpp_code方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run
void pragma_environment_add::run(
const data::command::iterator& args_begin_,
const data::command::iterator& args_end_,
iface::displayer& displayer_
) const
{
const std::string cmd = tokens_to_string(args_begin_, args_end_);
_shell.store_in_buffer(cmd, displayer_);
if (is_environment_setup_command(args_begin_, args_end_))
{
displayer_.show_comment(
data::text(
"You don't need the environment add pragma to add this to the"
" environment. The following command does this as well:"
)
);
displayer_.show_cpp_code(cmd);
}
else
{
displayer_.show_comment(
data::text(
"Metashell (incorrectly) thinks that this command should execute a"
" metaprogram and would not add it to the environment without using"
" the \"environment add\" pragma. Please file a bug report containing"
" this command (" + cmd + ") at"
" https://github.com/sabel83/metashell/issues. Thank you."
)
);
}
}
示例2: run
void pragma_macros::run(iface::displayer& displayer_) const
{
displayer_.show_cpp_code(_shell.engine().macros(_shell.env()));
}