AAFA Developer Support

Public Member Functions
IAAFTypeDefExtEnum Interface Reference

This interface is used to define field-extendible enumerated types used in AAF persistent objects. More...

List of all members.

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.

Detailed Description

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:

Definition at line 29415 of file AAF.idl.


Member Function Documentation

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:

  • the pName 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

  • pName arg is NULL.

AAFRESULT_DUPLICATE

  • duplicate name or value is found.
Parameters:
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:

  • Initialize() has already been called on this object.
  • 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

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

  • the Name 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

  • ppPropVal arg is NULL.

AAFRESULT_INVALID_PARAM

  • the Name specified is not in the list of legal Enumerations.
Parameters:
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:

  • The pPropValIn pointer is valid.
  • The pValueOut 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 pPropValIn or ppPropValOut arg is NULL.
Parameters:
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

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

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • pOutValue arg is NULL.

AAFRESULT_BADINDEX

AAFRESULT_SMALLBUF

  • bufSize indicates the buffer is too small to hold the string.
Parameters:
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

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

AAFRESULT_NULL_PARAM

  • pLen arg is NULL.

AAFRESULT_BADINDEX

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

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

AAFRESULT_NOT_INITIALIZED

AAFRESULT_NULL_PARAM

  • pOutValue arg is NULL.

AAFRESULT_BADINDEX

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

  • the pLen pointer is valid.
  • the value is associated with an element of this enumerated type.

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

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

AAFRESULT_NULL_PARAM

  • pLen arg is NULL.

AAFRESULT_BAD_PARAM

  • the given value is not associated with an element of this type.
Parameters:
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:

  • the pValue pointer is valid.
  • the pLen pointer is valid.
  • the value is associated with an element of this enumerated type.

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

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

AAFRESULT_NULL_PARAM

  • either pValue or pLen arg is NULL.

AAFRESULT_BAD_PARAM

  • the given value is not associated with an element of this type.
Parameters:
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:

  • the pName pointer is valid.
  • bufSize indicates the buffer is large enough to hold the name.
  • the integer value is associated with an element of this enumerated type.

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

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

AAFRESULT_NULL_PARAM

  • pName arg is NULL.

AAFRESULT_SMALLBUF

  • bufSize indicates the buffer is too small to hold the string.

AAFRESULT_BAD_PARAM

  • the given value is not associated with an element of this type.
Parameters:
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:

  • the pValue pointer is valid.
  • the pName pointer is valid.
  • bufSize indicates the buffer is large enough to hold the name.
  • the integer value is associated with an element of this enumerated type.

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

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

AAFRESULT_NULL_PARAM

  • either pValue or pName arg is NULL.

AAFRESULT_SMALLBUF

  • bufSize indicates the buffer is too small to hold the string.

AAFRESULT_BAD_PARAM

  • the given value is not associated with an element of this type.
Parameters:
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:

  • Initialize() has not yet been called on this object.
  • pID is a valid pointer.
  • pTypeName 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_ALREADY_INITIALIZED

AAFRESULT_NULL_PARAM

  • pTypeName arg is NULL.

AAFRESULT_DUPLICATE

  • duplicate name or value is found.
Parameters:
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:

  • The pPropValToSet pointer is valid.
  • valueIn is a correct value for this enumerated type.

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

  • pPropValToSet arg is NULL.

AAFRESULT_BAD_PARAM

  • valueIn is not a correct value for this enumerated type.
  • pPropValIn's type doesn't match GetElementType()
Parameters:
pPropValToSet[in] property value to set
valueIn[in, ref] new value of the enum represented by the given property value

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