SheafSystem  0.0.0.0
pod_types.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 // Declaration of pod_types facet of namespace sheaf..
19 
20 #ifndef POD_TYPES_H
21 #define POD_TYPES_H
22 
23 #ifndef SHEAF_DLL_SPEC_H
24 #include "SheafSystem/sheaf_dll_spec.h"
25 #endif
26 
27 #ifndef SHEAF_H
28 #include "SheafSystem/sheaf.h"
29 #endif
30 
31 #ifndef STD_IOSTREAM_H
32 #include "SheafSystem/std_iostream.h"
33 #endif
34 
35 namespace sheaf
36 {
37 
38 // =============================================================================
39 // POD TYPES FACET
40 // =============================================================================
41 
42 // POD (Plain Old Data) types associated with sheaf primitives of class type.
43 
44 // If you change pod_index_type, review primitive_type::not_a_primitive_type
45 
50 
54 SHEAF_DLL_SPEC pod_index_type invalid_pod_index();
55 
59 SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index);
60 
64 SHEAF_DLL_SPEC pod_index_type max_pod_index();
65 
69 SHEAF_DLL_SPEC pod_index_type min_pod_index();
70 
74 typedef pod_index_type scoped_index_pod_type;
75 
80 {
81  pod_index_type poset_id;
82  pod_index_type member_id;
83 
84  bool operator==(const namespace_relative_member_index_pod_type& xother) const;
85 
86  bool is_valid();
87 };
88 
93 
97 SHEAF_DLL_SPEC
98 std::ostream&
99 operator<<(std::ostream& xos, const namespace_relative_member_index_pod_type& xpod);
100 
104 SHEAF_DLL_SPEC
105 std::istream&
106 operator>>(std::istream& xis, namespace_relative_member_index_pod_type& xindex);
107 
112 {
113  pod_index_type poset_id;
114  pod_index_type subposet_id;
115 
116  bool operator==(const namespace_relative_subposet_index_pod_type& xother) const;
117 
118  bool is_valid();
119 };
120 
125 
129 SHEAF_DLL_SPEC
130 std::ostream&
131 operator<<(std::ostream& xos, const namespace_relative_subposet_index_pod_type& xpod);
132 
136 SHEAF_DLL_SPEC
137 std::istream&
138 operator>>(std::istream& xis, namespace_relative_subposet_index_pod_type& xindex);
139 
140 } // namespace sheaf
141 
142 #endif // ifndef POD_TYPES_H
SHEAF_DLL_SPEC namespace_relative_member_index_pod_type invalid_namespace_relative_member_index_pod()
The invalid namespace_relative_member_index_pod_type value.
Definition: pod_types.cc:55
SHEAF_DLL_SPEC namespace_relative_subposet_index_pod_type invalid_namespace_relative_subposet_index_pod()
The invalid namespace_relative_subposet_index_pod_type value.
Definition: pod_types.cc:80
SHEAF_DLL_SPEC pod_index_type max_pod_index()
The maximum pod index value.
Definition: pod_types.cc:43
POD type associated with namespace_relative_subposet_index.
Definition: pod_types.h:111
POD type for namespace_relative_member_index.
Definition: pod_types.h:79
SHEAF_DLL_SPEC pod_index_type min_pod_index()
The minimum pod index value.
Definition: pod_types.cc:49
bool operator==(const singly_linked_list< T, Alloc > &lhs, const singly_linked_list< T, Alloc > &rhs)
Checks if the contents of lhs and rhs are equal, that is, whether lhs.size() == rhs.size() and each element in lhs compares equal with the element in rhs at the same position.
SHEAF_DLL_SPEC std::istream & operator>>(std::istream &is, dof_tuple_type &xdt)
Extract dof_tuple_type xdt from istream& is.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
SHEAF_DLL_SPEC std::ostream & operator<<(std::ostream &os, const dof_descriptor_array &p)
Insert dof_descriptor_array& p into ostream& os.
Namespace for the sheaves component of the sheaf system.
int int_type
The preferred integer type.
Definition: sheaf.h:41
pod_index_type scoped_index_pod_type
POD type for scoped_index.
Definition: pod_types.h:74
SHEAF_DLL_SPEC bool is_valid(pod_index_type xpod_index)
True if an only if xpod_index is valid.
Definition: pod_types.cc:37
SHEAF_DLL_SPEC pod_index_type invalid_pod_index()
The invalid pod index value.
Definition: pod_types.cc:31