summaryrefslogtreecommitdiff
path: root/core/pla_debug_name.hpp
blob: 1b1f89e284d0e69e4e786c40e1178bd1a8b376ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef lULoAciwLXvtwzfgpfl9LrvpNj0
#define lULoAciwLXvtwzfgpfl9LrvpNj0

#include <string>

#include <boost/type_traits/is_same.hpp>

#include "property_instance.hpp"
#include "template_helpers.hpp"

// PLA template
struct PLA_Debug_Name {
  // action types & consts
  typedef std::string result_t;
  template<typename _ContextProp, bool doWriteResults> struct local_state_t {
    typedef _ContextProp prop;
    static const bool write = doWriteResults;
  };

  // action state
  result_t result;

  PLA_Debug_Name() : result("Property List Content:") { }

  // action methods
  template<typename _PropList, typename _ContextData, typename LocalState>
  inline void pre(_PropList &pc, _ContextData &data, LocalState &state) {
    result = result + "\n"
      + LocalState::prop::quant::name + "::"
      + LocalState::prop::name
      + " (" + LocalState::prop::quant::class_t::name + "): "
      + (LocalState::write ? "writing" : "reading");
  }

  template<typename _PropComp, typename _Data, typename _LocalState>
  inline void post(_PropComp &pc, _Data &data, _LocalState &state) { }
};

#endif // lULoAciwLXvtwzfgpfl9LrvpNj0
contact: Jan Huwald // Impressum