AAFA Developer Support

Public Member Functions
IAAFTypeDefSet Interface Reference

This interface is used to define variably-sized set types used in AAF persistent objects. More...

List of all members.

Public Member Functions

HRESULT Initialize ([in] aafUID_constref id,[in] IAAFTypeDef *pTypeDef,[in, string] aafCharacter_constptr pTypeName)
 Initializes this type def to contain elements of the given type.
HRESULT GetElementType ([out] IAAFTypeDef **ppTypeDef)
 Returns the type of elements in this set.
HRESULT AddElement ([in] IAAFPropertyValue *pSetPropertyValue,[in] IAAFPropertyValue *pElementPropertyValue)
 Adds an element to the set, setting it to the value given in pElementPropertyValue.
HRESULT RemoveElement ([in] IAAFPropertyValue *pSetPropertyValue,[in] IAAFPropertyValue *pElementPropertyValue)
 Removes an element from the set.
HRESULT ContainsElement ([in] IAAFPropertyValue *pSetPropertyValue,[in] IAAFPropertyValue *pElementPropertyValue,[out] aafBoolean_t *pContainsElement)
 Tests if an element is in the set.
HRESULT GetCount ([in] IAAFPropertyValue *pSetPropertyValue,[out] aafUInt32 *pCount)
 Returns number of elements in the referenced property value.
HRESULT CreateKey ([in, size_is(length)] aafDataBuffer_t pKeyPtr,[in] aafUInt32 length,[out] IAAFPropertyValue **ppKey)
 Returns number of elements in the referenced property value.
HRESULT LookupElement ([in] IAAFPropertyValue *pSetPropertyValue,[in] IAAFPropertyValue *pKey,[out] IAAFPropertyValue **ppElementPropertyValue)
 Looks up the given key (created by CreateKey()) and returns the propertyValue of the entry, or an error if the entry is not present.
HRESULT ContainsKey ([in] IAAFPropertyValue *pSetPropertyValue,[in] IAAFPropertyValue *pKey,[out] aafBoolean_t *pContainsKey)
 Looks up the given key (created by CreateKey()) and returns AAFTrue if the entry is present, or AAFFalse if the entry is not present.
HRESULT GetElements ([in] IAAFPropertyValue *pSetPropertyValue,[out] IEnumAAFPropertyValues **ppEnum)
 Returns an enumerator across elements in this set.

Detailed Description

This interface is used to define variably-sized set 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 IAAFTypeDefSet also implement the following interfaces:

Definition at line 32104 of file AAF.idl.


Member Function Documentation

HRESULT IAAFTypeDefSet::AddElement ( [in] IAAFPropertyValue pSetPropertyValue,
[in] IAAFPropertyValue pElementPropertyValue 
)

Adds an element to the set, setting it to the value given in pElementPropertyValue.

Succeeds if:

  • Initialize() has already been called on this object.
  • pSetPropertyValue pointer is valid.
  • pElementPropertyValue 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 pSetPropertyValue or pElementPropertyValue arg is NULL.
Parameters:
pSetPropertyValue[in] property value corresponding to set to which element is added
pElementPropertyValue[in] value to be added to this set
HRESULT IAAFTypeDefSet::ContainsElement ( [in] IAAFPropertyValue pSetPropertyValue,
[in] IAAFPropertyValue pElementPropertyValue,
[out] aafBoolean_t *  pContainsElement 
)

Tests if an element is in the set.

Succeeds if:

  • Initialize() has already been called on this object.
  • pSetPropertyValue pointer is valid.
  • pElementPropertyValue 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 pSetPropertyValue or pElementPropertyValue arg is NULL.
Parameters:
pSetPropertyValue[in] property value corresponding to set to which element is added
pElementPropertyValue[in] value whose presence is being tested in this set
pContainsElement[out] value to be added to this set
HRESULT IAAFTypeDefSet::ContainsKey ( [in] IAAFPropertyValue pSetPropertyValue,
[in] IAAFPropertyValue pKey,
[out] aafBoolean_t *  pContainsKey 
)

Looks up the given key (created by CreateKey()) and returns AAFTrue if the entry is present, or AAFFalse if the entry is not present.

Succeeds if:

  • Initialize() has already been called on this object.
  • pSetPropertyValue 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 pSetPropertyValue or pContainsKey arg is NULL.
Parameters:
pSetPropertyValue[in] property value of set
pKey[in] A key returned from CreateKey()
pContainsKey[out] Value returned is AAFTrue if an entry with the correct key is present
HRESULT IAAFTypeDefSet::CreateKey ( [in, size_is(length)] aafDataBuffer_t  pKeyPtr,
[in] aafUInt32  length,
[out] IAAFPropertyValue **  ppKey 
)

Returns number of elements in the referenced property value.

Succeeds if:

  • Initialize() has already been called on this object.
  • pSetPropertyValue 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 pSetPropertyValue or pCount arg is NULL.
Parameters:
pKeyPtr[in,size_is(length)] Pointer to the key value bytes
length[in] The size of the key in bytes
ppKey[out] An interface which may be passed to LookupElement() or ContainsKey()
HRESULT IAAFTypeDefSet::GetCount ( [in] IAAFPropertyValue pSetPropertyValue,
[out] aafUInt32 *  pCount 
)

Returns number of elements in the referenced property value.

Succeeds if:

  • Initialize() has already been called on this object.
  • pSetPropertyValue 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 pSetPropertyValue or pCount arg is NULL.
Parameters:
pSetPropertyValue[in] property value of array
pCount[out] count of elements in the specified set property value
HRESULT IAAFTypeDefSet::GetElements ( [in] IAAFPropertyValue pSetPropertyValue,
[out] IEnumAAFPropertyValues **  ppEnum 
)

Returns an enumerator across elements in this set.

Succeeds if:

  • Initialize() has already been called on this object.
  • The pSetPropertyValue pointer is valid.
  • The ppEnum 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 pSetPropertyValue or ppEnum arg is NULL.
Parameters:
pSetPropertyValue[in] property value to read
ppEnum[out] enumerator across property values
HRESULT IAAFTypeDefSet::GetElementType ( [out] IAAFTypeDef **  ppTypeDef)

Returns the type of elements in this set.

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 IAAFTypeDefSet::Initialize ( [in] aafUID_constref  id,
[in] IAAFTypeDef pTypeDef,
[in, string] aafCharacter_constptr  pTypeName 
)

Initializes this type def to contain elements of the given type.

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.
  • 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.
Parameters:
id[in] auid to be used to identify this type
pTypeDef[in] type of each element to be contained in this set
pTypeName[in,string] friendly name of this type definition
HRESULT IAAFTypeDefSet::LookupElement ( [in] IAAFPropertyValue pSetPropertyValue,
[in] IAAFPropertyValue pKey,
[out] IAAFPropertyValue **  ppElementPropertyValue 
)

Looks up the given key (created by CreateKey()) and returns the propertyValue of the entry, or an error if the entry is not present.

Succeeds if:

  • Initialize() has already been called on this object.
  • pSetPropertyValue is a valid pointer.
  • pCount is a valid pointer.
  • An entry with the correct key is present in the set.

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 pSetPropertyValue or pSetPropertyValue or ppElementPropertyValue arg is NULL.
Parameters:
pSetPropertyValue[in] property value of set
pKey[in] A key returned from CreateKey()
ppElementPropertyValue[out] The returned property value
HRESULT IAAFTypeDefSet::RemoveElement ( [in] IAAFPropertyValue pSetPropertyValue,
[in] IAAFPropertyValue pElementPropertyValue 
)

Removes an element from the set.

Succeeds if:

  • Initialize() has already been called on this object.
  • pSetPropertyValue pointer is valid.
  • pElementPropertyValue pointer is valid.
  • The given element was in the set.

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 pSetPropertyValue or pElementPropertyValue arg is NULL.
Parameters:
pSetPropertyValue[in] property value corresponding to set from which element is removed
pElementPropertyValue[in] value to be removed from this set

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