|
@@ -32,11 +32,30 @@
|
|
|
#include <vector>
|
|
|
|
|
|
#include <artis/utils/DateTime.hpp>
|
|
|
+#include <artis/kernel/Any.hpp>
|
|
|
|
|
|
namespace artis { namespace utils {
|
|
|
|
|
|
enum TraceType { NONE = 0, CHECK, COMPUTE, INIT, KERNEL, PUT };
|
|
|
|
|
|
+enum InformationType { CONSTRUCTION, DESTRUCTION,
|
|
|
+ BEFORE_COMPUTE, AFTER_COMPUTE, INTERNAL_VALUE,
|
|
|
+ EXTERNAL_VALUE, PUT_TO_EXTERNAL, LINK_INTERNAL };
|
|
|
+
|
|
|
+struct TraceInfo
|
|
|
+{
|
|
|
+
|
|
|
+ std::string _src_model_name;
|
|
|
+ artis::kernel::Any _value;
|
|
|
+ InformationType _type;
|
|
|
+ std::string _tgt_model_model;
|
|
|
+
|
|
|
+ TraceInfo(const std::string& src_model_name, artis::kernel::Any value,
|
|
|
+ InformationType type, const std::string& tgt_model_model = "") :
|
|
|
+ _src_model_name(src_model_name), _value(value), _type(type), _tgt_model_model(tgt_model_model)
|
|
|
+ { }
|
|
|
+};
|
|
|
+
|
|
|
template < class Time >
|
|
|
class TraceElement
|
|
|
{
|
|
@@ -124,9 +143,9 @@ public:
|
|
|
for (typename TraceElements < Time >::const_iterator it =
|
|
|
TraceElements < Time >::begin();
|
|
|
it != TraceElements < Time >::end(); ++it) {
|
|
|
- std::string date = it->get_time() == -1 ? "start" :
|
|
|
- it->get_time() == 0 ? "end" :
|
|
|
- utils::DateTime::toJulianDay(it->get_time());
|
|
|
+ std::string date = it->get_time() == -1 ? "construction" :
|
|
|
+ it->get_time() == 0 ? "initialization" :
|
|
|
+ utils::DateTime::toJulianDay(it->get_time());
|
|
|
ss << "TRACE: " << it->get_model_name() << " at "
|
|
|
<< date << " <";
|
|
|
switch (it->get_type())
|