[This is preliminary documentation and subject to change.]
Qualifier flavors describe the use of a qualifer. Flavors can be specified with predefined flags in class and instance declarations using the Managed Object Format (MOF) language and accessed with numeric constants using the IWbemQualifierSet interface. Whereas developers can define new qualifiers to support their custom classes, they cannot define new flavors. All new and existing classes must use flavors that have been defined by WBEM.
WBEM flavors describe rules that specify whether a qualifier can be propagated to derived classes and instances and whether or not a derived class or instance can override the qualifier's original value. Qualifiers can propagate from:
Qualifiers that are declared on the class or instance do not propagate to properties of that class or instance. The single exception to this rule is the Key standard qualifier which is used to uniquely identify an instance.
Override permissions define whether or not a subclass can change the meaning of a qualifier defined in the superclass. Override permissions are set in conjunction with propagation rules. That is, if propagation rules are set for a qualifier, it must also have override permissions to specify how values are set for the qualifier in the derived classes or instances.
The following table describes the flags that are used to specify flavors in MOF syntax:
Flavor flag | Description |
---|---|
DisableOverride | Qualifier value cannot be overridden in a derived class or an instance. |
EnableOverride | Qualifier value can be overridden in a derived class or an instance. |
NotToInstance | Qualifier is not propagated to instances. |
NotToSubclass | Qualifier is not propagated to derived classes. |
Restricted | Qualifier is not propagated to instances or derived classes. This is the default behavior of the qualifier when a flavor is not specified. |
ToInstance | Qualifier is propagated to instances. |
ToSubclass | Qualifier is propagated to derived classes. |
WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS
WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE
WBEM_FLAVOR_OVERRIDABLE
WBEM_FLAVOR_NOT_OVERRIDABLE
Setting a qualifier's flavor to WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS is the same as using the ToSubclass flag. The qualifier is propagated to all classes derived from this class. The WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE value is the same as the ToInstance flag and indicates that the qualifier is propagated to all instances of this class.
The WBEM_FLAVOR_OVERRIDABLE and WBEM_FLAVOR_NOT_OVERRIDABLE values are the same as the EnableOverride and DisableOverride flags. Setting a qualifier's flavor to WBEM_FLAVOR_OVERRIDABLE indicates that its value can be overridden by a derived class or an instance. Setting the flavor to WBEM_FLAVOR_NOT_OVERRIDABLE forces derived classes and instances to use the qualifier's original value. WBEM always permits qualifier values to be overridden unless WBEM_FLAVOR_NOT_OVERRIDABLE or DisableOverride is specified.