#### Description:

This function modifies a Moc by combining it with a binary data array describing a MOC read from a FITS binary table. The way in which they are combined is determined by the `"` cmode`"` parameter.

#### Synopsis

void astAddMocData( AstMoc ∗this, int cmode, int negate, int maxorder, int len, int nbyte, const void ∗data );

#### Parameters:

##### this

Pointer to the Moc to be modified.

##### cmode

Indicates how the Moc and data are to be combined. Any of the following values may be supplied:

- AST__AND: The modified Moc is the intersection of the original Moc and the data.

- AST__OR: The modified Moc is the union of the original Moc and the data.

- AST__XOR: The modified Moc is the exclusive disjunction of the original Moc and the data.

##### negate

If non-zero, the cells added to the Moc will be those included in the supplied data array. If zero, the cells added to the Moc will be those not included in the supplied data array.

##### maxorder

The maximum HEALPix order to use. If a negative value is supplied, the maximum order will be determined by searching the data array (this will take extra time). In either case, if a value has already been set for the MaxOrder attribute in the Moc, then the attribute value is used in preference to the value supplied for this parameter. Any HEALPix cells in the data array that refer to an order greater than `"` maxorder`"` are ignored.

##### len

The length of the supplied array (i.e. the number of 4 or 8 byte integer values it contains). Note, this class only supports binary MOCs with lengths that can be represented in a 4 byte signed integer.

##### nbyte

The number of bytes in each integer value stored in the supplied array. Must be 4 or 8.

##### data

Pointer to the data array holding a description of a MOC in the form used by FITS binary tables. See the IVOA MOC recommendation for details. The values in this array are signed integers, each with the number of bytes specified by parameter `"` nbyte`"` . The number of bytes in this array should be at least `"` len∗nbyte`"` .

#### Notes:

- If no value has yet been set for attribute MaxOrder, then this function will automatically set it to the value supplied for `"` Maxorder`"` , or to the largest order present in the supplied binary MOC if `"` Maxorder`"` is negative.

Copyright (C) 2021 East Asian Observatory