timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim::trait::archive_extension< T > Struct Template Reference

Extension for the input or output archive types. It will throw an error if used on new archive types and not specialized. More...

#include "timemory/mpl/type_traits.hpp"

+ Collaboration diagram for tim::trait::archive_extension< T >:

Public Types

using xml_types = type_list< cereal::XMLInputArchive, cereal::XMLOutputArchive >
 
using json_types = type_list< cereal::JSONInputArchive, cereal::PrettyJSONOutputArchive, cereal::MinimalJSONOutputArchive >
 
using binary_types = type_list< cereal::BinaryInputArchive, cereal::BinaryOutputArchive, cereal::PortableBinaryInputArchive, cereal::PortableBinaryOutputArchive >
 

Public Member Functions

template<typename U = T>
enable_if_t< is_one_of< U, xml_types >::value, std::string > operator() ()
 
template<typename U = T>
enable_if_t< is_one_of< U, json_types >::value, std::string > operator() ()
 
template<typename U = T>
enable_if_t< is_one_of< U, binary_types >::value, std::string > operator() ()
 

Detailed Description

template<typename T>
struct tim::trait::archive_extension< T >

Extension for the input or output archive types. It will throw an error if used on new archive types and not specialized.

Definition at line 593 of file type_traits.hpp.

Member Typedef Documentation

◆ binary_types

template<typename T >
using tim::trait::archive_extension< T >::binary_types = type_list<cereal::BinaryInputArchive, cereal::BinaryOutputArchive, cereal::PortableBinaryInputArchive, cereal::PortableBinaryOutputArchive>

Definition at line 599 of file type_traits.hpp.

◆ json_types

template<typename T >
using tim::trait::archive_extension< T >::json_types = type_list<cereal::JSONInputArchive, cereal::PrettyJSONOutputArchive, cereal::MinimalJSONOutputArchive>

Definition at line 596 of file type_traits.hpp.

◆ xml_types

template<typename T >
using tim::trait::archive_extension< T >::xml_types = type_list<cereal::XMLInputArchive, cereal::XMLOutputArchive>

Definition at line 595 of file type_traits.hpp.

Member Function Documentation

◆ operator()() [1/3]

template<typename T >
template<typename U = T>
enable_if_t< is_one_of< U, xml_types >::value, std::string > tim::trait::archive_extension< T >::operator() ( )
inline

Definition at line 605 of file type_traits.hpp.

606 {
607 return ".xml";
608 }

◆ operator()() [2/3]

template<typename T >
template<typename U = T>
enable_if_t< is_one_of< U, json_types >::value, std::string > tim::trait::archive_extension< T >::operator() ( )
inline

Definition at line 611 of file type_traits.hpp.

612 {
613 return ".json";
614 }

◆ operator()() [3/3]

template<typename T >
template<typename U = T>
enable_if_t< is_one_of< U, binary_types >::value, std::string > tim::trait::archive_extension< T >::operator() ( )
inline

Definition at line 617 of file type_traits.hpp.

618 {
619 return ".dat";
620 }

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