本文整理汇总了C++中Tag::createFeature方法的典型用法代码示例。如果您正苦于以下问题:C++ Tag::createFeature方法的具体用法?C++ Tag::createFeature怎么用?C++ Tag::createFeature使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tag
的用法示例。
在下文中一共展示了Tag::createFeature方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void BaseTestReadOnly::init(nix::File &file) {
startup_time = time(NULL);
std::vector<nix::Value> values = { nix::Value(1.0),
nix::Value(2.0),
nix::Value(-99.99) };
std::vector<double> ticks = {1.0, 2.0, 3.4, 42.0};
Section section = file.createSection("foo_section", "metadata");
Block block = file.createBlock("block_one", "dataset");
DataArray positions = block.createDataArray("positions_DataArray", "dataArray",
DataType::Double, NDSize({ 0, 0 }));
DataArray data_array = block.createDataArray("array_one",
"testdata",
nix::DataType::Double,
nix::NDSize({ 0, 0, 0 }));
Dimension dim = data_array.appendSampledDimension(3.14);
SampledDimension dim_sampled = data_array.appendSampledDimension(3.14);
RangeDimension dim_range = data_array.appendRangeDimension(ticks);
SetDimension dim_set = data_array.appendSetDimension();
Tag tag = block.createTag("featureTest", "Test", {0.0, 2.0, 3.4});
MultiTag mtag = block.createMultiTag("tag_one", "test_tag", positions);
Feature feature = tag.createFeature(data_array, nix::LinkType::Tagged);
Property property = section.createProperty("doubleProperty", values);
section_id = section.id(); feature_id = feature.id(); tag_id = tag.id();
mtag_id = mtag.id(); property_id = property.id(); block_id = block.id();
data_array_id = data_array.id(); dim_index = dim.index();
dim_sampled_index = dim_sampled.index(); dim_range_index = dim_range.index();
dim_set_index = dim_set.index();
file.close();
}