This interface is used to define C-like structured types used in AAF persistent objects. More...
Public Member Functions | |
HRESULT | Initialize ([in, ref] aafUID_constref id,[in, size_is(numMembers)] IAAFTypeDef **ppMemberTypes,[in, size_is(numMembers)] aafString_t *pMemberNames,[in] aafUInt32 numMembers,[in] aafCharacter_constptr pTypeName) |
Initializes this type def to be identified by the given guid, and to contain the given members (types and names). | |
HRESULT | GetMemberType ([in] aafUInt32 index,[out] IAAFTypeDef **ppTypeDef) |
Returns the type definition of the indexed member in this record type. | |
HRESULT | GetMemberName ([in] aafUInt32 index,[out, size_is(bufSize), string] aafCharacter *pName,[in] aafUInt32 bufSize) |
Writes the human-legible tag associated with the indexed member in this record type. | |
HRESULT | GetMemberNameBufLen ([in] aafUInt32 index,[out] aafUInt32 *pLen) |
Returns the length of buffer required for the GetMemberName() method. | |
HRESULT | CreateValueFromValues ([in, size_is(numMembers)] IAAFPropertyValue **pMemberValues,[in] aafUInt32 numMembers,[out] IAAFPropertyValue **ppPropVal) |
Creates a property value which contains a record type. | |
HRESULT | CreateValueFromStruct ([in, size_is(initDataSize)] aafMemPtr_t pInitData,[in] aafUInt32 initDataSize,[out] IAAFPropertyValue **ppPropVal) |
Creates a property value which contains a record type. | |
HRESULT | GetValue ([in] IAAFPropertyValue *pInPropVal,[in] aafUInt32 index,[out] IAAFPropertyValue **ppOutPropVal) |
Gets a single property value corresponding to the indicated record member. | |
HRESULT | GetStruct ([in] IAAFPropertyValue *pPropVal,[out, size_is(dataSize)] aafMemPtr_t pData,[in] aafUInt32 dataSize) |
Copies all the member data contained in the given property value, interpreted as a record of this type, into the struct pointed to by pData. | |
HRESULT | SetValue ([in] IAAFPropertyValue *pPropVal,[in] aafUInt32 index,[in] IAAFPropertyValue *pMemberPropVal) |
Sets the value of the single, indicated record member of the record contained in pPropVal, to the value contained in pMemberPropVal. | |
HRESULT | SetStruct ([in] IAAFPropertyValue *pPropVal,[in, size_is(dataSize)] aafMemPtr_t pData,[in] aafUInt32 dataSize) |
Copies all the member data contained in the struct pointed to by pData into the given property value, interpreting the data as a record of this type. | |
HRESULT | GetCount ([out] aafUInt32 *pCount) |
Returns number of members in this record type. | |
HRESULT | RegisterMembers ([in] aafUInt32 *pOffsets,[in] aafUInt32 numMembers,[in] aafUInt32 structSize) |
Allows client to register to the reference implementation a runtime C struct to represent objects of this TypeDef. |
This interface is used to define C-like structured 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 IAAFTypeDefRecord also implement the following interfaces:
HRESULT IAAFTypeDefRecord::CreateValueFromStruct | ( | [in, size_is(initDataSize)] aafMemPtr_t | pInitData, |
[in] aafUInt32 | initDataSize, | ||
[out] IAAFPropertyValue ** | ppPropVal | ||
) |
Creates a property value which contains a record type.
The record members in the property value are initialized from data in a struct which is pointed to by pInitData. Requires that the structure pointed to by pInitData has had its offsets registered with this 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_ILLEGAL_VALUE
AAFRESULT_NOT_REGISTERED
pInitData | [in, size_is(initDataSize)] pointer to compile-time struct containing data to use |
initDataSize | [in] size of data in pInitData |
ppPropVal | [out] newly created property value |
HRESULT IAAFTypeDefRecord::CreateValueFromValues | ( | [in, size_is(numMembers)] IAAFPropertyValue ** | pMemberValues, |
[in] aafUInt32 | numMembers, | ||
[out] IAAFPropertyValue ** | ppPropVal | ||
) |
Creates a property value which contains a record type.
The record members in the property value are initialized to contain the given values, passed in the pMemberValues array. numMembers, which indicates the size of the pMemberValues 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_ILLEGAL_VALUE
pMemberValues | [in, size_is(numMembers)] array of property values for members of record value which is to be created. |
numMembers | [in] size of pMemberValues array. |
ppPropVal | [out] newly-created property value |
HRESULT IAAFTypeDefRecord::GetCount | ( | [out] aafUInt32 * | pCount | ) |
Returns number of members in this record type.
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 members in this record type |
HRESULT IAAFTypeDefRecord::GetMemberName | ( | [in] aafUInt32 | index, |
[out, size_is(bufSize), string] aafCharacter * | pName, | ||
[in] aafUInt32 | bufSize | ||
) |
Writes the human-legible tag associated with the indexed member in this record type.
Index is zero-based, and must be less than the value returned by GetCount(). The name is written, with a trailing null character, into the pName buffer. The buffer is allocated by the caller. The size of the buffer is given by bufSize.
Caller may call GetMemberNameBufLen() to determine the required buffer size.
Succeeds if all of the following are true:
If this method fails nothing will be written to pName.
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
AAFRESULT_ILLEGAL_VALUE
index | [in] zero-based index into members in this record type |
pName | [out, size_is(bufSize), string] buffer into which the member name is written |
bufSize | [in] The size of the pName buffer, in bytes |
HRESULT IAAFTypeDefRecord::GetMemberNameBufLen | ( | [in] aafUInt32 | index, |
[out] aafUInt32 * | pLen | ||
) |
Returns the length of buffer required for the GetMemberName() method.
Index is zero-based, and must be less than the value returned by GetCount(). The value is placed into the location specified by pLen. The value will include space required for the trailing null character.
Succeeds if all of the following are true:
If this method fails nothing will be written to *pLen.
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_ILLEGAL_VALUE
index | [in] zero-based index into members in this record type |
pLen | [out] required buffer length, in bytes |
HRESULT IAAFTypeDefRecord::GetMemberType | ( | [in] aafUInt32 | index, |
[out] IAAFTypeDef ** | ppTypeDef | ||
) |
Returns the type definition of the indexed member in this record type.
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_ILLEGAL_VALUE
index | [in] zero-based index into members in this record type |
ppTypeDef | [out] type definition of indexed member |
HRESULT IAAFTypeDefRecord::GetStruct | ( | [in] IAAFPropertyValue * | pPropVal, |
[out, size_is(dataSize)] aafMemPtr_t | pData, | ||
[in] aafUInt32 | dataSize | ||
) |
Copies all the member data contained in the given property value, interpreted as a record of this type, into the struct pointed to by pData.
Requires that the struct pointed to by pData has had its offsets registered with this 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_ILLEGAL_VALUE
AAFRESULT_NOT_REGISTERED
pPropVal | [in] property value to read |
pData | [out, size_is(dataSize)] buffer into which struct data should be written |
dataSize | [in] size of pData buffer in bytes |
HRESULT IAAFTypeDefRecord::GetValue | ( | [in] IAAFPropertyValue * | pInPropVal, |
[in] aafUInt32 | index, | ||
[out] IAAFPropertyValue ** | ppOutPropVal | ||
) |
Gets a single property value corresponding to the indicated record member.
Places a property value representing the record member 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_ILLEGAL_VALUE
pInPropVal | [in] property value to read |
index | [in] zero-based index into members in this record type |
ppOutPropVal | [out] value that is read |
HRESULT IAAFTypeDefRecord::Initialize | ( | [in, ref] aafUID_constref | id, |
[in, size_is(numMembers)] IAAFTypeDef ** | ppMemberTypes, | ||
[in, size_is(numMembers)] aafString_t * | pMemberNames, | ||
[in] aafUInt32 | numMembers, | ||
[in] aafCharacter_constptr | pTypeName | ||
) |
Initializes this type def to be identified by the given guid, and to contain the given members (types and names).
It is considered an error if multiple members have the same name. Note that it is only possible to use certain types as member types. Those permissible types include:
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
AAFRESULT_DUPLICATE
id | [in, ref] auid to be used to identify this type |
ppMemberTypes | [in, size_is(numMembers)] array of member types to be represented in this record type |
pMemberNames | [in, size_is(numMembers)] array of member names to be represented in this enumerated type |
numMembers | [in] number of members in pMemberInfo array |
pTypeName | [in] friendly name of this type definition |
HRESULT IAAFTypeDefRecord::RegisterMembers | ( | [in] aafUInt32 * | pOffsets, |
[in] aafUInt32 | numMembers, | ||
[in] aafUInt32 | structSize | ||
) |
Allows client to register to the reference implementation a runtime C struct to represent objects of this TypeDef.
Offsets for each member in the struct are passed in as an array of integers; size indicates the number of members in the array. The offset is given in bytes from the start address of the struct. This allows the reference implementation to write property values into compile-time-defined C structs intelligible by the local machine and compiler.
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_ILLEGAL_VALUE
AAFRESULT_NOT_REGISTERED
AAFRESULT_DEFAULT_ALREADY_USED
pOffsets | [in] array containing offset for each record member |
numMembers | [in] number of members in pOffsets |
structSize | [in] size of this struct |
HRESULT IAAFTypeDefRecord::SetStruct | ( | [in] IAAFPropertyValue * | pPropVal, |
[in, size_is(dataSize)] aafMemPtr_t | pData, | ||
[in] aafUInt32 | dataSize | ||
) |
Copies all the member data contained in the struct pointed to by pData into the given property value, interpreting the data as a record of this type.
Requires that the struct pointed to by pData has had its offsets registered with this 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_ILLEGAL_VALUE
AAFRESULT_NOT_REGISTERED
pPropVal | [in] property value to write |
pData | [in, size_is(dataSize)] buffer from which struct data should be read |
dataSize | [in] size of pData buffer in bytes |
HRESULT IAAFTypeDefRecord::SetValue | ( | [in] IAAFPropertyValue * | pPropVal, |
[in] aafUInt32 | index, | ||
[in] IAAFPropertyValue * | pMemberPropVal | ||
) |
Sets the value of the single, indicated record member of the record contained in pPropVal, to the value contained in pMemberPropVal.
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_ILLEGAL_VALUE
pPropVal | [in] property value to write |
index | [in] zero-based index into members in this record type |
pMemberPropVal | [in] value to be placed into this record |