[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 0dc541e 3/6: Add an 'mc' enumeration for CSO
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 0dc541e 3/6: Add an 'mc' enumeration for CSO era |
Date: |
Sun, 11 Aug 2019 10:10:53 -0400 (EDT) |
branch: master
commit 0dc541eec327911d57e856e12b8ed2ee591bc7f4
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Add an 'mc' enumeration for CSO era
Soon this will replace 'oenum_cso_era'. Motivation: the value is to be
used as a substring in a footnote.
---
mc_enum_type_enums.hpp | 9 ++++++++-
mc_enum_types.cpp | 1 +
mc_enum_types.hpp | 1 +
mc_enum_types.xpp | 11 +++++++++++
mc_enum_types_aux.cpp | 1 +
5 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/mc_enum_type_enums.hpp b/mc_enum_type_enums.hpp
index 3d67e01..458e1b1 100644
--- a/mc_enum_type_enums.hpp
+++ b/mc_enum_type_enums.hpp
@@ -85,6 +85,12 @@ enum mcenum_spread_freq
,mce_spread_daily = 365
};
+enum mcenum_cso_era
+ {mce_1980cso = 1980
+ ,mce_2001cso = 2001
+ ,mce_2017cso = 2017
+ };
+
enum mcenum_mode
{mce_annual = 1
,mce_semiannual = 2
@@ -104,7 +110,8 @@ MC_DEFINE_ENUMS(smoking)
MC_DEFINE_ENUMS(class)
MC_DEFINE_ENUMS(dbopt)
MC_DEFINE_ENUMS(dbopt_7702)
-//MC_DEFINE_ENUMS(mode) // Defined above.
+//MC_DEFINE_ENUMS(cso_era) // Defined above.
+//MC_DEFINE_ENUMS(mode) // Defined above.
MC_DEFINE_ENUMS(gen_basis)
MC_DEFINE_ENUMS(sep_basis)
MC_DEFINE_ENUMS(rate_period)
diff --git a/mc_enum_types.cpp b/mc_enum_types.cpp
index ed5cdad..7ad47d8 100644
--- a/mc_enum_types.cpp
+++ b/mc_enum_types.cpp
@@ -125,6 +125,7 @@ MC_DEFINE(smoking,3)
MC_DEFINE(class,4)
MC_DEFINE(dbopt,4)
MC_DEFINE(dbopt_7702,2)
+MC_DEFINE(cso_era,3)
MC_DEFINE(mode,4)
MC_DEFINE(gen_basis,3)
MC_DEFINE(sep_basis,3)
diff --git a/mc_enum_types.hpp b/mc_enum_types.hpp
index a33577c..5bbd8eb 100644
--- a/mc_enum_types.hpp
+++ b/mc_enum_types.hpp
@@ -41,6 +41,7 @@ typedef mc_enum<mcenum_smoking > mce_smoking
;
typedef mc_enum<mcenum_class > mce_class ;
typedef mc_enum<mcenum_dbopt > mce_dbopt ;
typedef mc_enum<mcenum_dbopt_7702 > mce_dbopt_7702 ;
+typedef mc_enum<mcenum_cso_era > mce_cso_era ;
typedef mc_enum<mcenum_mode > mce_mode ;
typedef mc_enum<mcenum_gen_basis > mce_gen_basis ;
typedef mc_enum<mcenum_sep_basis > mce_sep_basis ;
diff --git a/mc_enum_types.xpp b/mc_enum_types.xpp
index d0658e2..0161be2 100644
--- a/mc_enum_types.xpp
+++ b/mc_enum_types.xpp
@@ -87,6 +87,17 @@
,"B" \
};
+#define cso_era_VALUES \
+ {mce_1980cso \
+ ,mce_2001cso \
+ ,mce_2017cso \
+ };
+#define cso_era_NAMES \
+ {"1980" \
+ ,"2001" \
+ ,"2017" \
+ };
+
#define mode_VALUES \
{mce_annual \
,mce_semiannual \
diff --git a/mc_enum_types_aux.cpp b/mc_enum_types_aux.cpp
index 1f101d5..6bb8b5e 100644
--- a/mc_enum_types_aux.cpp
+++ b/mc_enum_types_aux.cpp
@@ -129,6 +129,7 @@ std::string mc_str(T t)
template std::string mc_str(mcenum_class );
template std::string mc_str(mcenum_country );
+template std::string mc_str(mcenum_cso_era );
template std::string mc_str(mcenum_dbopt );
template std::string mc_str(mcenum_defn_life_ins );
template std::string mc_str(mcenum_defn_material_change);
- [lmi-commits] [lmi] master updated (712f0e7 -> 207dd79), Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master 4781b2b 2/6: Always prefer '<br>' to '<p></p>', Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master 0dc541e 3/6: Add an 'mc' enumeration for CSO era,
Greg Chicares <=
- [lmi-commits] [lmi] master 61eb068 5/6: Add 'CsoEra' to ledger, Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master c01cedb 4/6: Replace an 'oe' with an 'mc' enumeration for CSO era, Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master 4e37e2e 1/6: Revert "Demonstrate pilcrows-and-guillemets '.policy' syntax", Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master 207dd79 6/6: Use {{CsoEra}} in 'sample.policy', Greg Chicares, 2019/08/11