Jlm
Classes | Public Member Functions | Private Types | Private Attributes | List of all members
jlm::util::AnnotationMap Class Referencefinal

#include <AnnotationMap.hpp>

Classes

class  ConstIterator
 

Public Member Functions

AnnotationRange Annotations () const
 
bool HasAnnotations (const void *key) const noexcept
 
const std::vector< Annotation > & GetAnnotations (const void *key) const noexcept
 
void AddAnnotation (const void *key, Annotation annotation)
 

Private Types

using AnnotationMapType = std::unordered_map< const void *, std::vector< Annotation > >
 
using AnnotationRange = IteratorRange< AnnotationMap::ConstIterator >
 

Private Attributes

AnnotationMapType Map_ = {}
 

Detailed Description

Represents a simple map that associates pointers with Annotations.

Definition at line 101 of file AnnotationMap.hpp.

Member Typedef Documentation

◆ AnnotationMapType

using jlm::util::AnnotationMap::AnnotationMapType = std::unordered_map<const void *, std::vector<Annotation> >
private

Definition at line 103 of file AnnotationMap.hpp.

◆ AnnotationRange

Definition at line 171 of file AnnotationMap.hpp.

Member Function Documentation

◆ AddAnnotation()

void jlm::util::AnnotationMap::AddAnnotation ( const void *  key,
Annotation  annotation 
)
inline

Adds annotation with the given key to the map.

Definition at line 212 of file AnnotationMap.hpp.

◆ Annotations()

AnnotationRange jlm::util::AnnotationMap::Annotations ( ) const
inline

Retrieves all annotations.

Returns
An iterator_range of all the annotations.

Definition at line 180 of file AnnotationMap.hpp.

◆ GetAnnotations()

const std::vector<Annotation>& jlm::util::AnnotationMap::GetAnnotations ( const void *  key) const
inlinenoexcept

Retrieves the annotation for the given key. The key must exist.

Returns
A reference to an instance of Annotation.

Definition at line 202 of file AnnotationMap.hpp.

◆ HasAnnotations()

bool jlm::util::AnnotationMap::HasAnnotations ( const void *  key) const
inlinenoexcept

Checks if an annotation with the given key exists.

Returns
True if the annotation exists, otherwise false.

Definition at line 191 of file AnnotationMap.hpp.

Member Data Documentation

◆ Map_

AnnotationMapType jlm::util::AnnotationMap::Map_ = {}
private

Definition at line 218 of file AnnotationMap.hpp.


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