IdmaScopeFactory

This is the specialized interface for scope factories, optionally supported on the DMA System object. It provides methods for creating lists usable with the Scope Factory and it provides the CreateScope method for merging multiple component scopes into a single logical scope for unified searching.

IdmaScopeFactory::CreateScope

This method must be supported in every implementation of this interface.

Syntax
DmaRC IdmaScopeFactory::CreateScope (
Dmapv pIScopeList,
DmaInteger32 lCombinationRule,
DMA_REFIID riid,
pDmapv ppIScope)

Parameters

Name

Mode

Description

pIScopeList

input

A DMA List containing the list of scopes that will make up the merged scope. Each object in the list must provide the interfaces required for a DMA Scope object.

lCombinationRule

input

Combination Rule used to merge the scopes in the input scope list.

riid

input

Interface Identifier for the desired interface on resulting Scope object.

ppIScope

output

Returns the selected interface for the merged scope object.

Description

Creates a merged scope object that is a combination of the supplied list of scopes. Each object on the list must provide all of the interfaces required for a dmaClass_Scope type object. The well-known properties specified for dmaClass_Scope must be supported. If any objects on the list are found to be invalid, the method will fail and the DMARC_BAD_SCOPE result code will be returned. If the merge operation is unsuccessful an appropriate result code will be returned and *ppIScope will be set to NULL. If a non-NULL value is returned in *ppIScope, it will be an interface to a valid scope object

There are two defined rules for combining the input scope objects. They are DMA_COMBINATION_INTERSECTION and DMA_COMBINATION_UNION.

If the returned object does not support the interface specified by riid, the operation will fail and the result code DMARC_BAD_INTERFACE will be returned. If the operation is successful, the returned interface pointer is already reserved on behalf of the caller in accordance with the rules for delivery of interfaces as outputs of COM methods. (See IUnknown::QueryInterface.).

CreateScope must be able to handle more than one component scope in the DMA List of Objects identified by pIScopeList.

Return Values

Name

Description

DMARC_ALIAS_CONFLICT

A class, operator or property in one component scope unifies with more than one such entity in another component scope.

DMARC_BAD_INTERFACE

(E_NOINTERFACE) The requested interface is not supported by this object.

DMARC_BAD_OBJECT

An inappropriate object was passed as parameter to this function. For example, the object does not support a required interface or is of an inappropriate class.

DMARC_BAD_PARAMETER

(E_INVALIDARG) Invalid input parameter.

DMARC_NO_COLLATIONS

Merged scope creation failed because there would be no supported collation sequences.

DMARC_NO_MEMORY

(E_OUTOFMEMORY) Insufficient memory to complete the operation.

DMARC_NOT_AUTHENTICATED

The user is not authenticated.

DMARC_OK

(S_OK) Success.

DMARC_OPERAND_MERGE_CONFLICT

The merge would create an invalid operand description.

DMARC_OPERATOR_MERGE_CONFLICT

An operator could not be merged because it has conflicting signatures in component scopes.

DMARC_PROPERTY_MERGE_CONFLICT

A property could not be merged because there is a conflict of conflicting datatype or cardinality in component scopes.

IdmaScopeFactory::CreateScopeList

This method must be supported in every implementation of this interface.

Syntax
DmaRC IdmaScopeFactory::CreateScopeList (
DMA_REFIID riid,
pDmapv ppIObject)

Parameters

Name

Mode

Description

riid

input

Interface Identifier for the desired interface on the resulting List of Scopes object.

ppIObject

output

Returns a pointer for the requested interface for the initial List of Scopes object, *ppIObject will be NULL if CreateScopeList is unsuccessful.

Description

This will create a new, empty but editable DMA List object of class dmaClass_ListOfObject. The list will be empty and the list object’s properties will be set with default values. The list will be populated by using the IdmaEditList and IdmaEditListOfObject interface. The list supports at least those interfaces specified as required for a class dmaClass_ListOfObject object.

If the requested object does not support the interface specified by riid, the operation will fail and the result code DMARC_BAD_INTERFACE will be returned. If the operation is successful, the returned interface pointer is already reserved on behalf of the caller, in accordance with the rules for delivery of interfaces as outputs of COM methods. (See IUnknown::QueryInterface).

Return Values

Name

Description

DMARC_BAD_INTERFACE

(E_NOINTERFACE) The requested interface is not supported by this object.

DMARC_BAD_PARAMETER

(E_INVALIDARG) Invalid input parameter.

DMARC_NO_MEMORY

(E_OUTOFMEMORY) Insufficient memory to complete the operation.

DMARC_NOT_AUTHENTICATED

The user is not authenticated.

DMARC_OK

(S_OK) Success.