summaryrefslogtreecommitdiff
path: root/core/pla_debug_name.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/pla_debug_name.hpp')
-rw-r--r--core/pla_debug_name.hpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/core/pla_debug_name.hpp b/core/pla_debug_name.hpp
new file mode 100644
index 0000000..1b1f89e
--- /dev/null
+++ b/core/pla_debug_name.hpp
@@ -0,0 +1,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