This interface is used to define fixed-sized Array types used in AAF persistent objects. More...
Public Member Functions | |
HRESULT | Initialize ([in, ref] aafUID_constref id,[in] IAAFTypeDef *pTypeDef,[in] aafUInt32 nElements,[in] aafCharacter_constptr pTypeName) |
Initializes this type def to contain elements of the given type, and have the given fixed size. | |
HRESULT | GetType ([out] IAAFTypeDef **ppTypeDef) |
Returns the type of elements in this array. | |
HRESULT | GetCount ([out] aafUInt32 *pCount) |
Returns number of elements in this array. | |
HRESULT | CreateValueFromValues ([in, size_is(numElements)] IAAFPropertyValue **ppElementValues,[in] aafUInt32 numElements,[out] IAAFPropertyValue **ppPropVal) |
Creates a property value which contains a fixed 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 fixed-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 IAAFTypeDefFixedArray also implement the following interfaces:
HRESULT IAAFTypeDefFixedArray::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.
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
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 IAAFTypeDefFixedArray::CreateValueFromValues | ( | [in, size_is(numElements)] IAAFPropertyValue ** | ppElementValues, |
[in] aafUInt32 | numElements, | ||
[out] IAAFPropertyValue ** | ppPropVal | ||
) |
Creates a property value which contains a fixed 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, must match the value returned by GetCount(). Returns the newly-created property value in ppPropVal.
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
ppElementValues | [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 IAAFTypeDefFixedArray::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 IAAFTypeDefFixedArray::GetCount | ( | [out] aafUInt32 * | pCount | ) |
Returns number 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
pCount | [out] count of elements in this array |
HRESULT IAAFTypeDefFixedArray::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 IAAFTypeDefFixedArray::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 IAAFTypeDefFixedArray::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 IAAFTypeDefFixedArray::Initialize | ( | [in, ref] aafUID_constref | id, |
[in] IAAFTypeDef * | pTypeDef, | ||
[in] aafUInt32 | nElements, | ||
[in] aafCharacter_constptr | pTypeName | ||
) |
Initializes this type def to contain elements of the given type, and have the given fixed size.
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 |
nElements | [in] number of elements to be in this array |
pTypeName | [in] friendly name of this type definition |
HRESULT IAAFTypeDefFixedArray::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.
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 write |
pData | [in, size_is(dataSize)] buffer from which C array data should be read |
dataSize | [in] size of pData buffer in bytes |
HRESULT IAAFTypeDefFixedArray::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 |