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

Function managers_have_same_attributes

tests/basic/test-attribute.cpp:320–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320bool managers_have_same_attributes( const geode::AttributeManager& manager,
321 const geode::AttributeManager& reloaded_manager )
322{
323 const auto& attribute_names = manager.attribute_names();
324 const auto& reloaded_attribute_names = reloaded_manager.attribute_names();
325 if( attribute_names.size() != reloaded_attribute_names.size() )
326 {
327 return false;
328 }
329 for( const auto& att : attribute_names )
330 {
331 if( absl::c_find( reloaded_attribute_names, att )
332 == reloaded_attribute_names.end() )
333 {
334 return false;
335 }
336 }
337 for( const auto& att : reloaded_attribute_names )
338 {
339 if( absl::c_find( attribute_names, att ) == attribute_names.end() )
340 {
341 return false;
342 }
343 }
344 return true;
345}
346
347template < typename T >
348void check_one_attribute_values( geode::AttributeManager& manager,

Callers 1

test_serialize_managerFunction · 0.85

Calls 3

attribute_namesMethod · 0.45
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected