SheafSystem  0.0.0.0
abstract_product_structure.h
Go to the documentation of this file.
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 
20 
21 #ifndef ABSTRACT_PRODUCT_STRUCTURE_H
22 #define ABSTRACT_PRODUCT_STRUCTURE_H
23 
24 #ifndef SHEAF_DLL_SPEC_H
25 #include "SheafSystem/sheaf_dll_spec.h"
26 #endif
27 
28 #ifndef ANY_H
29 #include "SheafSystem/any.h"
30 #endif
31 
32 #ifndef POD_TYPES_H
33 #include "SheafSystem/pod_types.h"
34 #endif
35 
36 namespace sheaf
37 {
38 
42 class SHEAF_DLL_SPEC abstract_product_structure : public any
43 {
44 
45  // ===========================================================
47  // ===========================================================
49 
50 public:
51 
56 
60  virtual ~abstract_product_structure();
61 
66  virtual abstract_product_structure* clone() const = 0;
67 
71  virtual abstract_product_structure& operator=(const abstract_product_structure& xother) = 0;
72 
76  virtual bool operator==(const abstract_product_structure& xother) const = 0;
77 
78 protected:
79 
84 
89 
90 private:
91 
93 
94 
95  // ===========================================================
97  // ===========================================================
99 
100 public:
101 
105  virtual size_type d() const = 0;
106 
110  virtual size_type ub(pod_type xi) const = 0;
111 
115  virtual void ordinal(pod_type* xtuple, pod_type& xordinal) const = 0;
116 
120  virtual void tuple(pod_type xordinal, pod_type* xtuple) const = 0;
121 
125  size_type ordinal_ub() const;
126 
130  virtual void put_ubs(size_type* xubs) = 0;
131 
132 protected:
133 
134 private:
135 
137 
138 
139  // ===========================================================
141  // ===========================================================
143 
144 public:
145 
149  virtual bool is_ancestor_of(const any *other) const;
150 
154  virtual bool invariant() const;
155 
156 protected:
157 
158 private:
159 
161 
162 };
163 
164 // ===========================================================
165 // NON-MEMBER FUNCTIONS
166 // ===========================================================
167 
168 } // end namespace sheaf
169 
170 #endif // ifndef ABSTRACT_PRODUCT_STRUCTURE_H
An abstract class that defines the product structure for an id space.
abstract_product_structure(const abstract_product_structure &xother)
Copy constructor; disabled.
pod_index_type ordinal(pod_index_type xi, pod_index_type xj, size_type xj_ub)
2-tuple to ordinal conversion.
Abstract base class with useful features for all objects.
Definition: any.h:39
abstract_product_structure()
Default constructor; disabled.
unsigned long size_type
An unsigned integral type used to represent sizes and capacities.
Definition: sheaf.h:52
pod_index_type pod_type
The "plain old data" index type for this.
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.
int_type pod_index_type
The plain old data index type.
Definition: pod_types.h:49
Namespace for the sheaves component of the sheaf system.
void tuple(pod_index_type x, size_type xj_ub, pod_index_type &xi, pod_index_type &xj)
Ordinal to 2-tuple conversion.