This interface is used with an object representing an AAF class definition. More...
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. |
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:
HRESULT IAAFClassDef::CountPropertyDefs | ( | [out] aafUInt32 * | pCount | ) |
Returns number of property definitions in this class.
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_NULL_PARAM
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:
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_NULL_PARAM
[in] | riid | Reference to the identifier of the interface |
[out] | ppvObject | Address 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:
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_NULL_PARAM
AAFRESULT_SMALL_BUF
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:
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_NULL_PARAM
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:
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_NULL_PARAM
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:
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_NULL_PARAM
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:
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_NULL_PARAM
AAFRESULT_PROP_NOT_PRESENT
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:
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_NULL_PARAM
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:
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_NULL_PARAM
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:
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_NULL_PARAM
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:
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_NULL_PARAM
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:
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_NULL_PARAM
AAFRESULT_BAD_PARAM
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:
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_NULL_PARAM
AAFRESULT_OBJECT_ALREADY_ATTACHED
AAFRESULT_ALREADY_UNIQUELY_INDENTIFED
AAFRESULT_BAD_PARAM
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:
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_NULL_PARAM
AAFRESULT_BAD_PARAM
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 |