SheafSystem
0.0.0.0
poset_dof_iterator.h
1
2
//
3
// Copyright (c) 2014 Limit Point Systems, Inc.
4
//
5
6
// Interface for class poset_dof_iterator
7
8
#ifndef POSET_DOF_ITERATOR_H
9
#define POSET_DOF_ITERATOR_H
10
11
#ifndef SHEAF_DLL_SPEC_H
12
#include "SheafSystem/sheaf_dll_spec.h"
13
#endif
14
15
#ifndef ANY_H
16
#include "SheafSystem/any.h"
17
#endif
18
19
#ifndef POSTORDER_ITERATOR_H
20
#include "SheafSystem/postorder_iterator.h"
21
#endif
22
23
namespace
sheaf
24
{
25
26
class
subposet;
27
class
schema_poset_member;
28
class
zn_to_bool;
29
35
class
SHEAF_DLL_SPEC
poset_dof_iterator
:
public
any
36
{
37
38
public
:
39
40
// CANONICAL MEMBERS
41
46
poset_dof_iterator
();
47
51
poset_dof_iterator
(
const
poset_dof_iterator
& xother);
52
56
virtual
poset_dof_iterator
& operator=(
const
poset_dof_iterator
& xother);
57
61
virtual
~
poset_dof_iterator
();
62
66
virtual
bool
is_ancestor_of(
const
any
* other)
const
;
67
71
virtual
poset_dof_iterator
* clone()
const
;
72
76
virtual
bool
invariant()
const
;
77
78
// SOME USEFUL CONSTANTS
79
80
84
enum
anchor_version_index
85
{
86
ANCHOR_VERSION = CURRENT_MEMBER_VERSION,
87
ANCHOR_HOST_VERSION = CURRENT_HOST_VERSION
88
};
89
90
// OTHER CONSTRUCTORS
91
98
explicit
poset_dof_iterator
(
const
schema_poset_member
& xanchor,
99
bool
xis_table_dof =
false
,
100
int
xversion = ANCHOR_VERSION);
101
102
// ITERATOR FACET
103
108
virtual
bool
is_initialized()
const
;
109
110
// Anchor is not virtual; descendant redefinitions
111
// with covariant signature hide this version.
112
117
schema_poset_member
& anchor();
118
123
const
schema_poset_member
& anchor()
const
;
124
129
virtual
void
put_anchor(
const
schema_poset_member
* xanchor,
int
xversion);
130
135
virtual
void
put_anchor(
pod_index_type
xindex);
136
141
void
put_anchor(
const
scoped_index
& xid);
142
146
virtual
bool
is_done()
const
;
147
151
virtual
void
force_is_done();
152
156
virtual
void
next();
157
162
virtual
void
reset(
bool
xreset_markers =
RESET
);
163
168
virtual
int
ct(
bool
xreset =
false
);
169
173
virtual
bool
has_visited(
pod_index_type
xhub_id)
const
;
174
178
bool
has_visited(
const
scoped_index
& xindex)
const
;
179
183
virtual
bool
has_visited(
const
schema_poset_member
& xmbr)
const
;
184
190
virtual
void
put_has_visited(
pod_index_type
xhub_id,
bool
xvalue);
191
197
void
put_has_visited(
const
scoped_index
& xid,
bool
xvalue);
198
199
// DOF ITERATOR FACET
200
201
// Item is not virtual; descendant redefinitions
202
// with covariant signature hide this version.
203
207
schema_poset_member
& item();
208
212
const
schema_poset_member
& item()
const
;
213
217
virtual
bool
item_is_ancestor_of(
const
schema_poset_member
& xmbr)
const
;
218
222
virtual
const
scoped_index
& index();
223
227
bool
is_table_dof()
const
;
228
229
protected
:
230
235
schema_poset_member
*
_anchor
;
236
240
virtual
void
reset_item();
241
246
virtual
void
update_item();
247
251
schema_poset_member
*
_item
;
252
256
postorder_iterator
_itr
;
257
261
bool
_is_table_dof
;
262
};
263
264
}
// namespace sheaf
265
266
#endif // ifndef POSET_DOF_ITERATOR_H
sheaf::poset_dof_iterator::anchor_version_index
anchor_version_index
Identifiers for anchor version.
Definition:
poset_dof_iterator.h:84
sheaf::postorder_iterator
Dperecated. Use postorder_itr. Specialization of the filtered depth-first iterator which exposes the ...
Definition:
postorder_iterator.h:40
sheaf::any
Abstract base class with useful features for all objects.
Definition:
any.h:39
sheaf::RESET
const bool RESET
Iteration marker reset control.
Definition:
sheaf.h:87
sheaf::scoped_index
An index within the external ("client") scope of a given id space.
Definition:
scoped_index.h:116
sheaf::poset_dof_iterator
Iterates in postorder over dofs of a schema member anchor. Attaches a handle of type schema_poset_mem...
Definition:
poset_dof_iterator.h:35
sheaf::poset_dof_iterator::_itr
postorder_iterator _itr
The index iterator used to implement the iteration.
Definition:
poset_dof_iterator.h:256
sheaf::poset_dof_iterator::_is_table_dof
bool _is_table_dof
True if iterating over table dofs.
Definition:
poset_dof_iterator.h:261
sheaf::poset_dof_iterator::_anchor
schema_poset_member * _anchor
The schema member whose downset is being iterated over; the top member of the domain of iteration...
Definition:
poset_dof_iterator.h:235
sheaf::pod_index_type
int_type pod_index_type
The plain old data index type.
Definition:
pod_types.h:49
sheaf
Namespace for the sheaves component of the sheaf system.
Definition:
singly_linked_list.h:37
sheaf::poset_dof_iterator::_item
schema_poset_member * _item
The member handle for the current item in the iteration.
Definition:
poset_dof_iterator.h:251
sheaf::schema_poset_member
A client handle for a poset member which has been prepared for use as a schema.
Definition:
schema_poset_member.h:75
sheaves
dof_iterators
poset_dof_iterator.h
Generated on Sun Jul 9 2017 14:27:24 for SheafSystem by
1.8.13