MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / pushTree

Function pushTree

source/MRViewer/MRUITestEngine.cpp:241–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void pushTree( std::string_view name )
242{
243 #if MR_ENABLE_UI_TEST_ENGINE
244 checkForNewFrame();
245
246 auto& map = state.stack.back()->elems;
247 auto iter = map.find( name ); // I wish I could use `std::try_emplace` here directly...
248 if ( iter == map.end() )
249 iter = map.try_emplace( std::string( name ) ).first;
250 else
251 assert( !iter->second.visitedOnThisFrame && "Registering the same entry more than once in a single frame!" );
252
253 GroupEntry* subgroup = std::get_if<GroupEntry>( &iter->second.value );
254 if ( !subgroup )
255 subgroup = &iter->second.value.emplace<GroupEntry>();
256
257 iter->second.visitedOnThisFrame = true;
258
259 state.stack.push_back( subgroup );
260 #endif
261}
262
263void popTree()
264{

Callers 10

drawMenuUIMethod · 0.85
drawToolbarMethod · 0.85
drawCustomizeMethod · 0.85
BeginCustomStatePluginFunction · 0.85
drawHeaderPannel_Method · 0.85
drawSceneListButtons_Method · 0.85
drawTopPanelOpened_Method · 0.85
drawNotification_Method · 0.85
TreeGuardMethod · 0.85

Calls 4

checkForNewFrameFunction · 0.85
push_backMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected