AAFA Developer Support

Public Member Functions
IAAFTypeDefInt Interface Reference

This interface is used to define Integer types used in AAF persistent objects. More...

List of all members.

Public Member Functions

HRESULT Initialize ([in, ref] aafUID_constref id,[in] aafUInt8 intSize,[in] aafBoolean_t isSigned,[in, string] aafCharacter_constptr pTypeName)
 Initializes this type def to be identified by the given guid, to have the given size in bytes, and to be signed or unsigned.
HRESULT CreateValue ([in, size_is(valSize)] aafMemPtr_t pVal,[in] aafUInt32 valSize,[out] IAAFPropertyValue **ppPropVal)
 Creates a property value which contains an integer.
HRESULT GetInteger ([in] IAAFPropertyValue *pPropVal,[out, size_is(valSize)] aafMemPtr_t pVal,[in] aafUInt32 valSize)
 Returns the integer value of this property.
HRESULT SetInteger ([in] IAAFPropertyValue *pPropVal,[in, size_is(valSize)] aafMemPtr_t pVal,[in] aafUInt32 valSize)
 Sets this property value to the given integer value.
HRESULT GetSize ([out] aafUInt32 *pSize)
 Returns the size of the integral value defined by this type definition.
HRESULT IsSigned ([out] aafBoolean_t *pSigned)
 Puts true in *pSigned if property values defined with this type def are signed; puts false there for unsigned property values.

Detailed Description

This interface is used to define Integer 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 IAAFTypeDefInt also implement the following interfaces:

Definition at line 30695 of file AAF.idl.


Member Function Documentation

HRESULT IAAFTypeDefInt::CreateValue ( [in, size_is(valSize)] aafMemPtr_t  pVal,
[in] aafUInt32  valSize,
[out] IAAFPropertyValue **  ppPropVal 
)

Creates a property value which contains an integer.

Initializes it to contain the given integer value. The initialization value is passed through pVal; the size of the initialzation value is given in valSize.

valSize may be smaller than GetSize() for this typedef; if so, the value is lsb-justified and sign-extended (for signed) or zero-filled (for unsigned).

The implementation of this method may only allow certain values for valSize. It *will* allow at least 1, 2, 4, and 8-byte integers; some implementations may allow more than that.

Succeeds if:

  • The pVal pointer is valid.
  • The ppPropVal pointer is valid.
  • valSize is no larger than GetSize() for this typedef.

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 pVal or ppPropVal arg is NULL.

AAFRESULT_BAD_SIZE

  • valSize is larger than GetSize() for this typedef, or valSize is not a supported value.
Parameters:
pVal[in, size_is(valSize)] pointer to integer initialization value
valSize[in] size of integer, in bytes, in pVal
ppPropVal[out] newly created property value
HRESULT IAAFTypeDefInt::GetInteger ( [in] IAAFPropertyValue pPropVal,
[out, size_is(valSize)] aafMemPtr_t  pVal,
[in] aafUInt32  valSize 
)

Returns the integer value of this property.

The value to set is passed through pVal. The size of the pVal buffer is given in valSize. valSize may be larger than GetSize(); if so, the value is lsb-justified and sign-extended (for signed) or zero-filled (for unsigned).

valSize may be smaller than GetSize() for this typedef; if so, the value is lsb-justified and sign-extended (for signed) or zero-filled (for unsigned).

The implementation of this method may only allow certain values for valSize. It *will* allow at least 1, 2, 4, and 8-byte integers; some implementations may allow more than that.

Succeeds if:

  • The pPropVal pointer is valid.
  • The pVal pointer is valid.
  • valSize indicates that pVal is large enough to hold the value.

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 pPropVal or pVal arg is NULL.

AAFRESULT_BAD_SIZE

  • valSize is smaller than GetSize() for this typedef, or valSize is not a supported value.

AAFRESULT_BAD_TYPE

  • The type associated with pPropVal cannot be read as an integral type, or the int size of pPropVal is larger than the int size of this type.
Parameters:
pPropVal[in] property value from which value is to be read
pVal[out, size_is(valSize)] buffer into which value is written
valSize[in] size of pVal buffer in bytes
HRESULT IAAFTypeDefInt::GetSize ( [out] aafUInt32 *  pSize)

Returns the size of the integral value defined by this type definition.

Succeeds if:

  • The pSize 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

  • pSize arg is NULL.
Parameters:
pSize[out] the returned size of this integral value, in bytes
HRESULT IAAFTypeDefInt::Initialize ( [in, ref] aafUID_constref  id,
[in] aafUInt8  intSize,
[in] aafBoolean_t  isSigned,
[in, string] aafCharacter_constptr  pTypeName 
)

Initializes this type def to be identified by the given guid, to have the given size in bytes, and to be signed or unsigned.

The implementation of this method may only allow certain values for intSize. It *will* allow at least 1, 2, 4, and 8-byte integers; some implementations may allow more than that.

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.
  • intSize is a valid value.

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_BAD_SIZE

  • intSize is not a valid value.
Parameters:
id[in, ref] auid to be used to identify this type
intSize[in] the size of this integer type in bytes
isSigned[in] true if this integer type is signed; false for unsigned
pTypeName[in, string] friendly name of this type definition
HRESULT IAAFTypeDefInt::IsSigned ( [out] aafBoolean_t *  pSigned)

Puts true in *pSigned if property values defined with this type def are signed; puts false there for unsigned property values.

Succeeds if:

  • The pSigned 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

  • pSigned arg is NULL.
Parameters:
pSigned[out] set to true if this integer type is signed; set to false for unsigned
HRESULT IAAFTypeDefInt::SetInteger ( [in] IAAFPropertyValue pPropVal,
[in, size_is(valSize)] aafMemPtr_t  pVal,
[in] aafUInt32  valSize 
)

Sets this property value to the given integer value.

The value to set is passed in pVal, and the size of the value in pVal is given in valSize. valSize may be smaller than GetSize(); if so, the value is lsb-justified and sign-extended (for signed) or zero-filled (for unsigned).

Succeeds if:

  • The pPropVal pointer is valid.
  • The pVal pointer is valid.
  • valSize indicates that pVal is large enough to hold the value.

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 pPropVal or pVal arg is NULL.

AAFRESULT_BAD_SIZE

  • valSize is larger than GetSize() for this typedef.
Parameters:
pPropVal[in] property value from which value is to be read
pVal[in, size_is(valSize)] buffer from which value is read
valSize[in] size of pVal buffer in bytes

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