#
An AST Object Primer

The AST library deals throughout with entities called Objects and a basic understanding of how to handle these is needed before you can use the library effectively. If you are already familiar with an object-oriented language, such as C3#3, few of the concepts should seem new to you. Be aware, however, that AST is designed to be used via fairly conventional C and Fortran interfaces, so some things have to be done a little differently.

If you are not already familiar with object-oriented programming, then don't worry—we will not emphasise this aspect more than is necessary and will not assume any background knowledge. Instead, this section concentrates on presenting all the fundamental information you will need, explaining how AST Objects behave and how to manipulate them from conventional C programs.

If you like to read documents from cover to cover, then you can consider this section as an introduction to the programming techniques used in the rest of the document. Otherwise, you may prefer to skim through it on a first reading and return to it later as reference material.

Subsections

- AST Objects
- Object Creation and Pointers
- The Object Hierarchy
- Displaying Objects
- Getting Attribute Values
- Setting Attribute Values
- Testing, Clearing and Defaulting Attributes
- Transforming Coordinates
- Managing Object Pointers
- AST Pointer Contexts—Begin and End
- Exporting, Importing and Exempting AST Pointers
- AST Objects within Multi-threaded Applications
  - Locking AST Objects for Exclusive Use
  - AST Pointer Contexts
- Copying Objects
- C Pointer Types
- Error Detection
- Sharing the Error Status