21 #include "SheafSystem/primitives_schema_member_index.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/std_string.h" 30 const int PRIMITIVES_SCHEMA_MEMBER_INDEX_CT =
31 sheaf::PRIMITIVES_SCHEMA_MEMBER_INDEX_END - sheaf::PRIMITIVES_SCHEMA_MEMBER_INDEX_BEGIN;
40 (x == PRIMITIVES_SCHEMA_MEMBER_INDEX_END) ?
41 PRIMITIVES_SCHEMA_MEMBER_INDEX_BEGIN :
54 static const string names[PRIMITIVES_SCHEMA_MEMBER_INDEX_CT+1] =
59 "NOT_A_PRIMITIVES_SCHEMA_MEMBER_INDEX" 62 const string* lresult_ptr = &names[PRIMITIVES_SCHEMA_MEMBER_INDEX_CT];
67 lresult_ptr = &names[lpt - PRIMITIVES_SCHEMA_MEMBER_INDEX_BEGIN];
70 const string& result = *lresult_ptr;
74 ensure(!result.empty());
88 i< PRIMITIVES_SCHEMA_MEMBER_INDEX_END;
115 NOT_A_PRIMITIVES_SCHEMA_MEMBER_INDEX
121 result = prims[xindex - PRIMITIVES_SCHEMA_MEMBER_INDEX_BEGIN];
143 (PRIMITIVES_SCHEMA_MEMBER_INDEX_BEGIN <= xindex) && (xindex < PRIMITIVES_SCHEMA_MEMBER_INDEX_END);
primitives_schema_member_index
Ids for standard poset members.
SHEAF_DLL_SPEC primitives_schema_member_index primitives_schema_member_index_from_name(const std::string &xname)
The enumerator with name xname.
SHEAF_DLL_SPEC bool is_primitives_schema_member_index(pod_index_type xindex)
True if xindex is a valid primitive index.
int_type pod_index_type
The plain old data index type.
SHEAF_DLL_SPEC namespace_member_index & operator++(namespace_member_index &x)
Prefix increment operator for namespace_member_index.
SHEAF_DLL_SPEC const std::string & primitives_schema_member_index_to_name(primitives_schema_member_index xpt)
The name of the enumerator xpt.
SHEAF_DLL_SPEC primitives_schema_member_index primitives_schema_member_index_from_index(pod_index_type xindex)
The enumerator corresponding to primitive index xindex.