Commit 4a951368 authored by Roland Levillain's avatar Roland Levillain
Browse files

Start to provide some precompiled wrappers for Milena.

	* src/wrappers/milena.hh, src/wrappers/milena.cc: New.
	* src/wrappers/Makefile.am: New.
	* src/Makefile.am (SUBDIRS): New.
	Add . and wrappers.
	* configure.ac: Configure src/wrappers/Makefile.

git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@4697 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 12b34749
2009-11-02 Roland Levillain <roland@lrde.epita.fr>
Start to provide some precompiled wrappers for Milena.
* src/wrappers/milena.hh, src/wrappers/milena.cc: New.
* src/wrappers/Makefile.am: New.
* src/Makefile.am (SUBDIRS): New.
Add . and wrappers.
* configure.ac: Configure src/wrappers/Makefile.
2009-11-02 Roland Levillain <roland@lrde.epita.fr>
Wrap global objects (operator functors) previously ignored.
......
......@@ -208,6 +208,7 @@ AC_CONFIG_FILES([
libmd5/Makefile
src/Makefile
src/config.hh
src/wrappers/Makefile
data/Makefile
config/Makefile
_config/local-config.rb
......
......@@ -14,6 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
SUBDIRS = . wrappers
include_HEADERS = dyn-all.hh dyn-light.hh
lib_LTLIBRARIES = libdyn.la
......
# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
# Olena is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 2 of the License.
#
# Olena is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
# FIXME: These wrappers should be optional (and likewise for all
# milena-related code); have configure provide an `--enable-milena'
# option.
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src
# Wrapping a few Milena routines.
lib_LTLIBRARIES = libdynmilena.la
libdynmilena_la_SOURCES = milena.hh milena.cc
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
// Olena is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation, version 2 of the License.
//
// Olena is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Olena. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, you may use this file as part of a free
// software project without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to produce
// an executable, this file does not by itself cause the resulting
// executable to be covered by the GNU General Public License. This
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#include <wrappers/milena.hh>
/// \file
/// \brief Definition of Milena wrappers.
///
/// \todo The next step is to generate (semi-)automatically this file
/// from Milena's (possibly annotated) source files.
namespace dyn
{
namespace mln
{
/*-----------------.
| Initialization. |
`-----------------*/
/* This initialization relies on ctors of the fact that
constructors of global objects called before `main', or more
precisely:
[...] the constructor of a global object is called either
before the first statement of main or may be deferred until
after the first statement of main but before the first use of
any object or function in the same translation unit as the
global object is defined in.
according to this page:
http://en.allexperts.com/q/C-1040/Constructors-Global-Object.htm. */
struct init_type
{
init_type()
{
dyn::include_dir(MILENA_DIR);
dyn::include("mln/core/image/image2d.hh");
dyn::include("mln/data/fill.hh");
dyn::include("mln/debug/iota.hh");
dyn::include("mln/debug/println.hh");
}
};
init_type init;
/*-------------------------.
| A few wrapped routines. |
`-------------------------*/
ctor mk_image2d_int("mln::image2d<int>");
fun fill("mln::data::fill");
fun iota("mln::debug::iota");
fun println("mln::debug::println");
// FIXME: Wrap more routines.
// ...
} // end of namespace dyn::mln
} // end of namespace dyn
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
// Olena is free software: you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation, version 2 of the License.
//
// Olena is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Olena. If not, see <http://www.gnu.org/licenses/>.
//
// As a special exception, you may use this file as part of a free
// software project without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to produce
// an executable, this file does not by itself cause the resulting
// executable to be covered by the GNU General Public License. This
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
#ifndef DYN_WRAPPERS_MILENA_HH
# define DYN_WRAPPERS_MILENA_HH
/// \file
/// \brief Declaration of Milena wrappers.
///
/// \todo The next step is to generate (semi-)automatically this file
/// from Milena's (possibly annotated) source files.
# include <dyn-all.hh>
namespace dyn
{
namespace mln
{
extern dyn::language::ctor mk_image2d_int;
extern dyn::language::fun fill;
extern dyn::language::fun iota;
extern dyn::language::fun println;
// FIXME: Wrap more routines.
// ...
} // end of namespace dyn::mln
} // end of namespace dyn
#endif // ! DYN_WRAPPERS_MILENA_HH
Supports Markdown
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