#### Description:

This function allows a new variant Mapping to be stored with the current Frame in a FrameSet. See the `"` Variant`"` attribute for more details. It can also be used to rename the currently selected variant Mapping.

#### Synopsis

void astAddVariant( AstFrameSet ∗this, AstMapping ∗map, const char ∗name )

#### Parameters:

##### this

Pointer to the FrameSet.

##### map

Pointer to a Mapping which describes how to convert coordinates from the current Frame to the new variant of the current Frame. If NULL is supplied, then the name associated with the currently selected variant of the current Frame is set to the value supplied for `"` name`"` , but no new variant is added.

##### name

The name to associate with the new variant Mapping (or the currently selected variant Mapping if `"` map`"` is NULL).

#### Notes:

- The newly added Variant becomes the current variant on exit (this is equivalent to setting the Variant attribute to the value supplied for `"` name).

- An error is reported if a variant with the supplied name already exists in the current Frame.

- An error is reported if the current Frame is a mirror for the variant Mappings in another Frame. This is only the case if the astMirrorVariants function has been called to make the current Frame act as a mirror.

Copyright (C) 2021 East Asian Observatory