Sfoglia il codice sorgente

Changed class type trace by dyn_cast on instance.
# useless because the submodels are not initialized when ext/int are set, but it looks nicer.

gbeurier 7 anni fa
parent
commit
f63de1361e
2 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 3 3
      src/artis/kernel/Externals.hpp
  2. 2 2
      src/artis/kernel/Internals.hpp

+ 3 - 3
src/artis/kernel/Externals.hpp

@@ -91,7 +91,7 @@ public:
                     << utils::TraceElement < utils::DoubleTime >("KERNEL", -1,
                                                                  utils::KERNEL)
                     << "EXTERNAL - "
-                    << typeid(T).name()
+                    << dynamic_cast<T*>(this)->path(dynamic_cast<T*>(this))
                     << " declare "
                     << it->name;
             utils::Trace < utils::DoubleTime >::trace().flush();
@@ -114,7 +114,7 @@ public:
                     << utils::TraceElement < utils::DoubleTime >("KERNEL", -1,
                                                                  utils::KERNEL)
                     << "EXTERNAL - "
-                    << typeid(T).name()
+                    << dynamic_cast<T*>(this)->path(dynamic_cast<T*>(this)) //useless submodels not added yet
                     << " declare "
                     << name;
             utils::Trace < utils::DoubleTime >::trace().flush();
@@ -149,7 +149,7 @@ public:
                     << "PUT - "
                     << get(index).to_string(dynamic_cast < const T* >(this))
                     << " in "
-                    << typeid(T).name() << ":" << external_names[index];
+                    << dynamic_cast<T*>(this)->path(dynamic_cast<T*>(this)) << ":" << external_names[index];
             utils::Trace < utils::DoubleTime >::trace().flush();
 #endif
     }

+ 2 - 2
src/artis/kernel/Internals.hpp

@@ -73,7 +73,7 @@ public:
                     << utils::TraceElement < utils::DoubleTime >("KERNEL", -1,
                                                                  utils::KERNEL)
                     << "INTERNAL - "
-                    << typeid(T).name()
+                    << dynamic_cast<T*>(this)->path(dynamic_cast<T*>(this))
                     << " declare "
                     << it->name;
             utils::Trace < utils::DoubleTime >::trace().flush();
@@ -97,7 +97,7 @@ public:
                     << utils::TraceElement < utils::DoubleTime >("KERNEL", -1,
                                                                  utils::KERNEL)
                     << "INTERNAL - "
-                    << typeid(T).name()
+                    << dynamic_cast<T*>(this)->path(dynamic_cast<T*>(this))
                     << " declare "
                     << name;
             utils::Trace < utils::DoubleTime >::trace().flush();