Bewerken

Delen via


Adding a Qualifier

A qualifier is a data string that provides more information about a class, instance, property, method, or parameter.

The following class definition is an example of a derived class that has class qualifiers.

[Dynamic, Provider ("ProviderX")] 
class MyDerivedClass : MyClass
{
    [key] string sKey;
    [Implemented] sint32 ValueMethod();
    [Implemented] sint32 MyMethod ([in, Id(0)] sint32 Param);
};

Qualifiers can be divided into standard qualifiers, CIM qualifiers, and unique qualifiers include the following:

  • Standard qualifier

    A standard qualifier is a qualifier defined by WMI and commonly used in MOF code. For example, the Dynamic and Read qualifiers are both standard qualifiers. For more information, see WMI Qualifiers.

  • CIM qualifier

    A CIM qualifier is a qualifier included in the CIM specification. While use CIM qualifiers in MOF code, the standard qualifiers are designed specifically with WMI in mind. For more information, see the DMTF CIM Specification.

  • Unique qualifier

    A unique qualifier is a qualifier defined specifically for a new class by a class provider. For example, the Units qualifier is a nonstandard, provider-specific qualifier. You can create your own qualifiers for use with your provider. For more information about creating a provider, see Developing a WMI Provider.

Whatever your qualifier does, the main process you perform is to use the qualifier in your MOF code. For more information, see Applying a Qualifier. You can further describe a qualifier with a qualifier flavor. A qualifier flavor contains more information regarding how a provider should use a qualifier. For more information, see Describing a Qualifier with a Qualifier Flavor.

Designing Managed Object Format (MOF) Classes