Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Robert Sachunsky
olena
Commits
aea0fc02
Commit
aea0fc02
authored
Jun 07, 2011
by
Guillaume Lazzara
Browse files
Add a missing conversion routine for object ids.
* mln/convert/from_to.hxx, * mln/util/object_id.hh: Here.
parent
a32b976c
Changes
3
Hide whitespace changes
Inline
Side-by-side
milena/ChangeLog
View file @
aea0fc02
2011-06-07 Guillaume Lazzara <z@lrde.epita.fr>
Add a missing conversion routine for object ids.
* mln/convert/from_to.hxx,
* mln/util/object_id.hh: Here.
2011-05-26 Guillaume Lazzara <z@lrde.epita.fr>
* mln/draw/site_set.hh: new.
milena/mln/convert/from_to.hxx
View file @
aea0fc02
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Copyright (C) 2008, 2009, 2010
, 2011
EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
...
...
@@ -84,6 +84,7 @@ namespace mln
namespace
util
{
template
<
typename
T
>
class
array
;
template
<
typename
Tag
,
typename
V
>
class
object_id
;
}
namespace
value
{
...
...
@@ -473,6 +474,10 @@ namespace mln
from_to
(
from
.
second
(),
to
.
second
());
}
// util::object_id<Tag,V> -> V.
template
<
typename
Tag
,
typename
V
>
void
from_to_
(
const
util
::
object_id
<
Tag
,
V
>&
from
,
V
&
to_
);
}
// end of namespace mln::convert::over_load
}
// end of namespace mln::convert
...
...
milena/mln/util/object_id.hh
View file @
aea0fc02
...
...
@@ -38,6 +38,24 @@
namespace
mln
{
// Forward declaration
namespace
util
{
template
<
typename
Tag
,
typename
V
>
class
object_id
;
}
namespace
convert
{
namespace
over_load
{
// object_id<Tag,V> -> V.
template
<
typename
Tag
,
typename
V
>
void
from_to_
(
const
util
::
object_id
<
Tag
,
V
>&
from
,
V
&
to_
);
}
// end of namespace mln::convert::over_load
}
// end of namespace mln::convert
namespace
util
{
...
...
@@ -90,9 +108,12 @@ namespace mln
bool
operator
<
(
const
object_id
<
Tag
,
V
>&
lhs
,
const
object_id
<
Tag
,
V
>&
rhs
);
}
// end of namespace mln::util
# ifndef MLN_INCLUDE_ONLY
namespace
util
{
template
<
typename
Tag
,
typename
V
>
inline
...
...
@@ -205,10 +226,26 @@ namespace mln
return
lhs
.
value
()
<
rhs
.
value
();
}
}
// end of namespace mln::util
# endif // ! MLN_INCLUDE_ONLY
namespace
convert
{
}
// end of namespace mln::util
namespace
over_load
{
// object_id<Tag,V> -> V.
template
<
typename
Tag
,
typename
V
>
void
from_to_
(
const
util
::
object_id
<
Tag
,
V
>&
from
,
V
&
to_
)
{
to_
=
from
.
value
();
}
}
// end of namespace mln::convert::over_load
}
// end of namespace mln::convert
# endif // ! MLN_INCLUDE_ONLY
}
// end of namespace mln
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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