IdmaEditList

Lists are a fundamental feature in managing documents, so there are several operations available for manipulating them and the objects contained within them. Items within a list are kept in inserted order and can be identified by an index (ordinal position).

The methods used to access a DMA List are segmented into two groups of interfaces, the methods that allow readonly access to the list (IdmaList), and the methods that allow modification of the list (IdmaEditList). The IdmaEditList interface is only available on list objects that are editable. For each list datatype, there is a specific interface that offers methods particular to that datatype, as well as all the methods of IdmaEditList, (e.g., IdmaEditListOfString).

IdmaEditList::DeleteElement

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

Syntax
DmaRC IdmaEditList::DeleteElement (
DmaIndex32 iIndex)

Parameters

Name

Mode

Description

iIndex

input

The ordinal position in the list of the element to delete.

Description

This method deletes an item from a list based on an ordinal position, provided by the caller. All following list elements will have their ordinal position decremented by one. Permitted values for iIndex are 0 through n-1, where n is the number of elements in the list at the time of the call.

Items on the list are freed as appropriate for their type.

Return Values

Name

Description

DMARC_BAD_INDEX

The index specified does not reference a valid property or list element.

DMARC_OK

(S_OK) Success.

DMARC_READ_ONLY

Method failed because an object or property is read-only.

Deferred Return Values

Name

Description

DMARC_LIST_BOUNDS_ERROR

The number of elements in a list is outside the permitted range.

IdmaEditList::TruncateList

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

Syntax
DmaRC IdmaEditList::TruncateList (
DmaIndex32 iIndex)

Parameters

Name

Mode

Description

iIndex

input

The ordinal position in the list which will be the first item deleted. All following items will also be deleted.

Description

This method will delete all items from the list starting with the item at the supplied ordinal position. All subsequent items in the list will also be deleted. Items on the list will be released as appropriate for their type.

Examples: An index value of zero (0) will result in the list being emptied. An index value of one (1) will result in all but the first item in the list being deleted. An index of n-1, where n is the number of items in the list, will result in the last item on the list being deleted.

Return Values

Name

Description

DMARC_BAD_INDEX

The index specified does not reference a valid property or list element.

DMARC_OK

(S_OK) Success.

DMARC_READ_ONLY

Method failed because an object or property is read-only.

Deferred Return Values

Name

Description

DMARC_CONSTRAINT_VIOLATED

The operation violates a constraint of the implementation.

DMARC_LIST_BOUNDS_ERROR

The number of elements in a list is outside the permitted range.