LLFIO v2.00
Loading...
Searching...
No Matches
llfio_v2_xxx::storage_profile Namespace Reference

YAML databaseable empirical testing of a storage's behaviour. More...

Classes

struct  item
 A tag-value item in the storage profile where T is the type of value stored. More...
 
struct  item_base
 Common base class for items. More...
 
struct  item_erased
 A type erased tag-value item. More...
 
struct  storage_profile
 A (possibly incomplet) profile of storage. More...
 

Enumerations

enum class  storage_types {
  unknown , extent_type , unsigned_int , unsigned_long_long ,
  float_ , string
}
 Types potentially storable in a storage profile. More...
 

Functions

template<class T >
constexpr storage_types map_to_storage_type ()
 Returns the enum matching type T.
 
template<class T >
constexpr T default_value ()
 Specialise for a different default value for T.
 
template<>
constexpr storage_types map_to_storage_type< byte_io_handle::extent_type > ()
 
template<>
constexpr byte_io_handle::extent_type default_value< byte_io_handle::extent_type > ()
 
template<>
constexpr storage_types map_to_storage_type< unsigned int > ()
 
template<>
constexpr unsigned int default_value< unsigned int > ()
 
template<>
constexpr storage_types map_to_storage_type< float > ()
 
template<>
constexpr storage_types map_to_storage_type< std::string > ()
 

Detailed Description

YAML databaseable empirical testing of a storage's behaviour.

Enumeration Type Documentation

◆ storage_types

Types potentially storable in a storage profile.

57 {
58 unknown,
59 extent_type,
60 unsigned_int,
61 unsigned_long_long,
62 float_,
63 string
64 };

Function Documentation

◆ default_value()

template<class T >
constexpr T llfio_v2_xxx::storage_profile::default_value ( )
constexpr

Specialise for a different default value for T.

74{ return T{}; }

◆ default_value< byte_io_handle::extent_type >()

template<>
constexpr byte_io_handle::extent_type llfio_v2_xxx::storage_profile::default_value< byte_io_handle::extent_type > ( )
constexpr
77{ return static_cast<byte_io_handle::extent_type>(-1); }

◆ default_value< unsigned int >()

template<>
constexpr unsigned int llfio_v2_xxx::storage_profile::default_value< unsigned int > ( )
constexpr
79{ return static_cast<unsigned int>(-1); }

◆ map_to_storage_type()

template<class T >
constexpr storage_types llfio_v2_xxx::storage_profile::map_to_storage_type ( )
constexpr

Returns the enum matching type T.

69 {
70 static_assert(0 == sizeof(T), "Unsupported storage_type");
71 return storage_types::unknown;
72 }

◆ map_to_storage_type< byte_io_handle::extent_type >()

template<>
constexpr storage_types llfio_v2_xxx::storage_profile::map_to_storage_type< byte_io_handle::extent_type > ( )
constexpr
76{ return storage_types::extent_type; }

◆ map_to_storage_type< float >()

template<>
constexpr storage_types llfio_v2_xxx::storage_profile::map_to_storage_type< float > ( )
constexpr
81{ return storage_types::float_; }

◆ map_to_storage_type< std::string >()

template<>
constexpr storage_types llfio_v2_xxx::storage_profile::map_to_storage_type< std::string > ( )
constexpr
82{ return storage_types::string; }

◆ map_to_storage_type< unsigned int >()

template<>
constexpr storage_types llfio_v2_xxx::storage_profile::map_to_storage_type< unsigned int > ( )
constexpr
78{ return storage_types::unsigned_int; }