This interface is used to define field-extendible enumerated types used in AAF persistent objects. More...
Public Member Functions | |
HRESULT | Initialize ([in, ref] aafUID_constref id,[in] aafCharacter_constptr pTypeName) |
Initializes this type def to be identified by the given guid. | |
HRESULT | CreateValueFromName ([in] aafCharacter_constptr Name,[out] IAAFPropertyValue **ppPropVal) |
Creates a property value which contains an Enum type. | |
HRESULT | CountElements ([out] aafUInt32 *pCount) |
Returns number of enumeration elements contained. | |
HRESULT | GetElementValue ([in] aafUInt32 index,[out] aafUID_t *pOutValue) |
Gets the indexed element in this enumerated type. | |
HRESULT | GetElementName ([in] aafUInt32 index,[out, size_is(bufSize)] aafCharacter *pOutValue,[in] aafUInt32 bufSize) |
Gets the indexed element in this enumerated type. | |
HRESULT | GetElementNameBufLen ([in] aafUInt32 index,[out] aafUInt32 *pLen) |
Returns the length of buffer required for the GetElementName() method, in bytes. | |
HRESULT | GetNameFromValue ([in] IAAFPropertyValue *pValue,[out, size_is(bufSize), string] aafCharacter *pName,[in] aafUInt32 bufSize) |
Writes the human-legible tag associated with the given value in this enumerated type. | |
HRESULT | GetNameBufLenFromValue ([in] IAAFPropertyValue *pValue,[out] aafUInt32 *pLen) |
Returns the length of buffer required for the GetNameFromValue() method, in bytes. | |
HRESULT | GetNameFromAUID ([in, ref] aafUID_constref value,[out, size_is(bufSize), string] aafCharacter *pName,[in] aafUInt32 bufSize) |
Writes the human-legible tag associated with the given value in this enumerated type. | |
HRESULT | GetNameBufLenFromAUID ([in, ref] aafUID_constref value,[out] aafUInt32 *pLen) |
Returns the length of buffer required for the GetNameFromInteger() method, in bytes. | |
HRESULT | GetAUIDValue ([in] IAAFPropertyValue *pPropValIn,[out] aafUID_t *pValueOut) |
Gets the value from the given property value and writes it as an AUID into *pValueOut. | |
HRESULT | SetAUIDValue ([in] IAAFPropertyValue *pPropValToSet,[in, ref] aafUID_constref valueIn) |
Sets the given property to the value given in valueIn. | |
HRESULT | AppendElement ([in, ref] aafUID_constref value,[in] aafCharacter_constptr pName) |
Appends a new element to this extendible enumeration. |
This interface is used to define field-extendible enumerated types used in AAF persistent objects.
Enumerated types are assumed to be based on AUIDs.
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 IAAFTypeDefExtEnum also implement the following interfaces:
HRESULT IAAFTypeDefExtEnum::AppendElement | ( | [in, ref] aafUID_constref | value, |
[in] aafCharacter_constptr | pName | ||
) |
Appends a new element to this extendible enumeration.
The element will have the given name and value. It is not legal to have elements with duplicate names or values.
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_DUPLICATE
value | [in, ref] value of appended element |
pName | [in] name of appended element |
HRESULT IAAFTypeDefExtEnum::CountElements | ( | [out] aafUInt32 * | pCount | ) |
Returns number of enumeration elements contained.
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 within this enumeration |
HRESULT IAAFTypeDefExtEnum::CreateValueFromName | ( | [in] aafCharacter_constptr | Name, |
[out] IAAFPropertyValue ** | ppPropVal | ||
) |
Creates a property value which contains an Enum type.
A lookup on the Name is done to find a match in the list of legal enumerations for this type. If the Name specified is not found to exist then an INVALID_PARAM error code is returned. If it succeeds then a newly-created property value in ppPropVal is returned.
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_INVALID_PARAM
Name | [in] the Name of a valid Enum symbol |
ppPropVal | [out] newly created property value |
HRESULT IAAFTypeDefExtEnum::GetAUIDValue | ( | [in] IAAFPropertyValue * | pPropValIn, |
[out] aafUID_t * | pValueOut | ||
) |
Gets the value from the given property value and writes it as an AUID into *pValueOut.
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
pPropValIn | [in] property value to read |
pValueOut | [out] value of the enum represented by the given input property value |
HRESULT IAAFTypeDefExtEnum::GetElementName | ( | [in] aafUInt32 | index, |
[out, size_is(bufSize)] aafCharacter * | pOutValue, | ||
[in] aafUInt32 | bufSize | ||
) |
Gets the indexed element in this enumerated type.
The Name is written into the client-allocated *pOutValue. The bufSize argument should be large enough to hold the pOutValue. Index must be less than the value returned by CountElements().
Caller may call GetElementNameBufLen() to determine the required buffer size.
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_BADINDEX
AAFRESULT_SMALLBUF
index | [in] index of element to retrieve |
pOutValue | [out, size_is(bufSize)] requested value |
bufSize | [in] The size of the pOutValue buffer in bytes |
HRESULT IAAFTypeDefExtEnum::GetElementNameBufLen | ( | [in] aafUInt32 | index, |
[out] aafUInt32 * | pLen | ||
) |
Returns the length of buffer required for the GetElementName() method, in bytes.
The value is placed into the location specified by pLen. The value will include space required for the trailing null character.
Succeeds if the following is 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_NULL_PARAM
AAFRESULT_BADINDEX
index | [in] index of element to retrieve |
pLen | [out] required buffer length, in bytes |
HRESULT IAAFTypeDefExtEnum::GetElementValue | ( | [in] aafUInt32 | index, |
[out] aafUID_t * | pOutValue | ||
) |
Gets the indexed element in this enumerated type.
The value is written into the client-allocated *pOutValue. Index must be less than the value returned by CountElements().
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_BADINDEX
index | [in] index of element to retrieve |
pOutValue | [out] requested value |
HRESULT IAAFTypeDefExtEnum::GetNameBufLenFromAUID | ( | [in, ref] aafUID_constref | value, |
[out] aafUInt32 * | pLen | ||
) |
Returns the length of buffer required for the GetNameFromInteger() method, in bytes.
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_NULL_PARAM
AAFRESULT_BAD_PARAM
value | [in, ref] value of element to get |
pLen | [out] required buffer length, in bytes |
HRESULT IAAFTypeDefExtEnum::GetNameBufLenFromValue | ( | [in] IAAFPropertyValue * | pValue, |
[out] aafUInt32 * | pLen | ||
) |
Returns the length of buffer required for the GetNameFromValue() method, in bytes.
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_NULL_PARAM
AAFRESULT_BAD_PARAM
pValue | [in] value of element to get |
pLen | [out] required buffer length, in bytes |
HRESULT IAAFTypeDefExtEnum::GetNameFromAUID | ( | [in, ref] aafUID_constref | value, |
[out, size_is(bufSize), string] aafCharacter * | pName, | ||
[in] aafUInt32 | bufSize | ||
) |
Writes the human-legible tag associated with the given value in this enumerated type.
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 GetNameBufLenFromAUID() 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_NULL_PARAM
AAFRESULT_SMALLBUF
AAFRESULT_BAD_PARAM
value | [in, ref] value of element to get |
pName | [out, size_is(bufSize), string] buffer into which the element name is written |
bufSize | [in] The size of the pName buffer, in bytes |
HRESULT IAAFTypeDefExtEnum::GetNameFromValue | ( | [in] IAAFPropertyValue * | pValue, |
[out, size_is(bufSize), string] aafCharacter * | pName, | ||
[in] aafUInt32 | bufSize | ||
) |
Writes the human-legible tag associated with the given value in this enumerated type.
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 GetNameBufLenFromValue() 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_NULL_PARAM
AAFRESULT_SMALLBUF
AAFRESULT_BAD_PARAM
pValue | [in] value of element to get |
pName | [out, size_is(bufSize), string] buffer into which the element name is written |
bufSize | [in] The size of the pName buffer, in bytes |
HRESULT IAAFTypeDefExtEnum::Initialize | ( | [in, ref] aafUID_constref | id, |
[in] aafCharacter_constptr | pTypeName | ||
) |
Initializes this type def to be identified by the given guid.
No element values are initially specified; they must be supplied later using the AppendElement method.
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_DUPLICATE
id | [in, ref] auid to be used to identify this type |
pTypeName | [in] friendly name of this type definition |
HRESULT IAAFTypeDefExtEnum::SetAUIDValue | ( | [in] IAAFPropertyValue * | pPropValToSet, |
[in, ref] aafUID_constref | valueIn | ||
) |
Sets the given property to the value given in valueIn.
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
pPropValToSet | [in] property value to set |
valueIn | [in, ref] new value of the enum represented by the given property value |