Eric Ramat 5 gadi atpakaļ
vecāks
revīzija
a6d8c62ce1

+ 6 - 6
src/tests/dtss/models.hpp

@@ -68,7 +68,7 @@ namespace artis {
                     artis::common::Trace<artis::common::DoubleTime>::trace()
                             << artis::common::TraceElement<artis::common::DoubleTime>(
                                     get_name(), t,
-                                    artis::common::DELTA_INT);
+                                    artis::common::TraceType::TRANSITION);
                     artis::common::Trace<artis::common::DoubleTime>::trace().flush();
 #endif
 
@@ -85,7 +85,7 @@ namespace artis {
                     artis::common::Trace<artis::common::DoubleTime>::trace()
                             << artis::common::TraceElement<artis::common::DoubleTime>(
                                     get_name(), t,
-                                    artis::common::START);
+                                    artis::common::TraceType::START);
                     artis::common::Trace<artis::common::DoubleTime>::trace().flush();
 #endif
 
@@ -107,7 +107,7 @@ namespace artis {
                     artis::common::Trace<artis::common::DoubleTime>::trace()
                             << artis::common::TraceElement<artis::common::DoubleTime>(
                                     get_name(), t,
-                                    artis::common::LAMBDA)
+                                    artis::common::TraceType::LAMBDA)
                             << "messages = " << msgs.to_string();
                     artis::common::Trace<artis::common::DoubleTime>::trace().flush();
 #endif
@@ -155,7 +155,7 @@ namespace artis {
                     artis::common::Trace<artis::common::DoubleTime>::trace()
                             << artis::common::TraceElement<artis::common::DoubleTime>(
                                     get_name(), t,
-                                    artis::common::DELTA_INT)
+                                    artis::common::TraceType::TRANSITION)
                             << "x = " << x.to_string();
                     artis::common::Trace<artis::common::DoubleTime>::trace().flush();
 #endif
@@ -172,7 +172,7 @@ namespace artis {
                     artis::common::Trace<artis::common::DoubleTime>::trace()
                             << artis::common::TraceElement<artis::common::DoubleTime>(
                                     get_name(), t,
-                                    artis::common::START);
+                                    artis::common::TraceType::START);
                     artis::common::Trace<artis::common::DoubleTime>::trace().flush();
 #endif
 
@@ -194,7 +194,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     artis::common::Trace<artis::common::DoubleTime>::trace()
                             << artis::common::TraceElement<artis::common::DoubleTime>(
-                                    get_name(), t, artis::common::LAMBDA)
+                                    get_name(), t, artis::common::TraceType::LAMBDA)
                             << "messages = " << msgs.to_string();
                     artis::common::Trace<artis::common::DoubleTime>::trace().flush();
 #endif

+ 9 - 9
src/tests/dtss/tests.cpp

@@ -53,16 +53,16 @@ TEST_CASE("dtss/only_one", "run")
 
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     for (double t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a").filter_time(t).
-                        filter_type(artis::common::DELTA_INT).size() == 1);
+                        filter_type(artis::common::TraceType::DELTA_INT).size() == 1);
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a").filter_time(t).
-                        filter_type(artis::common::LAMBDA).size() == 1);
+                        filter_type(artis::common::TraceType::LAMBDA).size() == 1);
     }
 }
 
@@ -85,30 +85,30 @@ TEST_CASE("dtss/two", "run")
     REQUIRE(artis::common::Trace<
             DoubleTime > ::trace().elements().
                     filter_model_name("a").
-                    filter_type(artis::common::START).size() == 1);
+                    filter_type(artis::common::TraceType::START).size() == 1);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a").filter_time(t).
-                        filter_type(artis::common::DELTA_INT).size() == 1);
+                        filter_type(artis::common::TraceType::DELTA_INT).size() == 1);
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a").filter_time(t).
-                        filter_type(artis::common::LAMBDA).size() == 1);
+                        filter_type(artis::common::TraceType::LAMBDA).size() == 1);
     }
 
     REQUIRE(artis::common::Trace<
             DoubleTime > ::trace().elements().
                     filter_model_name("b").
-                    filter_type(artis::common::START).size() == 1);
+                    filter_type(artis::common::TraceType::START).size() == 1);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("b").filter_time(t).
-                        filter_type(artis::common::DELTA_INT).size() == 1);
+                        filter_type(artis::common::TraceType::DELTA_INT).size() == 1);
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("b").filter_time(t).
-                        filter_type(artis::common::LAMBDA).size() == 1);
+                        filter_type(artis::common::TraceType::LAMBDA).size() == 1);
     }
 }

+ 24 - 24
src/tests/mixed/models.hpp

@@ -70,7 +70,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_INT);
+                                    common::TraceType::DELTA_INT);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -92,7 +92,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_EXT)
+                                    common::TraceType::DELTA_EXT)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -113,7 +113,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_CONF)
+                                    common::TraceType::DELTA_CONF)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -130,7 +130,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::START);
+                                    common::TraceType::START);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
                     _phase = WAIT;
@@ -146,7 +146,7 @@ namespace artis {
 
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
-                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TA);
+                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TraceType::TA);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
                     if (_phase == WAIT) {
@@ -171,7 +171,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::LAMBDA)
+                                    common::TraceType::LAMBDA)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -219,7 +219,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_INT);
+                                    common::TraceType::DELTA_INT);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -236,7 +236,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_EXT)
+                                    common::TraceType::DELTA_EXT)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -261,7 +261,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_CONF)
+                                    common::TraceType::DELTA_CONF)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -282,7 +282,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::START);
+                                    common::TraceType::START);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -301,7 +301,7 @@ namespace artis {
 
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
-                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TA);
+                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TraceType::TA);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -326,7 +326,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::LAMBDA)
+                                    common::TraceType::LAMBDA)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -378,7 +378,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_INT)
+                                    common::TraceType::TRANSITION)
                             << "x = " << x.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -396,7 +396,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::START);
+                                    common::TraceType::START);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -417,7 +417,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::LAMBDA)
+                                    common::TraceType::LAMBDA)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -464,7 +464,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_INT)
+                                    common::TraceType::TRANSITION)
                             << "x = " << x.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -482,7 +482,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(
-                                    get_name(), t, common::START);
+                                    get_name(), t, common::TraceType::START);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -503,7 +503,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::LAMBDA)
+                                    common::TraceType::LAMBDA)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -546,7 +546,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_INT);
+                                    common::TraceType::DELTA_INT);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -568,7 +568,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_EXT)
+                                    common::TraceType::DELTA_EXT)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -589,7 +589,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_CONF)
+                                    common::TraceType::DELTA_CONF)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -607,7 +607,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::START);
+                                    common::TraceType::START);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -625,7 +625,7 @@ namespace artis {
 
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
-                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TA);
+                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TraceType::TA);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -650,7 +650,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::LAMBDA)
+                                    common::TraceType::LAMBDA)
                             << "messages = " << bag.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif

+ 22 - 22
src/tests/mixed/tests.cpp

@@ -51,105 +51,105 @@ TEST_CASE("mixed/hierachical", "run")
 
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a1").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("b1").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a2").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("b2").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
 
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a1").
-            filter_type(artis::common::DELTA_EXT).size() == 0);
+            filter_type(artis::common::TraceType::DELTA_EXT).size() == 0);
     for (double t = 0; t <= 100; t = t + 3) {
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a1").filter_time(t).
-                        filter_type(artis::common::LAMBDA).size() == 1);
+                        filter_type(artis::common::TraceType::LAMBDA).size() == 1);
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a1").filter_time(t).
-                        filter_type(artis::common::DELTA_INT).size() == 1);
+                        filter_type(artis::common::TraceType::DELTA_INT).size() == 1);
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a1").filter_time(t).
-                        filter_type(artis::common::TA).size() == 1);
+                        filter_type(artis::common::TraceType::TA).size() == 1);
     }
 
     for (double t = 0; t <= 100; t = t + 3) {
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("b1").filter_time(t).
-                        filter_type(artis::common::LAMBDA).size() == 1);
+                        filter_type(artis::common::TraceType::LAMBDA).size() == 1);
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("b1").filter_time(t).
-                        filter_type(artis::common::DELTA_INT).size() == 1);
+                        filter_type(artis::common::TraceType::DELTA_INT).size() == 1);
         if (t == 0) {
             REQUIRE(artis::common::Trace<
                     DoubleTime > ::trace().elements().
                             filter_model_name("b1").filter_time(t).
-                            filter_type(artis::common::TA).size() == 1);
+                            filter_type(artis::common::TraceType::TA).size() == 1);
         } else {
             REQUIRE(artis::common::Trace<
                     DoubleTime > ::trace().elements().
                             filter_model_name("b1").filter_time(t).
-                            filter_type(artis::common::TA).size() == 2);
+                            filter_type(artis::common::TraceType::TA).size() == 2);
         }
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("b1").filter_time(t).
-                        filter_type(artis::common::DELTA_EXT).size() == 1);
+                        filter_type(artis::common::TraceType::DELTA_EXT).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 100; t += 2) {
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a2").filter_time(t).
-                        filter_type(artis::common::LAMBDA).size() == 1);
+                        filter_type(artis::common::TraceType::LAMBDA).size() == 1);
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("a2").filter_time(t).
-                        filter_type(artis::common::DELTA_INT).size() == 1);
+                        filter_type(artis::common::TraceType::TRANSITION).size() == 1);
     }
     REQUIRE(artis::common::Trace<
             DoubleTime > ::trace().elements().
                     filter_model_name("a2").filter_time(0).
-                    filter_type(artis::common::DELTA_INT).at(0).get_comment()
+                    filter_type(artis::common::TraceType::TRANSITION).at(0).get_comment()
                     == "x = { ( 0 , a2 , 0 ) }");
     REQUIRE(artis::common::Trace<
             DoubleTime > ::trace().elements().
                     filter_model_name("a2").filter_time(2).
-                    filter_type(artis::common::DELTA_INT).at(0).get_comment()
+                    filter_type(artis::common::TraceType::TRANSITION).at(0).get_comment()
                     == "x = { }");
     REQUIRE(artis::common::Trace<
             DoubleTime > ::trace().elements().
                     filter_model_name("a2").filter_time(4).
-                    filter_type(artis::common::DELTA_INT).at(0).get_comment()
+                    filter_type(artis::common::TraceType::TRANSITION).at(0).get_comment()
                     == "x = { ( 0 , a2 , 2 ) }");
     REQUIRE(artis::common::Trace<
             DoubleTime > ::trace().elements().
                     filter_model_name("a2").filter_time(6).
-                    filter_type(artis::common::DELTA_INT).at(0).get_comment()
+                    filter_type(artis::common::TraceType::TRANSITION).at(0).get_comment()
                     == "x = { ( 0 , a2 , 2 ) }");
     REQUIRE(artis::common::Trace<
             DoubleTime > ::trace().elements().
                     filter_model_name("a2").filter_time(8).
-                    filter_type(artis::common::DELTA_INT).at(0).get_comment()
+                    filter_type(artis::common::TraceType::TRANSITION).at(0).get_comment()
                     == "x = { ( 0 , a2 , 3 ) }");
 
     for (unsigned int t = 0; t <= 100; t += 2) {
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("b2").filter_time(t).
-                        filter_type(artis::common::LAMBDA).size() == 1);
+                        filter_type(artis::common::TraceType::LAMBDA).size() == 1);
         REQUIRE(artis::common::Trace<
                 DoubleTime > ::trace().elements().
                         filter_model_name("b2").filter_time(t).
-                        filter_type(artis::common::DELTA_INT).size() == 1);
+                        filter_type(artis::common::TraceType::TRANSITION).size() == 1);
     }
 }

+ 12 - 12
src/tests/pdevs/models.hpp

@@ -82,7 +82,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_INT);
+                                    common::TraceType::DELTA_INT);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -108,7 +108,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_EXT)
+                                    common::TraceType::DELTA_EXT)
                             << "messages = " << msgs.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -129,7 +129,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_CONF)
+                                    common::TraceType::DELTA_CONF)
                             << "messages = " << msgs.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -147,7 +147,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::START);
+                                    common::TraceType::START);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -165,7 +165,7 @@ namespace artis {
 
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
-                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TA);
+                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TraceType::TA);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -192,7 +192,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::LAMBDA)
+                                    common::TraceType::LAMBDA)
                             << "messages = " << msgs.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -240,7 +240,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_INT);
+                                    common::TraceType::DELTA_INT);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -262,7 +262,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_EXT)
+                                    common::TraceType::DELTA_EXT)
                             << "messages = " << msgs.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -285,7 +285,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::DELTA_CONF)
+                                    common::TraceType::DELTA_CONF)
                             << "messages = " << msgs.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
@@ -303,7 +303,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::START);
+                                    common::TraceType::START);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -321,7 +321,7 @@ namespace artis {
 
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
-                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TA);
+                            << common::TraceElement<common::DoubleTime>(get_name(), t, common::TraceType::TA);
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif
 
@@ -348,7 +348,7 @@ namespace artis {
 #ifdef WITH_TRACE
                     common::Trace<common::DoubleTime>::trace()
                             << common::TraceElement<common::DoubleTime>(get_name(), t,
-                                    common::LAMBDA)
+                                    common::TraceType::LAMBDA)
                             << "messages = " << msgs.to_string();
                     common::Trace<common::DoubleTime>::trace().flush();
 #endif

+ 48 - 48
src/tests/pdevs/tests.cpp

@@ -50,23 +50,23 @@ TEST_CASE("pdevs/only_one", "run")
 
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a").
-            filter_type(artis::common::DELTA_EXT).size() == 0);
+            filter_type(artis::common::TraceType::DELTA_EXT).size() == 0);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a").
-            filter_type(artis::common::DELTA_CONF).size() == 0);
+            filter_type(artis::common::TraceType::DELTA_CONF).size() == 0);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 2);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a").filter_time(t).
-                filter_type(artis::common::TA).size() == 2);
+                filter_type(artis::common::TraceType::TA).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 2);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 2);
     }
 }
 
@@ -84,78 +84,78 @@ TEST_CASE("pdevs/flat", "run")
 
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a1").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("b1").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a2").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("b2").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
 
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a1").
-            filter_type(artis::common::DELTA_EXT).size() == 0);
+            filter_type(artis::common::TraceType::DELTA_EXT).size() == 0);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a1").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 2);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a1").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 2);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a1").filter_time(t).
-                filter_type(artis::common::TA).size() == 2);
+                filter_type(artis::common::TraceType::TA).size() == 2);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b1").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 1);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 1);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b1").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 1);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 1);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b1").filter_time(t).
-                filter_type(artis::common::TA).size() == 2);
+                filter_type(artis::common::TraceType::TA).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b1").filter_time(t).
-                filter_type(artis::common::DELTA_EXT).size() == 1);
+                filter_type(artis::common::TraceType::DELTA_EXT).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 3);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 3);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 3);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 3);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::TA).size() == 4);
+                filter_type(artis::common::TraceType::TA).size() == 4);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::DELTA_EXT).size() == 1);
+                filter_type(artis::common::TraceType::DELTA_EXT).size() == 1);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::DELTA_CONF).size() == 0);
+                filter_type(artis::common::TraceType::DELTA_CONF).size() == 0);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b2").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 2);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b2").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 2);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b2").filter_time(t).
-                filter_type(artis::common::TA).size() == 4);
+                filter_type(artis::common::TraceType::TA).size() == 4);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b2").filter_time(t).
-                filter_type(artis::common::DELTA_EXT).size() == 2);
+                filter_type(artis::common::TraceType::DELTA_EXT).size() == 2);
     }
 }
 
@@ -173,77 +173,77 @@ TEST_CASE("pdevs/hierachical", "run")
 
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a1").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("b1").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a2").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("b2").
-            filter_type(artis::common::START).size() == 1);
+            filter_type(artis::common::TraceType::START).size() == 1);
 
     REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
             filter_model_name("a1").
-            filter_type(artis::common::DELTA_EXT).size() == 0);
+            filter_type(artis::common::TraceType::DELTA_EXT).size() == 0);
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a1").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 2);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a1").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 2);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a1").filter_time(t).
-                filter_type(artis::common::TA).size() == 2);
+                filter_type(artis::common::TraceType::TA).size() == 2);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b1").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 1);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 1);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b1").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 1);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 1);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b1").filter_time(t).
-                filter_type(artis::common::TA).size() == 2);
+                filter_type(artis::common::TraceType::TA).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b1").filter_time(t).
-                filter_type(artis::common::DELTA_EXT).size() == 1);
+                filter_type(artis::common::TraceType::DELTA_EXT).size() == 1);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 3);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 3);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 3);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 3);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::TA).size() == 4);
+                filter_type(artis::common::TraceType::TA).size() == 4);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::DELTA_EXT).size() == 1);
+                filter_type(artis::common::TraceType::DELTA_EXT).size() == 1);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("a2").filter_time(t).
-                filter_type(artis::common::DELTA_CONF).size() == 0);
+                filter_type(artis::common::TraceType::DELTA_CONF).size() == 0);
     }
 
     for (unsigned int t = 0; t <= 10; ++t) {
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b2").filter_time(t).
-                filter_type(artis::common::LAMBDA).size() == 2);
+                filter_type(artis::common::TraceType::LAMBDA).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b2").filter_time(t).
-                filter_type(artis::common::DELTA_INT).size() == 2);
+                filter_type(artis::common::TraceType::DELTA_INT).size() == 2);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b2").filter_time(t).
-                filter_type(artis::common::TA).size() == 4);
+                filter_type(artis::common::TraceType::TA).size() == 4);
         REQUIRE(artis::common::Trace<DoubleTime>::trace().elements().
                 filter_model_name("b2").filter_time(t).
-                filter_type(artis::common::DELTA_EXT).size() == 2);
+                filter_type(artis::common::TraceType::DELTA_EXT).size() == 2);
     }
 }