[Libvirt-cim] [PATCH] [CU] Commented some structures in the std_association.h file
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Wed Nov 12 19:46:29 UTC 2008
> +/*
> + * This type defines the signature of the association handler function. The
> + * handler function receives the reference of the source class of the
> + * association and must map it to a list of CMPIInstance objects (targets
> + * of the association).
> + *
> + * In parameters:
> + * CMPIObjectPath * - Path to the source class
When someone says "class" in CIM, they usually mean the generic class
(or MOF) representation. The CMPIObjectPath is a short (or
encapsulated) representation of a specific instance.
So "Path to source class" here makes me think that you're passing in the
generic class info, but really what's being passed in is info about a
specific instance.
CMPIObjectPath, CMPIInstance (etc) are part of the CMPI API, so I'm not
sure it's meaningful documenting here. But I wanted to point out the
distinction between ObjectPath and class just to make sure the meaning
is clear.
>
> +/*
> + * std_assoc is the definition that the developer puts in their source file.
> + * It must be registered using the macro STDA_AssocMIStub.
STDA_AssocMIStub() registers the provider itself. All providers need to
register themselves to expose to the CIMOM what type of provider they
are. STDA_AssocMIStub() is used for association providers, but there's
all STD_InstanceMIStub() and STDIM_MethodMIStub() macros used for
registering providers as instance or method providers respectively.
std_assoc is used in the registration process, but I don't think it
needs to be mentioned here - mentioning it in the comment for
STDA_AssocMIStub() would be more appropriate.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list