Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::InformationTypes Class Reference

Base class for all generic information objects to be able to put them in a typed list together. More...

#include <InformationBase.h>

Inheritance diagram for sf::InformationTypes:

Public Types

typedef unsigned long long id_type
 Type used for the identifying integer (64-bits).
 
typedef int32_t flags_type
 Type used for the flag integer.
 
typedef size_t size_type
 Type used for size of vectors.
 
typedef uint64_t data_type
 Type used for containing a single data element which is the largest integer.
 
typedef int64_t sdata_type
 Type used for containing a single data element which is the largest signed integer.
 
typedef TVector< id_typeIdVector
 Vector for lists of information ID's.
 
typedef TVector< InformationBase * > Vector
 Vector for containing different information base derived classes.
 

Public Member Functions

template<typename T >
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), data_typetoDataType (T value) const
 Casts any type to a data_type value.
 
template<typename T >
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), T > fromDataType (data_type value) const
 Casts a data_type value to a given type.
 

Static Public Attributes

static constexpr size_t npos = std::numeric_limits<size_type>::max()
 Unsigned size value indicating not found or no index.
 

Detailed Description

Base class for all generic information objects to be able to put them in a typed list together.

Member Typedef Documentation

◆ data_type

Type used for containing a single data element which is the largest integer.

◆ flags_type

Type used for the flag integer.

◆ id_type

typedef unsigned long long sf::InformationTypes::id_type

Type used for the identifying integer (64-bits).

◆ IdVector

Vector for lists of information ID's.

◆ sdata_type

Type used for containing a single data element which is the largest signed integer.

◆ size_type

Type used for size of vectors.

◆ Vector

Vector for containing different information base derived classes.

Member Function Documentation

◆ fromDataType()

template<typename T >
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), T > sf::InformationTypes::fromDataType ( data_type  value) const
inlineconstexpr

Casts a data_type value to a given type.

Template Parameters
TType to be converted but equal or less than the size of data_type.
Parameters
value
Returns
Cast value.

◆ toDataType()

template<typename T >
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), data_type > sf::InformationTypes::toDataType ( value) const
inlineconstexpr

Casts any type to a data_type value.

Template Parameters
TType to be converted but equal or less than the size of data_type.
Parameters
valueData type value.
Returns
Cast value.

Member Data Documentation

◆ npos

constexpr size_t sf::InformationTypes::npos = std::numeric_limits<size_type>::max()
staticconstexpr

Unsigned size value indicating not found or no index.


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