当前位置: 首页>>代码示例>>C++>>正文


C++ MemoryWriter::getOptions方法代码示例

本文整理汇总了C++中MemoryWriter::getOptions方法的典型用法代码示例。如果您正苦于以下问题:C++ MemoryWriter::getOptions方法的具体用法?C++ MemoryWriter::getOptions怎么用?C++ MemoryWriter::getOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MemoryWriter的用法示例。


在下文中一共展示了MemoryWriter::getOptions方法的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;
}
开发者ID:hcmlab,项目名称:mobileSSI,代码行数:63,代码来源:Main.cpp


注:本文中的MemoryWriter::getOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。