This interface is used to define variably-sized Array types whose length is determined by a special terminator element value. 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 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. |
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:
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:
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 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:
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
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:
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 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:
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_SMALLBUF
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:
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 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:
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 |
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:
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
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 |