SheafSystem  0.0.0.0
namespace_schema_member_index.h
1 
2 //
3 // Copyright (c) 2014 Limit Point Systems, Inc.
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 
18 // Declarations for namespace_schema_member_index facet of namespace sheaf.
19 
20 #ifndef NAMESPACE_SCHEMA_MEMBER_INDEX_H
21 #define NAMESPACE_SCHEMA_MEMBER_INDEX_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef STD_CLIMITS_H
28 #include "SheafSystem/std_climits.h"
29 #endif
30 
31 #ifndef POD_TYPES_H
32 #include "SheafSystem/pod_types.h"
33 #endif
34 
35 namespace sheaf
36 {
37 
42 const int PREREQ_IDS_UB = 5;
43 
48 {
49  NAMESPACE_SCHEMA_MEMBER_INDEX_BEGIN = 2, // Must be same as first std id.
50  POINTER_INDEX = 2,
51  TYPE_ID_INDEX, // 3
52  CLASS_INDEX, // 4
53  PREREQ_ID_0_INDEX, // 5
54  PREREQ_ID_1_INDEX, // 6
55  PREREQ_ID_2_INDEX, // 7
56  PREREQ_ID_3_INDEX, // 8
57  PREREQ_ID_4_INDEX, // 9
58  IO_INDEX, // 10
59  NAMESPACE_SCHEMA_MEMBER_INDEX_END, // Must be one more than last std id.
60  NOT_A_NAMESPACE_SCHEMA_MEMBER_INDEX = INT_MAX
61 };
62 
67  NAMESPACE_SCHEMA_MEMBER_INDEX_END - NAMESPACE_SCHEMA_MEMBER_INDEX_BEGIN - 1; // IO_INDEX not a dof.
68 
73 
77 SHEAF_DLL_SPEC const std::string& namespace_schema_member_index_to_name(namespace_schema_member_index xpt);
78 
82 SHEAF_DLL_SPEC namespace_schema_member_index namespace_schema_member_index_from_name(const std::string& xname);
83 
88 
92 SHEAF_DLL_SPEC bool is_namespace_schema_member_index(pod_index_type xindex);
93 
94 } // namespace sheaf
95 
96 #endif // ifndef NAMESPACE_SCHEMA_MEMBER_INDEX_H
97 
98 
99 
100 
101 
102 
const int NAMESPACE_SCHEMA_DOF_CT
The number of dofs defined by the namespace schema.
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.
Definition: pod_types.h:49
SHEAF_DLL_SPEC namespace_schema_member_index namespace_schema_member_index_from_name(const std::string &xname)
The enumerator with name xname.
Namespace for the sheaves component of the sheaf system.
SHEAF_DLL_SPEC namespace_member_index & operator++(namespace_member_index &x)
Prefix increment operator for namespace_member_index.
const int PREREQ_IDS_UB
Number of prerequisites ids. Must be consistent with PREREQ_ID_*_INDEX below.