本文整理汇总了C++中MemoryWriter::getStream方法的典型用法代码示例。如果您正苦于以下问题:C++ MemoryWriter::getStream方法的具体用法?C++ MemoryWriter::getStream怎么用?C++ MemoryWriter::getStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemoryWriter
的用法示例。
在下文中一共展示了MemoryWriter::getStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ex_writer
bool ex_writer(void *arg) {
ITheFramework *frame = Factory::GetFramework();
Decorator *decorator = ssi_create (Decorator, 0, true);
frame->AddDecorator(decorator);
Mouse *mouse = ssi_create (Mouse, 0, true);
ITransformable *cursor_p = frame->AddProvider(mouse, SSI_MOUSE_CURSOR_PROVIDER_NAME);
frame->AddSensor(mouse);
File::SetLogLevel(SSI_LOG_LEVEL_DEBUG);
bool continuous = true;
MemoryWriter *memory;
memory = ssi_create(MemoryWriter, 0, true);
memory->getOptions()->setSize("10.0s");
frame->AddConsumer(cursor_p, memory, "0.5s");
FileWriter *writer;
writer = ssi_create(FileWriter, 0, true);
writer->getOptions()->setPath("");
writer->getOptions()->setDelim(" ; ");
writer->getOptions()->type = File::ASCII;
writer->getOptions()->stream = continuous;
frame->AddConsumer(cursor_p, writer, "0.5s");
writer = ssi_create (FileWriter, 0, true);
writer->getOptions()->setPath("cursor_txt");
writer->getOptions()->type = File::ASCII;
writer->getOptions()->setDelim(";");
writer->getOptions()->stream = continuous;
writer->getOptions()->setMeta("some=meta;hello=world");
frame->AddConsumer(cursor_p, writer, "0.5s");
writer = ssi_create (FileWriter, 0, true);
writer->getOptions()->setPath("cursor_bin");
writer->getOptions()->type = File::BINARY;
writer->getOptions()->stream = continuous;
frame->AddConsumer(cursor_p, writer, "0.5s");
writer = ssi_create (FileWriter, 0, true);
writer->getOptions()->setPath("cursor_lz4");
writer->getOptions()->type = File::BIN_LZ4;
writer->getOptions()->stream = continuous;
frame->AddConsumer(cursor_p, writer, "0.5s");
decorator->add("console", 0, 0, 650, 800);
decorator->add("plot*", 650, 0, 400, 400);
decorator->add("monitor*", 650, 400, 400, 400);
frame->Start();
frame->Wait();
frame->Stop();
frame->Clear();
ssi_stream_print(memory->getStream(), stdout);
return true;
}