[PATCH 11/19] Add concatenating macros to Swilena.

* concat.ixx: New file. * Makefile.am (meta_wrappers): Add concat.ixx --- swilena/ChangeLog | 7 +++++++ swilena/Makefile.am | 4 ++-- swilena/concat.ixx | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 swilena/concat.ixx diff --git a/swilena/ChangeLog b/swilena/ChangeLog index bbbe6d7..bca8f39 100644 --- a/swilena/ChangeLog +++ b/swilena/ChangeLog @@ -31,6 +31,13 @@ 2009-05-26 Roland Levillain <roland@lrde.epita.fr> + Add concatenating macros to Swilena. + + * concat.ixx: New file. + * Makefile.am (meta_wrappers): Add concat.ixx + +2009-05-26 Roland Levillain <roland@lrde.epita.fr> + Wrap iterators on mln::box2d. * box_piter.ixx, box2d_piter.i: New. diff --git a/swilena/Makefile.am b/swilena/Makefile.am index d20d238..80a79a9 100644 --- a/swilena/Makefile.am +++ b/swilena/Makefile.am @@ -5,8 +5,8 @@ SUBDIRS = python # Meta-wrappers (templates), not generating a module, but factoring # common parts. meta_wrappers = \ - box_piter.i ch_value.ixx concrete.ixx fill.ixx image2d.ixx \ - intp.ixx int_u.ixx morpho.ixx pgm.ixx println.ixx + box_piter.i ch_value.ixx concat.ixx concrete.ixx fill.ixx \ + image2d.ixx intp.ixx int_u.ixx morpho.ixx pgm.ixx println.ixx # Wrappers (generating actual modules). wrappers = \ diff --git a/swilena/concat.ixx b/swilena/concat.ixx new file mode 100644 index 0000000..bb8c460 --- /dev/null +++ b/swilena/concat.ixx @@ -0,0 +1,43 @@ +// -*- C++ -*- +// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE) +// +// This file is part of the Olena Library. This library is free +// software; you can redistribute it and/or modify it under the terms +// of the GNU General Public License version 2 as published by the +// Free Software Foundation. +// +// This library 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 this library; see the file COPYING. If not, write to +// the Free Software Foundation, 51 Franklin Street, Fifth Floor, +// Boston, MA 02111-1307, USA. +// +// As a special exception, you may use this file as part of a free +// software library 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. +// reasons why the executable file might be covered by the GNU General +// Public License. + +/// \file concat.ixx +/// \brief Macros concatenating their arguments. +/// +/// These macros are useful to wrap strings containing commas and +/// passed as arguments other macros. For instance, to pass the +/// argument <tt>Bar<int, float></tt> to a macro +/// <tt>instantiate_foo</tt> taking a single argument, use this: +/// +/// \code +/// instantiate_foo(concat2(Bar<int, float>)) +/// \endcode + +#define concat2(A, B) A, B +#define concat3(A, B, C) A, B, C +#define concat4(A, B, C, D) A, B, C, D -- 1.6.1.2
participants (1)
-
Roland Levillain