This interface is used to define variably-sized Array types used in AAF persistent objects. More...
Public Member Functions | |
HRESULT | Initialize ([in, ref] aafUID_constref id,[in] IAAFTypeDef *pTypeDef,[in] aafCharacter_constptr pTypeName) |
Initializes this type def to contain elements of the given type. | |
HRESULT | GetType ([out] IAAFTypeDef **ppTypeDef) |
Returns the type of elements in this array. | |
HRESULT | GetCount ([in] IAAFPropertyValue *pPropVal,[out] aafUInt32 *pCount) |
Returns number of array elements in the referenced property value. | |
HRESULT | AppendElement ([in] IAAFPropertyValue *pInPropVal,[in] IAAFPropertyValue *pMemberPropVal) |
Appends an element to the end of the array, setting it to the value given in pMemberPropVal. | |
HRESULT | CreateEmptyValue ([out] IAAFPropertyValue **ppPropVal) |
Creates an empty property value which contains a variable array type that initially is empty (that is, contains no elements yet). | |
HRESULT | CreateValueFromValues ([in, size_is(numElements)] IAAFPropertyValue **pElementValues,[in] aafUInt32 numElements,[out] IAAFPropertyValue **ppPropVal) |
Creates a property value which contains a variable array type. | |
HRESULT | CreateValueFromCArray ([in, size_is(initDataSize)] aafMemPtr_t pInitData,[in] aafUInt32 initDataSize,[out] IAAFPropertyValue **ppPropVal) |
Creates a property value which contains a fixed array type. | |
HRESULT | GetElementValue ([in] IAAFPropertyValue *pInPropVal,[in] aafUInt32 index,[out] IAAFPropertyValue **ppOutPropVal) |
Gets a single property value corresponding to the indexed array element. | |
HRESULT | GetCArray ([in] IAAFPropertyValue *pPropVal,[out, size_is(dataSize)] aafMemPtr_t pData,[in] aafUInt32 dataSize) |
Copies all the array data contained in the given property value, interpreted as a fixed array of this type, into the C array pointed to by pData. | |
HRESULT | SetElementValue ([in] IAAFPropertyValue *pPropVal,[in] aafUInt32 index,[in] IAAFPropertyValue *pMemberPropVal) |
Sets the value of the single, indicated element of the fixed array contained in pPropVal, to the value contained in pMemberPropVal. | |
HRESULT | SetCArray ([in] IAAFPropertyValue *pPropVal,[in, size_is(dataSize)] aafMemPtr_t pData,[in] aafUInt32 dataSize) |
Copies all the array data contained in the C array pointed to by pData into the given property value, interpreting the data as a fixed array of this type. | |
HRESULT | GetElements ([in] IAAFPropertyValue *PSetPropVal,[out] IEnumAAFPropertyValues **ppEnum) |
Returns an enumerator across elements in this set. |
This interface is used to define variably-sized Array types used in AAF persistent objects.
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 IAAFTypeDefVariableArray also implement the following interfaces:
HRESULT IAAFTypeDefVariableArray::AppendElement | ( | [in] IAAFPropertyValue * | pInPropVal, |
[in] IAAFPropertyValue * | pMemberPropVal | ||
) |
Appends an element to the end of the array, setting it to the value given in pMemberPropVal.
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_NULL_PARAM
pInPropVal | [in] property value corresponding to array to which element is appended |
pMemberPropVal | [in] value to be appended to this array |
HRESULT IAAFTypeDefVariableArray::CreateEmptyValue | ( | [out] IAAFPropertyValue ** | ppPropVal | ) |
Creates an empty property value which contains a variable array type that initially is empty (that is, contains no elements yet).
Succeeds if all of the following are true:
If this method fails nothing will be written to *ppPropVal.
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
ppPropVal | [out] newly-created empty property value |
HRESULT IAAFTypeDefVariableArray::CreateValueFromCArray | ( | [in, size_is(initDataSize)] aafMemPtr_t | pInitData, |
[in] aafUInt32 | initDataSize, | ||
[out] IAAFPropertyValue ** | ppPropVal | ||
) |
Creates a property value which contains a fixed array type.
The array elements in the property value are initialized from data in a C array which is pointed to by pInitData. Requires that any structures declared within this array typedef have had their offsets registered with that type. Returns the newly-created property value in ppPropVal. The size of the newly-created array property value will be determined by the number of elements in the initialization C array, as communicated by initDataSize.
Succeeds if all of the following are true:
If this method fails nothing will be written to *ppPropVal.
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_NOT_REGISTERED
pInitData | [in, size_is(initDataSize)] pointer to compile-time C array containing data to use |
initDataSize | [in] size of data in pInitData, in bytes |
ppPropVal | [out] newly created property value |
HRESULT IAAFTypeDefVariableArray::CreateValueFromValues | ( | [in, size_is(numElements)] IAAFPropertyValue ** | pElementValues, |
[in] aafUInt32 | numElements, | ||
[out] IAAFPropertyValue ** | ppPropVal | ||
) |
Creates a property value which contains a variable array type.
The array elements in the property value are initialized to contain the given values, passed in the pElementValues array. numElements, which indicates the size of the pElementValues array, determines the size of the array in the new array property value.
Succeeds if all of the following are true:
If this method fails nothing will be written to *ppPropVal.
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
pElementValues | [in, size_is(numElements)] array of property values for elements of array value which is to be created. |
numElements | [in] size of pElementValues array. |
ppPropVal | [out] newly-created property value |
HRESULT IAAFTypeDefVariableArray::GetCArray | ( | [in] IAAFPropertyValue * | pPropVal, |
[out, size_is(dataSize)] aafMemPtr_t | pData, | ||
[in] aafUInt32 | dataSize | ||
) |
Copies all the array data contained in the given property value, interpreted as a fixed array of this type, into the C array pointed to by pData.
Requires that any structures declared within this array typedef have had their offsets registered with that type.
Succeeds if all of the following are true:
If this method fails nothing will be written to *ppPropVal.
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_BAD_PARAM
AAFRESULT_NOT_REGISTERED
pPropVal | [in] property value to read |
pData | [out, size_is(dataSize)] buffer into which C array data should be written |
dataSize | [in] size of pData buffer in bytes |
HRESULT IAAFTypeDefVariableArray::GetCount | ( | [in] IAAFPropertyValue * | pPropVal, |
[out] aafUInt32 * | pCount | ||
) |
Returns number of array elements in the referenced property value.
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
pPropVal | [in] property value of array |
pCount | [out] count of elements in the specified array property value |
HRESULT IAAFTypeDefVariableArray::GetElements | ( | [in] IAAFPropertyValue * | PSetPropVal, |
[out] IEnumAAFPropertyValues ** | ppEnum | ||
) |
Returns an enumerator across elements in this set.
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
PSetPropVal | [in] property value to read |
ppEnum | [out] enumerator across property values |
HRESULT IAAFTypeDefVariableArray::GetElementValue | ( | [in] IAAFPropertyValue * | pInPropVal, |
[in] aafUInt32 | index, | ||
[out] IAAFPropertyValue ** | ppOutPropVal | ||
) |
Gets a single property value corresponding to the indexed array element.
Places a property value representing the array element identified by the index into ppOutPropval. Index is zero-based, and must be less than the value returned by GetCount().
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_BAD_PARAM
pInPropVal | [in] property value to read |
index | [in] zero-based index into elements in this array type |
ppOutPropVal | [out] value that is read |
HRESULT IAAFTypeDefVariableArray::GetType | ( | [out] IAAFTypeDef ** | ppTypeDef | ) |
Returns the type of elements in this array.
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
ppTypeDef | [out] type of elements in this array |
HRESULT IAAFTypeDefVariableArray::Initialize | ( | [in, ref] aafUID_constref | id, |
[in] IAAFTypeDef * | pTypeDef, | ||
[in] aafCharacter_constptr | pTypeName | ||
) |
Initializes this type def to contain elements of the given type.
Note that it is only possible to use certain types as the element type. Those permissible types include:
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
AAFRESULT_BAD_TYPE
id | [in, ref] auid to be used to identify this type |
pTypeDef | [in] type of each element to be contained in this array |
pTypeName | [in] friendly name of this type definition |
HRESULT IAAFTypeDefVariableArray::SetCArray | ( | [in] IAAFPropertyValue * | pPropVal, |
[in, size_is(dataSize)] aafMemPtr_t | pData, | ||
[in] aafUInt32 | dataSize | ||
) |
Copies all the array data contained in the C array pointed to by pData into the given property value, interpreting the data as a fixed array of this type.
Requires that any structures declared within this typedef have had their offsets registered with that type. If dataSize indicates an array size different from the size currently in the indicated array property value, that array property value will be resized.
Succeeds if all of the following are true:
If this method fails nothing will be written to *ppPropVal.
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_NOT_REGISTERED
pPropVal | [in] property value to write |
pData | [in, size_is(dataSize)] buffer from which C array data should be read |
dataSize | [in] size of pData buffer in bytes |
HRESULT IAAFTypeDefVariableArray::SetElementValue | ( | [in] IAAFPropertyValue * | pPropVal, |
[in] aafUInt32 | index, | ||
[in] IAAFPropertyValue * | pMemberPropVal | ||
) |
Sets the value of the single, indicated element of the fixed array contained in pPropVal, to the value contained in pMemberPropVal.
Index is zero-based, and must be less than the value returned by GetCount(). Property value must be of the same type as returned by GetType().
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_NOT_INITIALIZED
AAFRESULT_NULL_PARAM
AAFRESULT_BAD_PARAM
pPropVal | [in] property value to write |
index | [in] zero-based index into members in this array type |
pMemberPropVal | [in] value to be placed into this array |