#### Description:

This function returns a KeyMap holding currently active AST Object pointers. Each entry in the KeyMap will have a key that is an AST class name such as `"` FrameSet `"` , `"` SkyFrame `"` , `"` ZoomMap `"` , etc. The value of the entry will be a 1-dimensional list of pointers for objects of the same class. Note, the returned pointers should NOT be annulled when they are no longer needed.

The pointers to return in the KeyMap may be restricted either by class or by context level using the function arguments.

#### Synopsis

AstKeyMap ∗astActiveObjects( const char ∗class, int subclass, int current )

#### Parameters:

##### class

If NULL, then the returned KeyMap will contain pointers ofr Objects of all classes. If not NULL, then `"` class`"` should be a pointer to a null-terminated string holding the name of an AST class. The returned KeyMap will contain pointers only for the specified class. See also `"` subclass`"` .

##### subclass

A Boolean flag indicating if all subclasses of the class specified by `"` class`"` should be included in the returned KeyMap. If zero, then subclass objects are not returned. Otherwise they are returned. The supplied `"` subclass`"` value is ignored if `"` class`"` is NULL.

##### current

A Boolean flag indicating if the returned list of pointers should be restricted to pointers issued within the current AST object context (see astBegin and astEnd).

#### Returned Value

##### astActiveObjects()

A pointer to a new KeyMap holding the required object pointers. They KeyMap pointer should be annulled when it is no longer needed, but the object pointers within the KeyMap should not be annulled. A NULL pointer is returned if an error has occurred prior to calling this function.

The values stored in the KeyMap should be accessed as generic C pointers using the KeyMap `"` P`"` data type (e.g. using function astMapGetlemP etc).

#### Notes:

- This function will only return objects locked by the currently executing thread.

- The KeyMap pointer returned by this function is not included in the list of active objects stored in the KeyMap.

- Objects that were created using the Fortran interface will have a null `"` file`"` value and will have a routine name equal to the upper case Fortran routine that issued the pointer (e.g. `"` AST_CLONE`"` , `"` AST_FRAME`"` , etc).

Copyright (C) 2021 East Asian Observatory