llir-opt  0.0.1
Low-Level Post-Link Optimiser for OCaml and C
Public Types | Public Member Functions | List of all members
AnnotSet Class Reference

#include <core/annot.h>

Public Types

using iterator = AnnotListType::iterator
 Iterator over the annotations.
 
using const_iterator = AnnotListType::const_iterator
 

Public Member Functions

 AnnotSet ()
 Creats a new, empty annotation set.
 
 AnnotSet (AnnotSet &&that)
 Moves an annotation set.
 
 AnnotSet (const AnnotSet &that)
 Copies an annotation set.
 
 ~AnnotSet ()
 Destroys the annotation set.
 
template<typename T >
bool Has () const
 
template<typename T , typename... Args>
bool Set (Args &&... args)
 
template<typename T >
bool Clear ()
 
template<typename T >
const T * Get () const
 
template<typename T >
AnnotSet Without () const
 
bool Add (const Annot &annot)
 
bool operator== (const AnnotSet &that) const
 Compares two annotations sets for equality.
 
bool operator!= (const AnnotSet &that) const
 Compares two annotations sets for inequality.
 
AnnotSetoperator= (AnnotSet &&that)
 Assigns annotation from a different set.
 
size_t size () const
 Returns the number of set annotations.
 
bool empty () const
 Checks if there are any annotations set.
 
iterator begin ()
 Iterator to the first annotation.
 
iterator end ()
 Iterator past the last annotation.
 
const_iterator begin () const
 Constant iterator to the first annotation.
 
const_iterator end () const
 Constant iterator past the last annotation.
 

Detailed Description

Class representing a set of annotations.

Member Function Documentation

◆ Add()

bool AnnotSet::Add ( const Annot annot)

Adds an annotation to this set.

◆ Clear()

template<typename T >
bool AnnotSet::Clear ( )
inline

Clears an annotation.

◆ Get()

template<typename T >
const T* AnnotSet::Get ( ) const
inline

Returns a pointer to an annotation.

◆ Has()

template<typename T >
bool AnnotSet::Has ( ) const
inline

Checks if an annotation is set.

◆ Set()

template<typename T , typename... Args>
bool AnnotSet::Set ( Args &&...  args)
inline

Creates an annotation.

Returns
false if an annotation of the same kind exists.

◆ Without()

template<typename T >
AnnotSet AnnotSet::Without ( ) const
inline

Returns the set without an annotation.


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