fire v0.19.0
Framework for sImulation and Reconstruction of Events
Atomic.h File Reference
#include <type_traits>
#include <highfive/H5DataType.hpp>
Include dependency graph for Atomic.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fire::io
 Geant4 does a GLOBAL definition of the keyword TRUE.
 

Typedefs

template<typename AtomicType >
using fire::io::is_atomic = std::integral_constant< bool, std::is_arithmetic< AtomicType >::value||std::is_same< AtomicType, std::string >::value >
 HighFive supports many C++ "atomic" types that are used regularly. More...
 

Enumerations

enum class  fire::io::Bool : bool { TRUE = true , FALSE = false }
 Boolean enum aligned with h5py. More...
 

Functions

HighFive::EnumType< Bool > fire::io::create_enum_bool ()
 HighFive method for creating the enum data type.
 
template<>
HighFive::DataType HighFive::create_datatype< fire::io::Bool > ()
 full specialization of HighFive template function More...
 

Variables

template<typename AtomicType >
constexpr bool fire::io::is_atomic_v = is_atomic<AtomicType>::value
 shorthand for easier use
 

Function Documentation

◆ HighFive::create_datatype< fire::io::Bool >()

template<>
HighFive::DataType HighFive::create_datatype< fire::io::Bool > ( )

full specialization of HighFive template function

This is necessary for compile-time registration of a new type and is usually hidden within the HIGHFIVE_REGISTER_TYPE macro.

The reason we have to not use the macro here is two fold.

  1. We need the declaration of this registration to be done in this header so that it is accessible by both the fire::io target and the downstream fire::framework target.
  2. We need to define the registration only once to avoid a duplicate definition compiler error during the linking step.

These two goals can be met by splitting the declaration and the definition of this full specialization into the header and source files of Atomic.