Majoranapp
A C++ library for studying MZM in non-interacting systems
ShowMap.hpp
Go to the documentation of this file.
1 #ifndef INFO_SHOWMAP_HPP
2 #define INFO_SHOWMAP_HPP
3 
4 #include <map>
5 #include "Basics.hpp"
6 
7 #include "../Parsers/SystemOption.hpp"
8 
13 {
14 public:
21  template <class T>
22  static void ShowMap(T &map)
23  {
24  for (auto &[key, name] : map)
25  {
26  BasicsInfo::Comment(key, name);
27  }
28  }
29 
38  template <class T1, class T2>
39  static void ShowMapCommonValue(T1 &map1, T2 &map2)
40  {
41  for (const auto &item : map1)
42  {
43  BasicsInfo::Comment(item.second, map2[item.second]);
44  }
45  }
46 };
47 
48 #endif
static void Comment(std::string text)
Display commented line.
Definition: Basics.hpp:33
static void ShowMap(T &map)
Displaying map.
Definition: ShowMap.hpp:22
helpers for displaying key bindings maps and others
Definition: ShowMap.hpp:12
static void ShowMapCommonValue(T1 &map1, T2 &map2)
displaying common value of two maps
Definition: ShowMap.hpp:39