lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5062] Move an enumeration


From: Greg Chicares
Subject: [lmi-commits] [5062] Move an enumeration
Date: Sun, 25 Jul 2010 18:59:10 +0000

Revision: 5062
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5062
Author:   chicares
Date:     2010-07-25 18:59:10 +0000 (Sun, 25 Jul 2010)
Log Message:
-----------
Move an enumeration

Modified Paths:
--------------
    lmi/trunk/dbindex.hpp
    lmi/trunk/dbvalue.hpp

Modified: lmi/trunk/dbindex.hpp
===================================================================
--- lmi/trunk/dbindex.hpp       2010-07-25 18:58:36 UTC (rev 5061)
+++ lmi/trunk/dbindex.hpp       2010-07-25 18:59:10 UTC (rev 5062)
@@ -30,6 +30,39 @@
 
 #include <vector>
 
+/// Number of database axes, excluding the special duration axis.
+
+enum
+    {number_of_indices = 6
+    };
+
+/// Ordered database axes.
+
+enum
+    {e_axis_gender    = 0
+    ,e_axis_class     = 1
+    ,e_axis_smoking   = 2
+    ,e_axis_issue_age = 3
+    ,e_axis_uw_basis  = 4
+    ,e_axis_state     = 5
+    ,e_axis_duration  = 6
+    };
+
+/// These enumerators facilitate compile-time assertions in the
+/// product-database GUI, q.v.: an array cannot be indexed to
+/// produce an arithmetic constant expression [5.19/3].
+
+enum enum_database_dimensions
+    {e_number_of_axes    = 1 + number_of_indices
+    ,e_max_dim_gender    =   3
+    ,e_max_dim_class     =   4
+    ,e_max_dim_smoking   =   3
+    ,e_max_dim_issue_age = 100
+    ,e_max_dim_uw_basis  =   5
+    ,e_max_dim_state     =  53
+    ,e_max_dim_duration  = 100
+    };
+
 /// Product-database lookup index.
 ///
 /// Implicitly-declared special member functions do the right thing.
@@ -37,8 +70,6 @@
 class database_index
 {
   public:
-    enum{number_of_indices = 6};
-
     database_index()
         :idx_(number_of_indices)
     {}

Modified: lmi/trunk/dbvalue.hpp
===================================================================
--- lmi/trunk/dbvalue.hpp       2010-07-25 18:58:36 UTC (rev 5061)
+++ lmi/trunk/dbvalue.hpp       2010-07-25 18:59:10 UTC (rev 5062)
@@ -37,31 +37,6 @@
 
 namespace xml_serialize {template<typename T> struct xml_io;}
 
-enum
-    {e_axis_gender    = 0
-    ,e_axis_class     = 1
-    ,e_axis_smoking   = 2
-    ,e_axis_issue_age = 3
-    ,e_axis_uw_basis  = 4
-    ,e_axis_state     = 5
-    ,e_axis_duration  = 6
-    };
-
-/// These enumerators facilitate compile-time assertions in the
-/// product-database GUI, q.v.: an array cannot be indexed to
-/// produce an arithmetic constant expression [5.19/3].
-
-enum enum_database_dimensions
-    {e_number_of_axes    = 1 + database_index::number_of_indices
-    ,e_max_dim_gender    =   3
-    ,e_max_dim_class     =   4
-    ,e_max_dim_smoking   =   3
-    ,e_max_dim_issue_age = 100
-    ,e_max_dim_uw_basis  =   5
-    ,e_max_dim_state     =  53
-    ,e_max_dim_duration  = 100
-    };
-
 /// Product-database entity.
 ///
 /// Each entity varies across zero or more of the following axes:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]