![]() |
Murl Engine API
Version 2024.1
|
The ICondition resource interface. More...
#include <murl_resource_i_condition.h>
The ICondition resource interface.
The condition interface represents a mechanism for checking if a resource is valid for a given configuration, queried via an IAppConfiguration object. The resource may contain any number of tag key/value pairs, which specify the individual configuration item(s) to check. All of the given values must match the given configuration for the resource to be valid.
Inherited by Murl::Resource::Condition.
Public Types | |
enum | Tag { TAG_LANGUAGE , TAG_TARGET_CLASS , TAG_TARGET_DEVICE , TAG_OPERATING_SYSTEM , TAG_GPU , TAG_PRESCALE_FACTOR , TAG_VIDEO_API , TAG_AUDIO_API , TAG_FEATURE , TAG_USER_CONFIGURATION , TAG_TARGET_HOST , TAG_VALUE_MASK , TAG_KEY_MASK , TAG_COMBINE_MASK , TAG_INCLUDE_MASK , TAG_EXCLUDE_MASK , TAG_SHIFT } |
Condition tags. More... | |
enum | CheckConfig { CHECK_CONFIG_LANGUAGE , CHECK_CONFIG_TARGET_CLASS , CHECK_CONFIG_TARGET_DEVICE , CHECK_CONFIG_OPERATING_SYSTEM , CHECK_CONFIG_GPU , CHECK_CONFIG_PRESCALE_FACTOR , CHECK_CONFIG_VIDEO_API , CHECK_CONFIG_AUDIO_API , CHECK_CONFIG_FEATURE , CHECK_CONFIG_USER_CONFIGURATION , CHECK_CONFIG_TARGET_HOST , CHECK_CONFIG_ALL } |
Check config bits. More... | |
Public Member Functions | |
virtual Bool | IsValidForConfiguration (const IAppConfiguration *appConfig, UInt32 checkConfig=CHECK_CONFIG_ALL) const =0 |
Check if the condition holds for a given configuration. More... | |
virtual const UInt32 * | GetTags () const =0 |
Get a raw pointer to the tags. More... | |
virtual UInt32 | GetNumberOfTags () const =0 |
Get the number of tags present. More... | |
virtual const Char *const * | GetStrings () const =0 |
Get a raw pointer to the user-defined configuration strings. More... | |
virtual UInt32 | GetNumberOfStrings () const =0 |
Get the number of user-defined configuration strings. More... | |
Condition tags.
Enumerator | |
---|---|
TAG_LANGUAGE | Current language, see IAppConfiguration::IsLanguageMatching(). |
TAG_TARGET_CLASS | Target class, see IPlatformConfiguration::IsTargetClassMatching(). |
TAG_TARGET_DEVICE | Target device, see IPlatformConfiguration::IsTargetDeviceMatching(). |
TAG_OPERATING_SYSTEM | Operating system, see IPlatformConfiguration::IsOperatingSystemMatching(). |
TAG_GPU | GPU, see IPlatformConfiguration::IsGpuMatching(). |
TAG_PRESCALE_FACTOR | Texture prescale factor, see IEngineConfiguration::IsTexturePrescaleDivisorMatching(). |
TAG_VIDEO_API | Selected video API, see IEngineConfiguration::IsVideoApiMatching(). |
TAG_AUDIO_API | Selected audio API, see IEngineConfiguration::IsAudioApiMatching(). |
TAG_FEATURE | Engine features, see IEngineConfiguration::GetFeatures(). |
TAG_USER_CONFIGURATION | User-defined configuration, see IAppConfiguration::IsUserConfigurationMatching(). |
TAG_TARGET_HOST | Target host, see IPlatformConfiguration::IsTargetHostMatching(). |
TAG_VALUE_MASK | Bit mask for tag value. |
TAG_KEY_MASK | Bit mask for tag key. |
TAG_COMBINE_MASK | Tag key flag to combine multiple tags of the same type. |
TAG_INCLUDE_MASK | Tag key flag to include the given value in the valid configuration set. |
TAG_EXCLUDE_MASK | Tag key flag to exclude the given value from the valid configuration set. |
TAG_SHIFT | Number of bits to shift the tag key to the left. |
Check config bits.
Enumerator | |
---|---|
CHECK_CONFIG_LANGUAGE | Current language, see IAppConfiguration::IsLanguageMatching(). |
CHECK_CONFIG_TARGET_CLASS | Target class, see IPlatformConfiguration::IsTargetClassMatching(). |
CHECK_CONFIG_TARGET_DEVICE | Target device, see IPlatformConfiguration::IsTargetDeviceMatching(). |
CHECK_CONFIG_OPERATING_SYSTEM | Operating system, see IPlatformConfiguration::IsOperatingSystemMatching(). |
CHECK_CONFIG_GPU | GPU, see IPlatformConfiguration::IsGpuMatching(). |
CHECK_CONFIG_PRESCALE_FACTOR | Texture prescale factor, see IEngineConfiguration::IsTexturePrescaleDivisorMatching(). |
CHECK_CONFIG_VIDEO_API | Selected video API, see IEngineConfiguration::IsVideoApiMatching(). |
CHECK_CONFIG_AUDIO_API | Selected audio API, see IEngineConfiguration::IsAudioApiMatching(). |
CHECK_CONFIG_FEATURE | Engine features, see IEngineConfiguration::GetFeatures(). |
CHECK_CONFIG_USER_CONFIGURATION | User-defined configuration, see IAppConfiguration::IsUserConfigurationMatching(). |
CHECK_CONFIG_TARGET_HOST | Target host, see IPlatformConfiguration::IsTargetHostMatching(). |
CHECK_CONFIG_ALL | All configs combined. |
|
pure virtual |
Check if the condition holds for a given configuration.
appConfig | The configuration object to check against. |
checkConfig | Combination of CheckConfig enum values to check for |
|
pure virtual |
Get a raw pointer to the tags.
|
pure virtual |
Get the number of tags present.
|
pure virtual |
Get a raw pointer to the user-defined configuration strings.
|
pure virtual |
Get the number of user-defined configuration strings.