CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
Sealed< T > Class Template Reference

Helper template for representing a sealed capability created by the allocator's token API. More...

#include <token.h>

Public Member Functions

 Sealed (void *sealedPointer)
template<typename U>
 Sealed (U *sealedPointer)
 Explicit constructor from a sealed T*.
operator decltype sealedPointer ()
 Implicitly convert back to the wrapped value.
 CHERI_SEALED (T *) get()
 Explicitly convert to the real type.
bool is_valid ()
 Return the tag of the underlying pointer.

Detailed Description

template<typename T>
class Sealed< T >

Helper template for representing a sealed capability created by the allocator's token API.

Definition at line 200 of file token.h.

Constructor & Destructor Documentation

◆ Sealed() [1/2]

template<typename T>
Sealed< T >::Sealed ( void * sealedPointer)
inline

Definition at line 211 of file token.h.

◆ Sealed() [2/2]

template<typename T>
template<typename U>
Sealed< T >::Sealed ( U * sealedPointer)
inlineexplicit

Explicit constructor from a sealed T*.

This is explicit because this is used only in APIs that want to expose their internal sealed type as a public type.

Definition at line 223 of file token.h.

References sealedPointer().

Member Function Documentation

◆ CHERI_SEALED()

template<typename T>
Sealed< T >::CHERI_SEALED ( T * )
inline

Explicitly convert to the real type.

This is explicit because the resulting value cannot be used as a T* in the general case, it can be used only as an opaque T* that can be unsealed to give a usable T*.

Definition at line 238 of file token.h.

References sealedPointer().

◆ is_valid()

template<typename T>
bool Sealed< T >::is_valid ( )
inline

Return the tag of the underlying pointer.

Definition at line 245 of file token.h.

◆ sealedPointer()

template<typename T>
operator decltype Sealed< T >::sealedPointer ( )
inline

Implicitly convert back to the wrapped value.

Definition at line 228 of file token.h.

References sealedPointer().

Referenced by CHERI_SEALED(), Sealed(), and sealedPointer().


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