AAFA Developer Support

Public Member Functions
IAAFTypeDefVariableArray Interface Reference

This interface is used to define variably-sized Array types used in AAF persistent objects. More...

List of all members.

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.

Detailed Description

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:

Definition at line 33397 of file AAF.idl.


Member Function Documentation

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:

  • Initialize() has already been called on this object.
  • pInPropVal pointer is valid.
  • pMemberPropVal pointer is valid.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • either pInPropVal or pMemberPropVal arg is NULL.
Parameters:
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:

  • the ppPropVal pointer is valid.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • ppPropVal arg is NULL.
Parameters:
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:

  • the pInitData pointer is valid.
  • the ppPropVal pointer is valid.
  • compile-time struct has had its member offests registered.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • either pInitData or ppPropVal arg is NULL.

AAFRESULT_NOT_REGISTERED

  • any contained struct offsets have not yet been registered for that typedef.
Parameters:
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:

  • the pElementValues pointer is valid.
  • the ppPropVal pointer is valid.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • either pElementValues or ppPropVal arg is NULL.
Parameters:
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:

  • the pPropVal pointer is valid.
  • the pData pointer is valid.
  • dataSize indicates pData is large enough to hold the data.
  • compile-time struct has had its member offests registered.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • either pPropVal or pData arg is NULL.

AAFRESULT_BAD_PARAM

  • dataSize indicates pData is too small.

AAFRESULT_NOT_REGISTERED

  • struct offsets have not yet been registered for this typedef.
Parameters:
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:

  • Initialize() has already been called on this object.
  • pPropVal is a valid pointer.
  • pCount is a valid pointer.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • Either pPropVal or pCount arg is NULL.
Parameters:
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:

  • Initialize() has already been called on this object.
  • The PSetPropVal pointer is valid.
  • The ppEnum pointer is valid.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • Either PSetPropVal or ppEnum arg is NULL.
Parameters:
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:

  • Initialize() has already been called on this object.
  • the index exists in this array type def.
  • The pInPropVal pointer is valid.
  • The ppOutPropVal pointer is valid.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • Either pInPropVal or ppOutPropVal arg is NULL.

AAFRESULT_BAD_PARAM

  • The given index is out of range for this array type def.
Parameters:
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:

  • Initialize() has already been called on this object.
  • ppTypeDef is a valid pointer.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • ppTypeDef arg is NULL.
Parameters:
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:

  • AAFTypeDefInt
  • AAFTypeDefRecord
  • AAFTypeDefEnum
  • AAFTypeDefExtEnum
  • AAFTypeDefFixedArray
  • AAFTypeDefObjectRef

This method must be called after allocation, and before any other method can be called.

Succeeds if:

  • Initialize() has not yet been called on this object.
  • pID is a valid pointer.
  • pTypeDef is a valid pointer.
  • pTypeName is a valid pointer.
  • element type is permissible for use in a VariableArray.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_ALREADY_INITIALIZED

AAFRESULT_NULL_PARAM

  • either pTypeDef or pTypeName arg is NULL.

AAFRESULT_BAD_TYPE

  • an illegal element type was given.
Parameters:
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:

  • the pPropVal pointer is valid.
  • the pData pointer is valid.
  • any contained compile-time struct has had its member offests registered.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • either pPropVal or pData arg is NULL.

AAFRESULT_NOT_REGISTERED

  • offsets of any contained struct have not yet been registered.
Parameters:
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:

  • Initialize() has already been called on this object.
  • the index exists in this array type def.
  • The pInPropVal pointer is valid.
  • The ppOutPropVal pointer is valid.

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

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • either pInPropVal or ppOutPropVal arg is NULL.

AAFRESULT_BAD_PARAM

  • The given index is out of range for this array type def.
Parameters:
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

Generated on Wed Jul 4 2012 22:13:32 for AAF COM API by doxygen 1.7.4