Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Cazier
CGoGN
Commits
5fa57ec1
Commit
5fa57ec1
authored
May 12, 2014
by
Pierre Kraemer
Browse files
update foreach_dart functions
parent
20067814
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/Topology/generic/mapImpl/mapMono.h
View file @
5fa57ec1
...
...
@@ -126,9 +126,13 @@ public:
/**
* Apply a functor on each dart of the map
* @param f a
ref to the functor obj
* @param f a
callable taking a Dart parameter
*/
bool
foreach_dart
(
FunctorType
&
f
)
;
template
<
typename
FUNC
>
void
foreach_dart
(
FUNC
f
)
;
template
<
typename
FUNC
>
void
foreach_dart
(
FUNC
&
f
)
;
/****************************************
* SAVE & LOAD *
...
...
include/Topology/generic/mapImpl/mapMono.hpp
View file @
5fa57ec1
...
...
@@ -228,7 +228,19 @@ inline void MapMono::next(Dart& d) const
m_attribs
[
DART
].
next
(
d
.
index
)
;
}
inline
bool
MapMono
::
foreach_dart
(
FunctorType
&
f
)
template
<
typename
FUNC
>
inline
void
MapMono
::
foreach_dart
(
FUNC
f
)
{
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
if
(
f
(
d
))
return
true
;
}
return
false
;
}
template
<
typename
FUNC
>
inline
void
MapMono
::
foreach_dart
(
FUNC
&
f
)
{
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
...
...
include/Topology/generic/mapImpl/mapMulti.h
View file @
5fa57ec1
...
...
@@ -280,9 +280,13 @@ public:
/**
* Apply a functor on each dart of the map
* @param f a
ref to the functor obj
* @param f a
callable taking a Dart parameter
*/
bool
foreach_dart
(
FunctorType
&
f
)
;
template
<
typename
FUNC
>
void
foreach_dart
(
FUNC
f
)
;
template
<
typename
FUNC
>
void
foreach_dart
(
FUNC
&
f
)
;
/****************************************
* SAVE & LOAD *
...
...
include/Topology/generic/mapImpl/mapMulti.hpp
View file @
5fa57ec1
...
...
@@ -439,7 +439,19 @@ inline void MapMulti::next(Dart& d) const
d
.
index
=
m_mrattribs
.
end
();
}
inline
bool
MapMulti
::
foreach_dart
(
FunctorType
&
f
)
template
<
typename
FUNC
>
inline
void
MapMulti
::
foreach_dart
(
FUNC
f
)
{
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
if
(
f
(
d
))
return
true
;
}
return
false
;
}
template
<
typename
FUNC
>
inline
void
MapMulti
::
foreach_dart
(
FUNC
&
f
)
{
for
(
Dart
d
=
begin
();
d
!=
end
();
next
(
d
))
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment