21 #include "SheafSystem/namespace_schema_member_index.h" 23 #include "SheafSystem/assert_contract.h" 24 #include "SheafSystem/std_string.h" 30 const int NAMESPACE_SCHEMA_MEMBER_INDEX_CT =
31 sheaf::NAMESPACE_SCHEMA_MEMBER_INDEX_END - sheaf::NAMESPACE_SCHEMA_MEMBER_INDEX_BEGIN;
40 (x == NAMESPACE_SCHEMA_MEMBER_INDEX_END) ?
41 NAMESPACE_SCHEMA_MEMBER_INDEX_BEGIN :
54 static const string names[NAMESPACE_SCHEMA_MEMBER_INDEX_CT+1] =
65 "NOT_A_NAMESPACE_SCHEMA_MEMBER_INDEX" 68 const string* lresult_ptr = &names[NAMESPACE_SCHEMA_MEMBER_INDEX_CT];
73 lresult_ptr = &names[lpt - NAMESPACE_SCHEMA_MEMBER_INDEX_BEGIN];
76 const string& result = *lresult_ptr;
80 ensure(!result.empty());
94 i< NAMESPACE_SCHEMA_MEMBER_INDEX_END;
127 NOT_A_NAMESPACE_SCHEMA_MEMBER_INDEX
133 result = prims[xindex - NAMESPACE_SCHEMA_MEMBER_INDEX_BEGIN];
155 (NAMESPACE_SCHEMA_MEMBER_INDEX_BEGIN <= xindex) && (xindex < NAMESPACE_SCHEMA_MEMBER_INDEX_END);
SHEAF_DLL_SPEC bool is_namespace_schema_member_index(pod_index_type xindex)
True if xindex is a valid primitive index.
namespace_schema_member_index
Ids for namespace poset schema members.
SHEAF_DLL_SPEC const std::string & namespace_schema_member_index_to_name(namespace_schema_member_index xpt)
The name of the enumerator xpt.
SHEAF_DLL_SPEC namespace_schema_member_index namespace_schema_member_index_from_index(pod_index_type xindex)
The enumerator corresponding to primitive index xindex.
int_type pod_index_type
The plain old data index type.
SHEAF_DLL_SPEC namespace_schema_member_index namespace_schema_member_index_from_name(const std::string &xname)
The enumerator with name xname.
SHEAF_DLL_SPEC namespace_member_index & operator++(namespace_member_index &x)
Prefix increment operator for namespace_member_index.