载入中...
搜索中...
未找到
PcgPhotoModePhoto.cpp
浏览该文件的文档.
30Result<void> PcgPhotoModePhotoAuthority::applyPhotoModeField(const PhotoModeAssignment& assignment) {
50 if (!value || *value < 0 || *value > 9) return invalid("screenshot resolution index must be in [0,9]");
54 if (!value || *value < 0 || *value > 3) return invalid("screenshot format index must be in [0,3]");
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
void setAuthority(bool enabled)
Register or revoke this instance as the unique Photo-domain owner.
Definition PcgPhotoModePhoto.cpp:13
Result< void > applyPhotoModeField(const PhotoModeAssignment &assignment) override
Applies photo mode field.
Definition PcgPhotoModePhoto.cpp:30
bool lightingProfileMatches(int currentProfile) const noexcept
Test whether retained lighting identity matches the current scene profile.
Definition PcgPhotoModePhoto.cpp:70
PhotoModeFieldAcceptance acceptsPhotoModeField(const PhotoModeAssignment &assignment) const noexcept override
Accepts photo mode field.
Definition PcgPhotoModePhoto.cpp:20
~PcgPhotoModePhotoAuthority() override
Pcg photo mode photo authority.
Definition PcgPhotoModePhoto.cpp:9
PcgScreenshotSize screenshotSize() const noexcept
Resolve Pcg's fixed resolution index; index zero returns 0x0 for screen size.
Definition PcgPhotoModePhoto.cpp:75
const char * screenshotExtension() const noexcept
Return the lowercase extension for the retained screenshot format. @ownership The returned pointer bo...
Definition PcgPhotoModePhoto.cpp:82
Definition Component.cpp:5
@ InvalidArgument
PhotoModeFieldAcceptance
Capability implemented by the composition root that routes assignments to domain owners.
Definition PcgPhotoModeApply.h:32
@ Accepted
@ Rejected
@ Lighting
@ Photo
One reversible field assignment in a photo-mode transaction.
Definition PcgPhotoModeApply.h:15
int screenshotResolution
Definition PcgPhotoModePhoto.h:22
PcgScreenshotFormat screenshotFormat
Definition PcgPhotoModePhoto.h:23
Resolved screenshot dimensions; zero means the current drawable size.
Definition PcgPhotoModePhoto.h:15