MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / add_line_collections

Function add_line_collections

tests/model/test-section.cpp:162–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162std::array< geode::uuid, 2 > add_line_collections(
163 const geode::Section& section, geode::SectionBuilder& builder )
164{
165 std::array< geode::uuid, 2 > uuids;
166 for( auto mb : geode::Range{ 2 } )
167 {
168 uuids[mb] = builder.add_line_collection();
169 builder.set_line_collection_name(
170 uuids[mb], absl::StrCat( "collection", mb + 1 ) );
171 }
172 const auto& temp_collection =
173 section.line_collection( builder.add_line_collection() );
174 builder.remove_line_collection( temp_collection );
175 const auto message =
176 absl::StrCat( "Section should have ", 2, " line collections" );
177 geode::OpenGeodeModelException::test(
178 section.nb_line_collections() == 2, message );
179 geode::OpenGeodeModelException::test(
180 geode::detail::count_range_elements( section.line_collections() ) == 2,
181 message );
182 geode::OpenGeodeModelException::test(
183 section.line_collection( uuids[0] ).name() == "collection1",
184 "Wrong LineCollection name" );
185 return uuids;
186}
187
188std::array< geode::uuid, 2 > add_surface_collections(
189 const geode::Section& section, geode::SectionBuilder& builder )

Callers 1

testFunction · 0.70

Calls 8

count_range_elementsFunction · 0.85
nb_line_collectionsMethod · 0.80
line_collectionsMethod · 0.80
nameMethod · 0.80
testFunction · 0.70
add_line_collectionMethod · 0.45

Tested by

no test coverage detected