structname_fieldname_erase(vector)

The erase method removes an element of a vector from the layout and all indexes the element is included into.

Prototype

    MCO_RET structname_fieldname_erase( /*IN*/ structname *handle,
                             /*IN*/ uint2 index );

Arguments

handle
A pointer to a structname handle.
index
A uint2 that specifies the offset from the start of the vector of the vector element to erase.

Description

The erase method removes an element of a vector from the layout and all indexes the element is included into. Note that the vector size remains unchanged. If an attempt is made to get the erased element, the runtime returns a null pointer as a result. Also note that the erase method is only generated for vectors of structures and strings, not for vectors of basic types. Like 'C' arrays, vectors are counted from zero. Handle is returned by classname_structname_write_handle().

Return Codes

See classname_fieldname_erase().

Related Topics Link IconRelated Topics