Android-cuttlefish cvd tool
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
android::incfs::map_ptr< T, Verified > Struct Template Reference

#include <map_ptr.h>

Collaboration diagram for android::incfs::map_ptr< T, Verified >:
Collaboration graph
[legend]

Classes

class  const_iterator
 

Public Member Functions

 map_ptr ()=default
 
 map_ptr (const T *ptr)
 
 map_ptr (const map_ptr &other)=default
 
template<bool V2, bool V1 = Verified, IsUnverified< V1 > = 0, IsVerified< V2 > = 0>
 map_ptr (const map_ptr< T, V2 > &other)
 
 map_ptr (map_ptr &&other) noexcept=default
 
template<bool V2, bool V1 = Verified, IsUnverified< V1 > = 0, IsVerified< V2 > = 0>
 map_ptr (map_ptr &&other)
 
template<typename U , bool V2, typename T1 = T, bool V1 = Verified, IsVoid< T1 > = 0, NotVoid< U > = 0, IsUnverified< V1 > = 0>
 map_ptr (const map_ptr< U, V2 > &other)
 
map_ptroperator= (const T *ptr)
 
map_ptroperator= (const map_ptr &other)=default
 
template<bool V2, bool V1 = Verified, IsUnverified< V1 > = 0, IsVerified< V2 > = 0>
map_ptroperator= (const map_ptr< T, V2 > &other)
 
template<bool V2>
bool operator== (const map_ptr< T, V2 > &other) const
 
template<bool V2>
bool operator!= (const map_ptr< T, V2 > &other) const
 
template<bool V2>
bool operator< (const map_ptr< T, V2 > &other) const
 
template<bool V2>
std::ptrdiff_t operator- (const map_ptr< T, V2 > &other) const
 
template<typename U >
map_ptr< U > convert () const
 
map_ptr< T > offset (std::ptrdiff_t offset) const
 
const T * unsafe_ptr () const
 
template<typename T1 = T, IsVoid< T1 > = 0>
 operator bool () const
 
template<typename T1 = T, NotVoid< T1 > = 0, bool V1 = Verified, IsUnverified< V1 > = 0>
 operator bool () const
 
template<typename T1 = T, NotVoid< T1 > = 0, bool V1 = Verified, IsVerified< V1 > = 0>
 operator bool () const
 
template<typename T1 = T, NotVoid< T1 > = 0>
const_iterator iterator () const
 
template<typename T1 = T, NotVoid< T1 > = 0>
const map_ptr< T1 > & operator++ ()
 
template<typename T1 = T, NotVoid< T1 > = 0>
const map_ptr< T1 > operator++ (int)
 
template<typename S , typename T1 = T, NotVoid< T1 > = 0>
map_ptr< T1 > operator+ (const S n) const
 
template<typename S , typename T1 = T, NotVoid< T1 > = 0>
map_ptr< T1 > operator- (const S n) const
 
template<typename T1 = T, NotVoid< T1 > = 0>
const T1 & value () const
 
template<typename T1 = T, NotVoid< T1 > = 0>
const T1 * operator-> () const
 
template<typename T1 = T, NotVoid< T1 > = 0, bool V1 = Verified, IsUnverified< V1 > = 0>
bool verify (size_t n=1) const
 
template<typename T1 = T, NotVoid< T1 > = 0>
verified_map_ptr< T1 > verified () const
 

Private Types

template<typename T1 >
using IsVoid = typename std::enable_if_t< std::is_void< T1 >::value, int >
 
template<typename T1 >
using NotVoid = typename std::enable_if_t<!std::is_void< T1 >::value, int >
 
template<bool V>
using IsVerified = typename std::enable_if_t< V, int >
 
template<bool V>
using IsUnverified = typename std::enable_if_t<!V, int >
 

Private Member Functions

 map_ptr (const IncFsFileMap *map, const T *ptr)
 
 map_ptr (const IncFsFileMap *map, const T *ptr, const uint8_t *verified_block)
 
 LIBINCFS_MAP_PTR_DEBUG_CODE (mutable bool verified_=Verified)
 

Private Attributes

const T * ptr_ = nullptr
 
const IncFsFileMapmap_ = nullptr
 
const uint8_t * verified_block_
 

Friends

class IncFsFileMap
 
template<typename , bool >
struct map_ptr
 

Member Typedef Documentation

◆ IsUnverified

template<typename T , bool Verified>
template<bool V>
using android::incfs::map_ptr< T, Verified >::IsUnverified = typename std::enable_if_t<!V, int>
private

◆ IsVerified

template<typename T , bool Verified>
template<bool V>
using android::incfs::map_ptr< T, Verified >::IsVerified = typename std::enable_if_t<V, int>
private

◆ IsVoid

template<typename T , bool Verified>
template<typename T1 >
using android::incfs::map_ptr< T, Verified >::IsVoid = typename std::enable_if_t<std::is_void<T1>::value, int>
private

◆ NotVoid

template<typename T , bool Verified>
template<typename T1 >
using android::incfs::map_ptr< T, Verified >::NotVoid = typename std::enable_if_t<!std::is_void<T1>::value, int>
private

Constructor & Destructor Documentation

◆ map_ptr() [1/9]

template<typename T , bool Verified>
android::incfs::map_ptr< T, Verified >::map_ptr ( )
default

◆ map_ptr() [2/9]

template<typename T , bool Verified>
android::incfs::map_ptr< T, Verified >::map_ptr ( const T *  ptr)
inline

◆ map_ptr() [3/9]

template<typename T , bool Verified>
android::incfs::map_ptr< T, Verified >::map_ptr ( const map_ptr< T, Verified > &  other)
default

◆ map_ptr() [4/9]

template<typename T , bool Verified>
template<bool V2, bool V1 = Verified, IsUnverified< V1 > = 0, IsVerified< V2 > = 0>
android::incfs::map_ptr< T, Verified >::map_ptr ( const map_ptr< T, V2 > &  other)
inline

◆ map_ptr() [5/9]

template<typename T , bool Verified>
android::incfs::map_ptr< T, Verified >::map_ptr ( map_ptr< T, Verified > &&  other)
defaultnoexcept

◆ map_ptr() [6/9]

template<typename T , bool Verified>
template<bool V2, bool V1 = Verified, IsUnverified< V1 > = 0, IsVerified< V2 > = 0>
android::incfs::map_ptr< T, Verified >::map_ptr ( map_ptr< T, Verified > &&  other)
inline

◆ map_ptr() [7/9]

template<typename T , bool Verified>
template<typename U , bool V2, typename T1 = T, bool V1 = Verified, IsVoid< T1 > = 0, NotVoid< U > = 0, IsUnverified< V1 > = 0>
android::incfs::map_ptr< T, Verified >::map_ptr ( const map_ptr< U, V2 > &  other)
inline

◆ map_ptr() [8/9]

template<typename T , bool Verified>
android::incfs::map_ptr< T, Verified >::map_ptr ( const IncFsFileMap map,
const T *  ptr 
)
inlineprivate

◆ map_ptr() [9/9]

template<typename T , bool Verified>
android::incfs::map_ptr< T, Verified >::map_ptr ( const IncFsFileMap map,
const T *  ptr,
const uint8_t *  verified_block 
)
inlineprivate

Member Function Documentation

◆ convert()

template<typename T , bool Verified>
template<typename U >
map_ptr< U > android::incfs::map_ptr< T, Verified >::convert ( ) const
inline

◆ iterator()

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0>
const_iterator android::incfs::map_ptr< T, Verified >::iterator ( ) const
inline

◆ LIBINCFS_MAP_PTR_DEBUG_CODE()

template<typename T , bool Verified>
android::incfs::map_ptr< T, Verified >::LIBINCFS_MAP_PTR_DEBUG_CODE ( mutable bool  verified_ = Verified)
private

◆ offset()

template<typename T , bool Verified>
map_ptr< T > android::incfs::map_ptr< T, Verified >::offset ( std::ptrdiff_t  offset) const
inline

◆ operator bool() [1/3]

template<typename T , bool Verified>
template<typename T1 = T, IsVoid< T1 > = 0>
android::incfs::map_ptr< T, Verified >::operator bool ( ) const
inline

◆ operator bool() [2/3]

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0, bool V1 = Verified, IsUnverified< V1 > = 0>
android::incfs::map_ptr< T, Verified >::operator bool ( ) const
inline

◆ operator bool() [3/3]

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0, bool V1 = Verified, IsVerified< V1 > = 0>
android::incfs::map_ptr< T, Verified >::operator bool ( ) const
inline

◆ operator!=()

template<typename T , bool Verified>
template<bool V2>
bool android::incfs::map_ptr< T, Verified >::operator!= ( const map_ptr< T, V2 > &  other) const
inline

◆ operator+()

template<typename T , bool Verified>
template<typename S , typename T1 = T, NotVoid< T1 > = 0>
map_ptr< T1 > android::incfs::map_ptr< T, Verified >::operator+ ( const S  n) const
inline

◆ operator++() [1/2]

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0>
const map_ptr< T1 > & android::incfs::map_ptr< T, Verified >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0>
const map_ptr< T1 > android::incfs::map_ptr< T, Verified >::operator++ ( int  )
inline

◆ operator-() [1/2]

template<typename T , bool Verified>
template<bool V2>
std::ptrdiff_t android::incfs::map_ptr< T, Verified >::operator- ( const map_ptr< T, V2 > &  other) const
inline

◆ operator-() [2/2]

template<typename T , bool Verified>
template<typename S , typename T1 = T, NotVoid< T1 > = 0>
map_ptr< T1 > android::incfs::map_ptr< T, Verified >::operator- ( const S  n) const
inline

◆ operator->()

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0>
const T1 * android::incfs::map_ptr< T, Verified >::operator-> ( ) const
inline

◆ operator<()

template<typename T , bool Verified>
template<bool V2>
bool android::incfs::map_ptr< T, Verified >::operator< ( const map_ptr< T, V2 > &  other) const
inline

◆ operator=() [1/3]

template<typename T , bool Verified>
map_ptr & android::incfs::map_ptr< T, Verified >::operator= ( const map_ptr< T, Verified > &  other)
default

◆ operator=() [2/3]

template<typename T , bool Verified>
template<bool V2, bool V1 = Verified, IsUnverified< V1 > = 0, IsVerified< V2 > = 0>
map_ptr & android::incfs::map_ptr< T, Verified >::operator= ( const map_ptr< T, V2 > &  other)
inline

◆ operator=() [3/3]

template<typename T , bool Verified>
map_ptr & android::incfs::map_ptr< T, Verified >::operator= ( const T *  ptr)
inline

◆ operator==()

template<typename T , bool Verified>
template<bool V2>
bool android::incfs::map_ptr< T, Verified >::operator== ( const map_ptr< T, V2 > &  other) const
inline

◆ unsafe_ptr()

template<typename T , bool Verified>
const T * android::incfs::map_ptr< T, Verified >::unsafe_ptr ( ) const
inline

◆ value()

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0>
const T1 & android::incfs::map_ptr< T, Verified >::value ( ) const
inline

◆ verified()

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0>
verified_map_ptr< T1 > android::incfs::map_ptr< T, Verified >::verified ( ) const
inline

◆ verify()

template<typename T , bool Verified>
template<typename T1 = T, NotVoid< T1 > = 0, bool V1 = Verified, IsUnverified< V1 > = 0>
bool android::incfs::map_ptr< T, Verified >::verify ( size_t  n = 1) const
inline

Friends And Related Function Documentation

◆ IncFsFileMap

template<typename T , bool Verified>
friend class IncFsFileMap
friend

◆ map_ptr

template<typename T , bool Verified>
template<typename , bool >
friend struct map_ptr
friend

Member Data Documentation

◆ map_

template<typename T , bool Verified>
const IncFsFileMap* android::incfs::map_ptr< T, Verified >::map_ = nullptr
mutableprivate

◆ ptr_

template<typename T , bool Verified>
const T* android::incfs::map_ptr< T, Verified >::ptr_ = nullptr
private

◆ verified_block_

template<typename T , bool Verified>
const uint8_t* android::incfs::map_ptr< T, Verified >::verified_block_
mutableprivate

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