AAFA Developer Support

Public Member Functions
IAAFClassDef Interface Reference

This interface is used with an object representing an AAF class definition. More...

List of all members.

Public Member Functions

HRESULT Initialize ([in, ref] aafUID_constref classID,[in] IAAFClassDef *pParentClass,[in, string] aafCharacter_constptr pClassName,[in] aafBoolean_t isConcrete)
 Initializes this class definition object to inherit from the given parent class.
HRESULT GetPropertyDefs ([out, retval] IEnumAAFPropertyDefs **ppEnum)
 Returns an enumerator over all of the aaf property definitions attached to the current class.
HRESULT CountPropertyDefs ([out] aafUInt32 *pCount)
 Returns number of property definitions in this class.
HRESULT RegisterNewPropertyDef ([in, ref] aafUID_constref id,[in, string] aafCharacter_constptr pName,[in] IAAFTypeDef *pTypeDef,[in] aafBoolean_t isOptional,[in] aafBoolean_t isUniqueIdentifier,[out] IAAFPropertyDef **ppPropDef)
 Creates a new property definition and registers it in this class definition.
HRESULT RegisterOptionalPropertyDef ([in, ref] aafUID_constref id,[in, string] aafCharacter_constptr pName,[in] IAAFTypeDef *pTypeDef,[out] IAAFPropertyDef **ppPropDef)
 Creates a new property definition and registers it in this class definition.
HRESULT LookupPropertyDef ([in, ref] aafUID_constref propID,[out] IAAFPropertyDef **ppPropDef)
 Looks up the property definition corresponding to the named auid and returns a pointer to that property definition in ppPropDef.
HRESULT GetName ([out, string, size_is(bufSize)] aafCharacter *pName,[in] aafUInt32 bufSize)
 Gets Accesses a human-readable name for the class.
HRESULT GetNameBufLen ([out] aafUInt32 *pBufSize)
 Returns size of buffer (in bytes) required for GetName().
HRESULT GetParent ([out, retval] IAAFClassDef **ppClassDef)
 Gets the Parent class for this object.
HRESULT IsConcrete ([out, retval] aafBoolean_t *pResult)
 Returns true if this class can be instantiated; returns false otherwise.
HRESULT IsRoot ([out, retval] aafBoolean_t *isRoot)
 Returns true if this class is the base of the inheritance hierarchy; returns false otherwise.
HRESULT IsUniquelyIdentified ([out, retval] aafBoolean_t *pIsUniquelyIdentified)
 Returns true if this class is uniquely identified.
HRESULT GetUniqueIdentifier ([out, retval] IAAFPropertyDef **ppUniqueIdentifier)
 Returns the property definition corresponding to this class' unique identifier.
HRESULT CreateInstance ([in, ref] REFIID riid,[out, iid_is(riid)] IUnknown **ppvObject)
 Creates an object of this class, and returns it by reference in the location specified by the ppObject argument.

Detailed Description

This interface is used with an object representing an AAF class definition.

The operations on a class definition include managing the position of the class within the class heirarchy, and accessing property definitions associated with the class.

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 IAAFClassDef also implement the following interfaces:

Definition at line 2726 of file AAF.idl.


Member Function Documentation

HRESULT IAAFClassDef::CountPropertyDefs ( [out] aafUInt32 *  pCount)

Returns number of property definitions in this class.

Succeeds if:

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

  • pCount arg is NULL.
Parameters:
pCount[out] number of properties contained in this class definition
HRESULT IAAFClassDef::CreateInstance ( [in, ref] REFIID  riid,
[out, iid_is(riid)] IUnknown **  ppvObject 
)

Creates an object of this class, and returns it by reference in the location specified by the ppObject argument.

Succeeds if:

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

  • ppObject arg is NULL.
Parameters:
[in]riidReference to the identifier of the interface
[out]ppvObjectAddress of output variable that receives the interface pointer requested in riid
HRESULT IAAFClassDef::GetName ( [out, string, size_is(bufSize)] aafCharacter *  pName,
[in] aafUInt32  bufSize 
)

Gets Accesses a human-readable name for the class.

This name is not meant to be a way for programs to refer to the class, as it is of undetermined length, and is not checked to guarantee uniqueness.

Writes the Name property, 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. If the Name property has not yet been set, a zero-length string will be written (that is, only the trailing null character).

Caller may call GetNameBufLen() to determine the required buffer size.

If this method fails nothing will be written to pName.

Succeeds if:

  • The pName pointer is valid.
  • bufSize indicates that the buffer is large enough to hold Name.

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_SMALL_BUF

  • bufSize indicates that the allocated buffer is not large enough to hold Name.
Parameters:
pName[out, string, size_is(bufSize)] buffer into which Name is to be written
bufSize[in] size of *pName buffer in bytes
HRESULT IAAFClassDef::GetNameBufLen ( [out] aafUInt32 *  pBufSize)

Returns size of buffer (in bytes) required for GetName().

Succeeds if:

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

  • pBufSize arg is NULL.
Parameters:
pBufSize[out] size of required buffer, in bytes
HRESULT IAAFClassDef::GetParent ( [out, retval] IAAFClassDef **  ppClassDef)

Gets the Parent class for this object.

If there is no parent, returns the result AAFRESULT_NO_PARENT. The only class which has no parent will be AAFObject.

Succeeds if:

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

  • pClassDef arg is NULL.
Parameters:
ppClassDef[out, retval] parent class definition
HRESULT IAAFClassDef::GetPropertyDefs ( [out, retval] IEnumAAFPropertyDefs **  ppEnum)

Returns an enumerator over all of the aaf property definitions attached to the current class.

Succeeds if:

  • 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_NULL_PARAM

  • ppEnum arg is NULL.
Parameters:
ppEnum[out, retval] Property Definition enumeration
HRESULT IAAFClassDef::GetUniqueIdentifier ( [out, retval] IAAFPropertyDef **  ppUniqueIdentifier)

Returns the property definition corresponding to this class' unique identifier.

Succeeds if:

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

  • ppUniqueIdentifier arg is NULL.

AAFRESULT_PROP_NOT_PRESENT

  • If this class definition does not have a unique identifier property definition.
Parameters:
ppUniqueIdentifier[out, retval] The unique identifier
HRESULT IAAFClassDef::Initialize ( [in, ref] aafUID_constref  classID,
[in] IAAFClassDef pParentClass,
[in, string] aafCharacter_constptr  pClassName,
[in] aafBoolean_t  isConcrete 
)

Initializes this class definition object to inherit from the given parent class.

If isConcrete is set to AAFTrue, objects of this class can be instantiated; otherwise, it will be illegal to instantiate such objects.

Succeeds if:

  • The pID pointer is valid.
  • The pParentClass pointer is valid.
  • The pTypeName 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

  • pID, pParentClass, or pTypeName arg is NULL.
Parameters:
classID[in, ref] auid to be used to identify this type
pParentClass[in] existing class from which this one inherits
pClassName[in, string] friendly name of this type definition
isConcrete[in] can objects of this class be instantiated
HRESULT IAAFClassDef::IsConcrete ( [out, retval] aafBoolean_t *  pResult)

Returns true if this class can be instantiated; returns false otherwise.

Succeeds if:

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

  • pResult arg is NULL.
Parameters:
pResult[out, retval] Can this class be instantiated
HRESULT IAAFClassDef::IsRoot ( [out, retval] aafBoolean_t *  isRoot)

Returns true if this class is the base of the inheritance hierarchy; returns false otherwise.

Succeeds if:

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

  • isRoot arg is NULL.
Parameters:
isRoot[out, retval] Is this a root (base) class
HRESULT IAAFClassDef::IsUniquelyIdentified ( [out, retval] aafBoolean_t *  pIsUniquelyIdentified)

Returns true if this class is uniquely identified.

Succeeds if:

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

  • pIsUniquelyIdentified arg is NULL.
Parameters:
pIsUniquelyIdentified[out, retval] Is this a UniquelyIdentified class
HRESULT IAAFClassDef::LookupPropertyDef ( [in, ref] aafUID_constref  propID,
[out] IAAFPropertyDef **  ppPropDef 
)

Looks up the property definition corresponding to the named auid and returns a pointer to that property definition in ppPropDef.

Succeeds if:

  • The pPropID pointer is valid.
  • The ppPropDef pointer is valid.
  • the auid specified by pID has been registered as a property definition for this class definition.

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

  • ppPropDef arg is NULL.

AAFRESULT_BAD_PARAM

  • The given ID has not been registered as a property definition.
Parameters:
propID[in, ref] auid reprepresenting property to look up
ppPropDef[out] resulting property definition
HRESULT IAAFClassDef::RegisterNewPropertyDef ( [in, ref] aafUID_constref  id,
[in, string] aafCharacter_constptr  pName,
[in] IAAFTypeDef pTypeDef,
[in] aafBoolean_t  isOptional,
[in] aafBoolean_t  isUniqueIdentifier,
[out] IAAFPropertyDef **  ppPropDef 
)

Creates a new property definition and registers it in this class definition.

If ppPropDef is non-NULL, will return the new property definition in ppPropDef.

Note that it is illegal to add mandatory properties to an existing (registered) class. This method will allow adding either optional or mandatory properties to a class, but they must be added to a class which has not yet been registered in the dictionary. If this class has already been registered, it is possible to add optional properties, but not through this method. Optional properties added to an existing (registered) class may be added through the RegisterOptionalPropertyDef() method.

Succeeds if:

  • The pID pointer is valid.
  • The pName pointer is valid.
  • The pTypeDef pointer is valid.
  • This class has not already been registered in the dictionary.
  • The auid specified by pID has not already been registered.

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 pName or pTypeDef arg is NULL.

AAFRESULT_OBJECT_ALREADY_ATTACHED

  • This class has already been registered.

AAFRESULT_ALREADY_UNIQUELY_INDENTIFED

  • This class already has a unique indentifier property.

AAFRESULT_BAD_PARAM

  • The given ID has already been registered.
Parameters:
id[in, ref] auid to be used to identify this property
pName[in, string] name of the new property
pTypeDef[in] type of the new property
isOptional[in] true if new property is to be optional
isUniqueIdentifier[in] true if new property is to be the unique identifier of the class
ppPropDef[out] return pointer to newly created property def
HRESULT IAAFClassDef::RegisterOptionalPropertyDef ( [in, ref] aafUID_constref  id,
[in, string] aafCharacter_constptr  pName,
[in] IAAFTypeDef pTypeDef,
[out] IAAFPropertyDef **  ppPropDef 
)

Creates a new property definition and registers it in this class definition.

If ppPropDef is non-NULL, will return the new property definition in ppPropDef.

Note that it is illegal to add mandatory properties to an already existing (registered) class. It is assumed that this property is being added to a class which is already registered. If so, it must be optional and this method will declare it so. If it is wished to add a mandatory property, that may be done through the RegisterNewPropertyDef() method, but that must be called on a class which is not yet registered.

Succeeds if:

  • The pID pointer is valid.
  • The pName pointer is valid.
  • The pTypeDef pointer is valid.
  • The auid specified by pID has not already been registered.

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 pName or pTypeDef arg is NULL.

AAFRESULT_BAD_PARAM

  • The given ID has already been registered.
Parameters:
id[in, ref] auid to be used to identify this property
pName[in, string] name of the new property
pTypeDef[in] type of the new property
ppPropDef[out] return pointer to newly created property def

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