ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ZenitUI::ZMarkup::BuildContext Struct Reference

Per-build accumulator for #id, @ref, and runtime structural bindings. More...

#include <ZMarkup.hpp>

Public Member Functions

bool isConditionVisible (const std::string &condName) const
const Registry * resolveRegistry (std::shared_ptr< const Registry > &keepAlive) const
 Resolve the active Registry for runtime structural operations (Each).

Public Attributes

std::unordered_map< std::string, std::weak_ptr< Layout > > byId
std::unordered_map< std::string, std::vector< std::weak_ptr< Layout > > > byRef
std::vector< SlotFrame > slotStack
std::vector< std::string > conditionStack
std::unordered_map< std::string, ConditionBinding > conditions
std::unordered_map< std::string, EachBinding > eaches
std::unordered_map< std::string, std::shared_ptr< void > > conditionSubs
std::unordered_map< std::string, std::shared_ptr< void > > eachSubs
const Registry * registry {nullptr}
std::weak_ptr< const Registry > registryOwner
bool usesOwnedRegistry {false}
bool attachedToRoot {false}

Detailed Description

Per-build accumulator for #id, @ref, and runtime structural bindings.

Holds only non-owning (weak_ptr) references to Layout nodes so that the root Layout can safely retain BuildContext via retainObject without introducing reference cycles.

Member Function Documentation

◆ resolveRegistry()

const Registry * ZenitUI::ZMarkup::BuildContext::resolveRegistry ( std::shared_ptr< const Registry > & keepAlive) const

Resolve the active Registry for runtime structural operations (Each).

If this context was built from a UIContext-owned registry, locks registryOwner into keepAlive and returns nullptr if the owning UIContext has expired. Otherwise returns registry (falling back to getGlobalRegistry()).


The documentation for this struct was generated from the following file: