Commit b5306019 authored by Roland Levillain's avatar Roland Levillain
Browse files

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


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@464 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 148397f7
2006-04-21 Roland Levillain <roland@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
2006-04-21 Roland Levillain <roland@lrde.epita.fr>
* configure.ac: Configure olena/oln/Makefile and
......
......@@ -3,7 +3,6 @@
mlcdir = $(includedir)/mlc
nobase_mlc_HEADERS = \
abort.hh \
any.hh \
assert.hh \
bexpr.hh \
bool.hh \
......
......@@ -8,7 +8,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/metalic
# when oln.m4 is available in the distribution.
check_PROGRAMS = \
any \
case \
if \
is_a \
......@@ -18,7 +17,6 @@ check_PROGRAMS = \
switch \
typedef
any_SOURCES = any.cc
case_SOURCES = case.cc
if_SOURCES = if.cc
is_a_SOURCES = is_a.cc
......
......@@ -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 @@ namespace oln {
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 @@ namespace oln {
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) {}
};
......
......@@ -2,5 +2,6 @@
stcdir = $(includedir)/stc
nobase_stc_HEADERS = \
any.hh \
entry.hh \
properties.hh
......@@ -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 @@ namespace mlc
/*-----------------------.
| mlc::any__best_speed. |
| stc::any__best_speed. |
`-----------------------*/
/// "Best speed" version of `any'.
......@@ -112,7 +112,7 @@ namespace mlc
/*------------------------.
| mlc::any__best_memory. |
| stc::any__best_memory. |
`------------------------*/
/// "Best memory" version of 'any'
......@@ -177,7 +177,7 @@ namespace mlc
/*-------------------.
| mlc::any__simple. |
| stc::any__simple. |
`-------------------*/
/// "Simple" version of `any'.
......@@ -205,8 +205,7 @@ namespace mlc
any__simple() : super() {}
};
} // end of namespace stc
} // end of namespace mlc
#endif // ! METALIC_ANY_HH
#endif // ! STATIC_ANY_HH
......@@ -8,9 +8,11 @@ AM_CPPFLAGS = -I$(top_srcdir)/static -I$(top_srcdir)/metalic
# 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
......
/// 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 @@ struct C : public B<C> {};
- Abstractions.
mlc::any<Exact>
stc::any<Exact>
^
|
T<Exact>
......@@ -67,7 +67,7 @@ struct C : public B<C> {};
- 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 @@ struct C : public B<C> {};
*/
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 > {};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment