crashpad::AnnotationList Class Reference

A list that contains all the currently set annotations. More...

`#include "client/annotation_list.h"`

## Classes

class | Iterator
| An InputIterator for the AnnotationList. More...

## Public Member Functions

void | Add (Annotation *annotation)
| Adds annotation to the global list. This method does not need to be called by clients directly. The Annotation object will do so automatically. More...
Iterator | begin ()
| Returns an iterator to the first element of the annotation list.
Iterator | end ()
| Returns an iterator past the last element of the annotation list.

## Static Public Member Functions

static AnnotationList * | Get ()
| Returns the instance of the list that has been registered on the CrashapdInfo structure.
static AnnotationList * | Register ()
| Returns the instace of the list, creating and registering it if one is not already set on the CrashapdInfo structure.

## Detailed Description

A list that contains all the currently set annotations.

An instance of this class must be registered on the CrashpadInfo structure in order to use the annotations system. Once a list object has been registered on the CrashpadInfo, a different instance should not be used instead.

## Member Function Documentation

## Add()

void crashpad::AnnotationList::Add | ( | Annotation * | annotation | ) |

Adds annotation to the global list. This method does not need to be called by clients directly. The Annotation object will do so automatically.

Once an annotation is added to the list, it is not removed. This is because the AnnotationList avoids the use of locks/mutexes, in case it is being manipulated in a compromised context. Instead, an Annotation keeps track of when it has been cleared, which excludes it from a crash report. This design also avoids linear scans of the list when repeatedly setting and/or clearing the value.

The documentation for this class was generated from the following files:

- client/annotation_list.h
- client/annotation_list.cc