This interface is used to define Integer types used in AAF persistent objects. More...
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. |
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:
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:
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_SIZE
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:
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_SIZE
AAFRESULT_BAD_TYPE
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:
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
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:
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_BAD_SIZE
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:
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
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:
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_SIZE
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 |