Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iwr
amdis
Commits
fed1a0df
Commit
fed1a0df
authored
11 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
const iterator for DOFVectors added
parent
f950582e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
extensions/Helpers.h
+0
-86
0 additions, 86 deletions
extensions/Helpers.h
with
0 additions
and
86 deletions
extensions/Helpers.h
+
0
−
86
View file @
fed1a0df
...
...
@@ -415,91 +415,5 @@ namespace Helpers {
}
// end namespace Helpers
namespace
AMDiS
{
/** \ingroup DOFAdministration
* \brief
* Implements a DOFIterator for a DOFIndexed<T> object
*/
template
<
typename
T
>
class
DOFConstIterator
:
public
DOFIteratorBase
{
public:
/// Constructs a DOFIterator for cont of type t
DOFConstIterator
(
const
DOFIndexed
<
T
>
*
obj
,
DOFIteratorType
t
)
:
DOFIteratorBase
(
dynamic_cast
<
DOFAdmin
*>
(
obj
->
getFeSpace
()
->
getAdmin
()),
t
),
iteratedObject
(
obj
)
{}
/// Constructs a DOFIterator for cont of type t
DOFConstIterator
(
DOFAdmin
*
admin
,
const
DOFIndexed
<
T
>
*
obj
,
DOFIteratorType
t
)
:
DOFIteratorBase
(
admin
,
t
),
iteratedObject
(
obj
)
{}
/// Dereference operator
inline
const
T
&
operator
*
()
{
return
*
it
;
}
/// Dereference operator
inline
const
T
*
operator
->
()
{
return
&
(
*
it
);
}
inline
bool
operator
!=
(
const
DOFIterator
<
T
>&
rhs
)
{
if
(
this
->
iteratedObject
!=
rhs
.
iteratedObject
)
return
true
;
if
(
this
->
it
!=
rhs
.
it
)
return
true
;
return
false
;
}
inline
bool
operator
==
(
const
DOFIterator
<
T
>&
rhs
)
{
return
!
(
this
->
operator
==
(
rhs
));
}
protected
:
/// Implementation of DOFIteratorBase::goToBeginOfIteratedObject()
inline
void
goToBeginOfIteratedObject
()
{
it
=
iteratedObject
->
begin
();
}
/// Implementation of DOFIteratorBase::goToEndOfIteratedObject()
inline
void
goToEndOfIteratedObject
()
{
it
=
iteratedObject
->
end
();
}
/// Implementation of DOFIteratorBase::incObjectIterator()
inline
void
incObjectIterator
()
{
++
it
;
}
/// Implementation of DOFIteratorBase::incObjectIterator()
inline
void
decObjectIterator
()
{
--
it
;
}
protected
:
/// Object that is iterated
const
DOFIndexed
<
T
>
*
iteratedObject
;
/// Iterator for \ref iteratedObject
typename
std
::
vector
<
T
>::
const_iterator
it
;
};
}
// end namespace AMDiS
#endif // EXTENSIONS_HELPERS_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment