Serialbox  2.2.0
Data serialization library and tools for C/C++, Python and Fortran
TypeName.h
Go to the documentation of this file.
1 //===-- serialbox/core/frontend/stella/TypeName.h -----------------------------------*- C++ -*-===//
2 //
3 // S E R I A L B O X
4 //
5 // This file is distributed under terms of BSD license.
6 // See LICENSE.txt for more information
7 //
8 //===------------------------------------------------------------------------------------------===//
9 //
13 //===------------------------------------------------------------------------------------------===//
14 
15 #ifndef SERIALBOX_CORE_FRONTEND_STELLA_TYPENAME_H
16 #define SERIALBOX_CORE_FRONTEND_STELLA_TYPENAME_H
17 
18 namespace serialbox {
19 
20 namespace stella {
21 
22 #include <string>
23 
24 template <typename TData>
25 inline std::string type_name();
26 
27 #define SERIALBOX_TYPENAMEFUNCTION(type) \
28  template <> \
29  inline std::string type_name<type>() { \
30  return #type; \
31  }
32 
33 SERIALBOX_TYPENAMEFUNCTION(int)
34 SERIALBOX_TYPENAMEFUNCTION(float)
35 SERIALBOX_TYPENAMEFUNCTION(double)
36 
37 } // namespace stella
38 
39 } // namespace serialbox
40 
41 #endif
Namespace of the STELLA frontend.
Definition: ForwardDecl.h:27
Namespace of the serialbox library.
Definition: Archive.h:25