AAFA Developer Support

Public Member Functions
IAAFTypeDefString Interface Reference

This interface is used to define variably-sized Array types whose length is determined by a special terminator element value. 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 string.
HRESULT GetCount ([in] IAAFPropertyValue *pPropVal,[out] aafUInt32 *pCount)
 Returns number of elements contained in the referenced property value.
HRESULT CreateValueFromCString ([in, size_is(initDataSize)] aafMemPtr_t pInitData,[in] aafUInt32 initDataSize,[out] IAAFPropertyValue **ppPropVal)
 Creates a property value which contains a string type.
HRESULT SetCString ([in] IAAFPropertyValue *pPropVal,[in, size_is(dataSize)] aafMemPtr_t pData,[in] aafUInt32 dataSize)
 Copies all the string data contained in the C array pointed to by pData into the given property value, interpreting the data as a string of this type.
HRESULT AppendElements ([in] IAAFPropertyValue *pInPropVal,[in] aafMemPtr_t pElements)
 Appends elements to the end of the array, setting them to the values given in the pElements array.
HRESULT GetElements ([in] IAAFPropertyValue *pInPropVal,[out] aafMemPtr_t pBuffer,[in] aafUInt32 bufferSize)
 Gets the value of this property as a string and places it into pBuffer.

Detailed Description

This interface is used to define variably-sized Array types whose length is determined by a special terminator element value.

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 IAAFTypeDefString also implement the following interfaces:

Definition at line 33031 of file AAF.idl.


Member Function Documentation

HRESULT IAAFTypeDefString::AppendElements ( [in] IAAFPropertyValue pInPropVal,
[in] aafMemPtr_t  pElements 
)

Appends elements to the end of the array, setting them to the values given in the pElements array.

Succeeds if:

  • Initialize() has already been called on this object.
  • pInPropVal pointer is valid.
  • pElements 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 pElements arg is NULL.
Parameters:
pInPropVal[in] property value corresponding to string to which elements are to be appended
pElements[in] Null-terminated array of elements to be appended
HRESULT IAAFTypeDefString::CreateValueFromCString ( [in, size_is(initDataSize)] aafMemPtr_t  pInitData,
[in] aafUInt32  initDataSize,
[out] IAAFPropertyValue **  ppPropVal 
)

Creates a property value which contains a string type.

The string in the property value are initialized from data in a C string which is pointed to by pInitData. Returns the newly-created property value in ppPropVal. The size of the newly-created string property value will be determined by the size of 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.

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.
Parameters:
pInitData[in, size_is(initDataSize)] pointer to compile-time C string containing data to use
initDataSize[in] size of data in pInitData, in bytes
ppPropVal[out] newly created property value
HRESULT IAAFTypeDefString::GetCount ( [in] IAAFPropertyValue pPropVal,
[out] aafUInt32 *  pCount 
)

Returns number of elements contained 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 string property value
HRESULT IAAFTypeDefString::GetElements ( [in] IAAFPropertyValue pInPropVal,
[out] aafMemPtr_t  pBuffer,
[in] aafUInt32  bufferSize 
)

Gets the value of this property as a string and places it into pBuffer.

bufferSize indicates the size of the buffer, in bytes.

Succeeds if:

  • Initialize() has already been called on this object.
  • The pInPropVal pointer is valid.
  • bufferSize indicates that pBuffer is large enough to hold the data.

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

  • pInPropVal arg is NULL.

AAFRESULT_SMALLBUF

  • bufferSize indicates that pBuffer is too small to hold the data.
Parameters:
pInPropVal[in] property value to read
pBuffer[out] array of values that are read
bufferSize[in] size of pBuffer, in bytes
HRESULT IAAFTypeDefString::GetType ( [out] IAAFTypeDef **  ppTypeDef)

Returns the type of elements in this string.

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 IAAFTypeDefString::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

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 String.

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.
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 IAAFTypeDefString::SetCString ( [in] IAAFPropertyValue pPropVal,
[in, size_is(dataSize)] aafMemPtr_t  pData,
[in] aafUInt32  dataSize 
)

Copies all the string data contained in the C array pointed to by pData into the given property value, interpreting the data as a string of this 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.

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.
Parameters:
pPropVal[in] property value to write
pData[in, size_is(dataSize)] buffer from which C string data should be read
dataSize[in] size of pData buffer in bytes

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