21 #include "SheafSystem/standard_version_index.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/std_string.h" 30 const int STANDARD_VERSION_INDEX_CT =
31 sheaf::STANDARD_VERSION_INDEX_END - sheaf::STANDARD_VERSION_INDEX_BEGIN;
40 (x == STANDARD_VERSION_INDEX_END) ?
41 STANDARD_VERSION_INDEX_BEGIN :
54 static const string names[STANDARD_VERSION_INDEX_CT+1] =
56 "CURRENT_MEMBER_VERSION",
57 "CURRENT_HOST_VERSION",
58 "COARSEST_COMMON_REFINEMENT_VERSION",
59 "NOT_A_STANDARD_VERSION_INDEX" 62 const string* lresult_ptr = &names[STANDARD_VERSION_INDEX_CT];
67 lresult_ptr = &names[lpt - STANDARD_VERSION_INDEX_BEGIN];
70 const string& result = *lresult_ptr;
74 ensure(!result.empty());
88 i< STANDARD_VERSION_INDEX_END;
112 CURRENT_MEMBER_VERSION,
113 CURRENT_HOST_VERSION,
114 COARSEST_COMMON_REFINEMENT_VERSION,
115 NOT_A_STANDARD_VERSION_INDEX
121 result = ids[xindex - STANDARD_VERSION_INDEX_BEGIN];
143 (STANDARD_VERSION_INDEX_BEGIN <= xindex) && (xindex < STANDARD_VERSION_INDEX_END);
SHEAF_DLL_SPEC const std::string & standard_version_index_to_name(standard_version_index xpt)
The name of the enumerator xpt.
SHEAF_DLL_SPEC bool is_standard_version_index(pod_index_type xindex)
True if xindex is a valid primitive index.
standard_version_index
Ids for standard poset versions.
int_type pod_index_type
The plain old data index type.
SHEAF_DLL_SPEC standard_version_index standard_version_index_from_index(pod_index_type xindex)
The enumerator corresponding to primitive index xindex.
SHEAF_DLL_SPEC namespace_member_index & operator++(namespace_member_index &x)
Prefix increment operator for namespace_member_index.
SHEAF_DLL_SPEC standard_version_index standard_version_index_from_name(const std::string &xname)
The enumerator with name xname.