本文整理汇总了C++中StringOutputStream::get_string方法的典型用法代码示例。如果您正苦于以下问题:C++ StringOutputStream::get_string方法的具体用法?C++ StringOutputStream::get_string怎么用?C++ StringOutputStream::get_string使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringOutputStream
的用法示例。
在下文中一共展示了StringOutputStream::get_string方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: unreadable_string
AbstractString * ZeroRankArray::write_to_string()
{
Thread * thread = current_thread();
bool print_readably = (thread->symbol_value(S_print_readably) != NIL);
if (print_readably)
{
if (_element_type != T)
signal_lisp_error(new PrintNotReadable(make_value(this)));
}
if (print_readably || thread->symbol_value(S_print_array) != NIL)
{
String * s = new String("#0A");
if (aref(0) == make_value(this) && thread->symbol_value(S_print_circle) != NIL)
{
StringOutputStream * stream = new StringOutputStream(S_character);
thread->execute(the_symbol(S_output_object)->function(), aref(0), make_value(stream));
s->append(stream->get_string());
}
else
s->append(::write_to_string(aref(0)));
return s;
}
else
return unreadable_string();
}
示例2: unreadable_string
AbstractString * StandardObject::write_to_string()
{
if (CL_fboundp(S_print_object) != NIL)
{
Thread * const thread = current_thread();
StringOutputStream * stream = new StringOutputStream(S_character);
thread->execute(the_symbol(S_print_object)->function(),
make_value(this),
make_value(stream));
AbstractString * s = stream->get_string();
return s;
}
else
return unreadable_string();
}
示例3: format_to_string
AbstractString * Condition::write_to_string()
{
Thread * const thread = current_thread();
if (CL_fboundp(S_print_object) != NIL)
{
StringOutputStream * stream = new StringOutputStream(S_character);
thread->execute(the_symbol(S_print_object)->function(),
make_value(this),
make_value(stream));
AbstractString * s = stream->get_string();
return s;
}
if (thread->symbol_value(S_print_escape) == NIL && thread->symbol_value(S_print_readably) == NIL)
{
if (stringp(format_control()))
{
if (format_arguments() != NIL)
return format_to_string(format_control(), format_arguments());
else
return the_string(format_control());
}
}
return unreadable_string();
}