https://svn.lrde.epita.fr/svn/oln/trunk
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Move mlc::any to stc::.
* metalic/mlc/any.hh: Move file...
* static/stc/any.hh: ...here.
Adjust.
* olena/oln/core/abstract/any.hh: Adjust client.
* metalic/tests/any.cc: Move test...
* static/tests/any.cc: ...here.
Adjust test.
* metalic/mlc/Makefile.am (nobase_mlc_HEADERS): Move any.cc...
* static/stc/Makefile.am (nobase_stc_HEADERS): ...here.
* metalic/tests/Makefile.am (check_PROGRAMS): Move any
* static/tests/Makefile.am (check_PROGRAMS): ...here
* metalic/tests/Makefile.am (any_SOURCES): Move variable...
* static/tests/Makefile.am (any_SOURCES): ...here
metalic/mlc/Makefile.am | 1 -
metalic/tests/Makefile.am | 2 --
olena/oln/core/abstract/any.hh | 10 +++++-----
static/stc/Makefile.am | 1 +
static/stc/any.hh | 23 +++++++++++------------
static/tests/Makefile.am | 2 ++
static/tests/any.cc | 18 +++++++++---------
7 files changed, 28 insertions(+), 29 deletions(-)
Index: static/tests/Makefile.am
--- static/tests/Makefile.am (revision 463)
+++ static/tests/Makefile.am (working copy)
@@ -8,9 +8,11 @@
# when oln.m4 is available in the distribution.
check_PROGRAMS = \
+ any \
entry \
properties
+any_SOURCES = any.cc
properties_SOURCES = properties.cc
entry_SOURCES = entry.cc
Index: static/tests/any.cc
--- static/tests/any.cc (revision 463)
+++ static/tests/any.cc (working copy)
@@ -1,18 +1,18 @@
-/// Test mlc::any.
+/// Test stc::any.
-#include <mlc/any.hh>
+#include <stc/any.hh>
#include <mlc/cmp.hh>
#include <mlc/assert.hh>
#include <mlc/logic.hh>
#include <mlc/is_a.hh>
-// FIXME: Test other flavors of mlc::any.
+// FIXME: Test other flavors of stc::any.
/* Linear hierachy.
- Abstractions.
- mlc::any<Exact>
+ stc::any<Exact>
^
|
A<Exact>
@@ -26,7 +26,7 @@
- Concrete class C, deriving from B.
- mlc::any<C>
+ stc::any<C>
^
|
A<C>
@@ -40,7 +40,7 @@
*/
template <typename Exact>
-struct A : public mlc::any__simple< Exact > {};
+struct A : public stc::any__simple< Exact > {};
template <typename Exact>
struct B : public A< Exact > {};
@@ -52,7 +52,7 @@
- Abstractions.
- mlc::any<Exact>
+ stc::any<Exact>
^
|
T<Exact>
@@ -67,7 +67,7 @@
- Concrete classes V and Z, deriving from U and from X and Y resp.
- mlc::any<Z> mlc::any<Z>
+ stc::any<Z> stc::any<Z>
^ ^
| |
T<Z> T<Z>
@@ -81,7 +81,7 @@
*/
template <typename Exact>
-struct T : public mlc::any__simple< Exact > {};
+struct T : public stc::any__simple< Exact > {};
template <typename Exact>
struct U : public T< Exact > {};
Index: static/stc/any.hh
--- static/stc/any.hh (revision 463)
+++ static/stc/any.hh (working copy)
@@ -27,11 +27,11 @@
// Public License.
-#ifndef METALIC_ANY_HH
-# define METALIC_ANY_HH
+#ifndef STATIC_ANY_HH
+# define STATIC_ANY_HH
-/// \file mlc/any.hh
-/// \brief Implementation of mlc::any classes (top of static hierachies).
+/// \file stc/any.hh
+/// \brief Implementation of stc::any classes (top of static hierachies).
# include <mlc/contract.hh>
@@ -41,10 +41,10 @@
#define any_mem(E) any<E, dispatch_policy::best_memory>
-namespace mlc
+namespace stc
{
- /// Tags selecting a dispatch for mlc::any.
+ /// Tags selecting a dispatch for stc::any.
struct dispatch_policy
{
struct best_speed;
@@ -59,7 +59,7 @@
/*-----------------------.
- | mlc::any__best_speed. |
+ | stc::any__best_speed. |
`-----------------------*/
/// "Best speed" version of `any'.
@@ -112,7 +112,7 @@
/*------------------------.
- | mlc::any__best_memory. |
+ | stc::any__best_memory. |
`------------------------*/
/// "Best memory" version of 'any'
@@ -177,7 +177,7 @@
/*-------------------.
- | mlc::any__simple. |
+ | stc::any__simple. |
`-------------------*/
/// "Simple" version of `any'.
@@ -205,8 +205,7 @@
any__simple() : super() {}
};
+} // end of namespace stc
-} // end of namespace mlc
-
-#endif // ! METALIC_ANY_HH
+#endif // ! STATIC_ANY_HH
Index: static/stc/Makefile.am
--- static/stc/Makefile.am (revision 463)
+++ static/stc/Makefile.am (working copy)
@@ -2,5 +2,6 @@
stcdir = $(includedir)/stc
nobase_stc_HEADERS = \
+ any.hh \
entry.hh \
properties.hh
Index: metalic/tests/Makefile.am
--- metalic/tests/Makefile.am (revision 463)
+++ metalic/tests/Makefile.am (working copy)
@@ -8,7 +8,6 @@
# when oln.m4 is available in the distribution.
check_PROGRAMS = \
- any \
case \
if \
is_a \
@@ -18,7 +17,6 @@
switch \
typedef
-any_SOURCES = any.cc
case_SOURCES = case.cc
if_SOURCES = if.cc
is_a_SOURCES = is_a.cc
Index: metalic/mlc/Makefile.am
--- metalic/mlc/Makefile.am (revision 463)
+++ metalic/mlc/Makefile.am (working copy)
@@ -3,7 +3,6 @@
mlcdir = $(includedir)/mlc
nobase_mlc_HEADERS = \
abort.hh \
- any.hh \
assert.hh \
bexpr.hh \
bool.hh \
Index: olena/oln/core/abstract/any.hh
--- olena/oln/core/abstract/any.hh (revision 463)
+++ olena/oln/core/abstract/any.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef OLENA_CORE_ABSTRACT_ANY_HH
# define OLENA_CORE_ABSTRACT_ANY_HH
-# include <mlc/any.hh>
+# include <stc/any.hh>
# include <mlc/bool.hh>
# include <mlc/is_a.hh>
@@ -40,10 +40,10 @@
template <typename E>
- struct any : public mlc::any<E, mlc::dispatch_policy::simple>
+ struct any : public stc::any<E, stc::dispatch_policy::simple>
{
protected:
- typedef mlc::any<E, mlc::dispatch_policy::simple> super;
+ typedef stc::any<E, stc::dispatch_policy::simple> super;
any(E* exact_ptr) : super(exact_ptr) {}
any() {}
};
@@ -51,10 +51,10 @@
template <typename E>
struct any_best_speed :
- public mlc::any<E, mlc::dispatch_policy::best_speed>
+ public stc::any<E, stc::dispatch_policy::best_speed>
{
protected:
- typedef mlc::any<E, mlc::dispatch_policy::best_speed> super;
+ typedef stc::any<E, stc::dispatch_policy::best_speed> super;
any_best_speed(E* exact_ptr = 0) : super(exact_ptr) {}
};