MCPcopy Create free account
hub / github.com/OpenAssetIO/OpenAssetIO / populateUI

Method populateUI

src/openassetio-ui/src/ui/hostApi/UIDelegate.cpp:81–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81std::optional<UIDelegateStatePtr> UIDelegate::populateUI(
82 const trait::TraitsDataConstPtr& uiTraitsData, const access::UIAccess uiAccess,
83 UIDelegateRequestInterfacePtr uiRequestInterface, const ContextConstPtr& context) {
84 if (uiRequestInterface == nullptr) {
85 throw errors::InputValidationException{"UI delegate request cannot be null."};
86 }
87
88 auto maybeUIDelegateStateInterface = uiDelegateInterface_->populateUI(
89 uiTraitsData, uiAccess, managerApi::UIDelegateRequest::make(std::move(uiRequestInterface)),
90 context, hostSession_);
91
92 if (!maybeUIDelegateStateInterface.has_value()) {
93 return std::nullopt;
94 }
95
96 auto uiDelegateStateInterface = std::move(*maybeUIDelegateStateInterface);
97 if (uiDelegateStateInterface == nullptr) {
98 throw errors::InputValidationException{"UI delegate state is null."};
99 }
100
101 return UIDelegateState::make(std::move(uiDelegateStateInterface));
102}
103
104} // namespace ui::hostApi
105} // namespace OPENASSETIO_CORE_ABI_VERSION

Callers 1

UIDelegateTest.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected