This interface is used to implement Weak Object references. More...
Public Member Functions | |
HRESULT | Initialize ([in, ref] aafUID_constref id,[in] IAAFClassDef *pObjType,[in, string] aafCharacter_constptr pTypeName,[in] aafUInt32 ids,[in, size_is(ids)] aafUID_constptr pTargetSet) |
Initializes this type def to be a reference to objects of the given type, and assigns this object the given AUID. |
This interface is used to implement Weak Object references.
In addition to the specific error results listed for each method, all methods in this interface may also return one of the following values:
AAFRESULT_NOMEMORY
Objects that implement IAAFTypeDefWeakObjRef also implement the following interfaces:
HRESULT IAAFTypeDefWeakObjRef::Initialize | ( | [in, ref] aafUID_constref | id, |
[in] IAAFClassDef * | pObjType, | ||
[in, string] aafCharacter_constptr | pTypeName, | ||
[in] aafUInt32 | ids, | ||
[in, size_is(ids)] aafUID_constptr | pTargetSet | ||
) |
Initializes this type def to be a reference to objects of the given type, and assigns this object the given AUID.
pObjType points to the class definition of the least-derived class which is possible to be contained in property values of this type.
pTargetSet points to an array of Property Def AUIDs which indicate the location of the property containing the target of this weak reference. The AUIDs indicate the containment path to the target property, starting at the root Header object. For example, if the containment hierarchy is:
Header->A->B->C
then the first AUID corresponds to the Header's property which contains Object A; the second AUID corresponds to Object A's property which contains Object B; and the third AUID corresponds to Object B's property C which contans the target of this weak reference. If any intermediate property is a vector or set, all* objects in that vector or set are searched for the target. Note that the final AUID *must* correspond to a Set property.
The number of AUIDs in pTargetSet is noted by ids.
This method must be called after allocation, and before any other method can be called.
Succeeds if:
This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:
AAFRESULT_SUCCESS
AAFRESULT_ALREADY_INITIALIZED
AAFRESULT_NULL_PARAM
id | [in, ref] auid to be used to identify this type |
pObjType | [in] class def of objects permitted to be referenced |
pTypeName | [in, string] friendly name of this type definition |
ids | [in] Number of property def IDs in pTargetSet |
pTargetSet | [in, size_is(ids)] List of property definition IDs indicating the property where the target is to be found. |