// A helper class containing configured values that can be safely assumed during compile time. class AssumeValueOptions final { public: static constexpr uint32_t kUnsetSdkInt = static_cast<uint32_t>(SdkVersion::kUnset);
AssumeValueOptions() = default;
// Conditionally gets the assumed value for a given member, if defined. // Returns whether the field has a corresponding assumed value. bool MaybeGetAssumedValue(ArtField* field, int32_t* value) const;
// The assumed Build.VERSION.SDK_INT value to use for compilation. // Defaults to kUnsetSdkInt unless explicitly configured.
uint32_t SdkInt() const { return sdk_int_; }
// Whether a valid, explicit SDK_INT has been set for compilation. bool HasValidSdkInt() const { return sdk_int_ != kUnsetSdkInt; }
// Sets the assumed Build.VERSION.SDK_INT value to user for compilation, if supported.
EXPORT void SetSdkInt(uint32_t sdk_int);
private: // The assumed android.os.Build.VERSION.SDK_INT value to use during compilation.
uint32_t sdk_int_ = kUnsetSdkInt;
// Only used for testing.
std::map<ArtField*, int32_t> assumed_value_overrides_;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.