Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 9625 discussions
https://svn.lrde.epita.fr/svn/oln/trunk/olena
Draft Draft.
Index: ChangeLog
from Ugo Jardonnet <ugo.jardonnet(a)lrde.epita.fr>
Histogramm : Draft.
* oln/histo: New.
* oln/histo/histo_median.hh: New.
* oln/histo/histo_min.hh: New.
* oln/histo/histogram.hh: New.
canvas/two_pass.hh | 6 +--
histo/histo_median.hh | 85 ++++++++++++++++++++++++++++++++++++++++++++++
histo/histo_min.hh | 90 +++++++++++++++++++++++++++++++++++++++++++++++++
histo/histogram.hh | 69 +++++++++++++++++++++++++++++++++++++
morpho/cc_tarjan_v1.hh | 1
5 files changed, 247 insertions(+), 4 deletions(-)
Index: oln/histo/histo_median.hh
--- oln/histo/histo_median.hh (revision 0)
+++ oln/histo/histo_median.hh (revision 0)
@@ -0,0 +1,85 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLN_HISTO_MEDIAN_HH
+# define OLN_HISTO_MEDIAN_HH
+
+# include <oln/histo/histogram.hh>
+
+
+namespace oln
+{
+
+ namespace histo_median
+ {
+
+ template <typename T>
+ struct histo_median : public Histogram< histo_median<T> >
+ {
+ histo_median() : imed(this.ival) {}
+
+ void slide(T i)
+ {
+ int last_i = take(i);
+ untake();
+ if (imed == -1)
+ compute_median();
+ else
+ compute_median();
+ }
+
+ void compute_median()
+ {
+ T total = 0;
+ for (int i = 0; i < this.v.size; i++)
+ total += this.v[i];
+
+ imed = 0;
+ T sum = this.v[imed];
+ while (sum < total/2)
+ {
+ ++imed;
+ sum += this.v[imed];
+ }
+ }
+
+ T median() { return this.v[imed]; }
+ private:
+ int& imed;
+ T rest;
+ };
+
+
+# ifndef OLN_INCLUDE_ONLY
+
+# endif // ! OLN_INCLUDE_ONLY
+
+ } // end of namespace oln::histo_median
+
+} // end of namespace oln
+
+#endif // ! OLN_HISTO_MEDIAN_HH
Index: oln/histo/histo_min.hh
--- oln/histo/histo_min.hh (revision 0)
+++ oln/histo/histo_min.hh (revision 0)
@@ -0,0 +1,90 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLN_HISTO_HISTO_MIN_HH
+# define OLN_HISTO_HISTO_MIN_HH
+
+# include <oln/histo/histogram.hh>
+# include <oln/core/internal/max_value.hh>
+
+namespace oln
+{
+
+ namespace histo_min
+ {
+
+ template <typename T>
+ struct histo_min : public Histogram< histo_min<T> >
+ {
+ histo_min() : imin(this.ival) {}
+
+ template <typename L>
+ void init(L line)
+ {
+ int i;
+ for (i = 0; i < line.norme; i++)
+ take(oln_max(T));
+ imin = i/2;
+ }
+
+ void slide(T i)
+ {
+ int last_i = take(i);
+ untake();
+ if (imin == -1)
+ compute_min();
+ else if (i < this.v[imin])
+ imin = last_i;
+ }
+
+ void compute_min()
+ {
+ imin = 0;
+ for (int i = 1; i < this.v.size; i++)
+ if (this.v[i] < this.v[imin])
+ imin = i;
+ }
+
+ T min() { return this.v[imin]; }
+ private:
+ int& imin;
+ };
+
+
+# ifndef OLN_INCLUDE_ONLY
+
+# endif // ! OLN_INCLUDE_ONLY
+
+ } // end of namespace oln::histo_min
+
+} // end of namespace oln
+
+#endif // ! OLN_HISTO_HISTO_MIN_HH
+
+
+
+
Index: oln/histo/histogram.hh
--- oln/histo/histogram.hh (revision 0)
+++ oln/histo/histogram.hh (revision 0)
@@ -0,0 +1,69 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef OLN_HISTO_HISTOGRAM_HH
+# define OLN_HISTO_HISTOGRAM_HH
+
+namespace oln
+{
+
+ /// Concept-class "Histogram".
+
+ template <typename T>
+ struct Histogram
+ {
+ void take(T t)
+ {
+ v.insert(v.begin(), t);
+ if (ival > 0)
+ ival++;
+ return 0;
+ }
+
+ void untake()
+ {
+ if (this.ival == v.size)
+ ival = -1;
+ T ret = v.back();
+ v.pop_back();
+ return ret;
+ }
+
+ T operator()(int i) { return v[i]; }
+ void clean() { v.clear(); }
+
+ protected:
+ Histogram() : ival(-1) {}
+
+ std::vector<unsigned> v;
+ int ival;
+ }; // end of oln::Histogram<Exact>
+
+
+} // end of namespace oln
+
+#endif // ! OLN_HISTO_HISTOGRAM_HH
Index: oln/core/2d/line2d.hh
Index: oln/morpho/cc_tarjan_v1.hh
--- oln/morpho/cc_tarjan_v1.hh (revision 999)
+++ oln/morpho/cc_tarjan_v1.hh (working copy)
@@ -33,7 +33,6 @@
# include <oln/level/fill.hh>
# include <oln/core/internal/f_ch_value.hh>
-
namespace oln
{
Index: oln/canvas/two_pass.hh
--- oln/canvas/two_pass.hh (revision 999)
+++ oln/canvas/two_pass.hh (working copy)
@@ -37,9 +37,9 @@
namespace canvas
{
- namespace v1
+ namespace v1 // Data owned by f.
{
- template <typename F> // Data owned by f.
+ template <typename F>
void two_pass(F& fun)
{
@@ -109,7 +109,7 @@
}
- namespace v4 // Via Inheritance.
+ namespace v4 // Via static Inheritens.
{
template <typename I, typename Exact>
struct two_pass : public virtual Any<Exact>
1
0
Re: [Transformers-patches] Re: [Olena-patches] scool r49: Merge main branch to trunk
by yabo 06 Jul '07
by yabo 06 Jul '07
06 Jul '07
Roland Levillain a écrit :
> Good. Thanks!
Posting to olena-patches was involuntary, however should I continue ?
> Ouch! I think this message did not need to be so long. :)
Sorry! :)
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)
1
0
URL: https://svn.lrde.epita.fr/svn/scool/trunk
ChangeLog:
2007-07-05 Maxime van Noppen <maxime.van-noppen(a)lrde.epita.fr>
Merge main branch to trunk
* AUTHORS: New.
* ChangeLog: .
* Makefile.am: New.
* Makefile: Remove.
* NEWS: New.
* README: New.
* bin/scoolc: New.
* bootstrap: New.
* config/Makefile.am: New.
* config: New.
* configure.ac: New.
* src/Makefile.am: New.
* src/cxx-syn/Cxx.sdf: New.
* src/cxx-syn/CxxDecl.sdf: New.
* src/cxx-syn/CxxExp.sdf: New.
* src/cxx-syn/CxxFun.sdf: New.
* src/cxx-syn/CxxScope.sdf: New.
* src/cxx-syn/CxxStm.sdf: New.
* src/cxx-syn/CxxType.sdf: New.
* src/cxx-syn/Lexical.sdf: New.
* src/cxx-syn/Makefile.am: New.
* src/cxx-syn: New.
* src/parse-scool/parse-scool: New.
* src/pp-cxx/CxxDecl.meta: New.
* src/pp-cxx/CxxDecl.str: New.
* src/pp-cxx/CxxExp.str: New.
* src/pp-cxx/CxxFun.meta: New.
* src/pp-cxx/CxxFun.str: New.
* src/pp-cxx/CxxId.meta: New.
* src/pp-cxx/CxxId.str: New.
* src/pp-cxx/CxxProgram.meta: New.
* src/pp-cxx/CxxProgram.str: New.
* src/pp-cxx/CxxStm.meta: New.
* src/pp-cxx/CxxStm.str: New.
* src/pp-cxx/CxxType.meta: New.
* src/pp-cxx/CxxType.str: New.
* src/pp-cxx/Makefile.am: New.
* src/pp-cxx/pp-cxx.meta: New.
* src/pp-cxx/pp-cxx.str: New.
* src/pp-cxx: New.
* src/scl-syn/Decl.sdf: .
* src/scl-syn/Lexical.sdf: .
* src/scl-syn/Makefile.am: New.
* src/scl-syn/Type.sdf: .
* src/scoolt/Access.str: New.
* src/scoolt/Decl.str: New.
* src/scoolt/Exp.str: New.
* src/scoolt/Makefile.am: New.
* src/scoolt/Program.str: New.
* src/scoolt/Stm.str: New.
* src/scoolt/Tools.str: New.
* src/scoolt/Type.str: New.
* src/scoolt/scoolt.str: New.
* src/scoolt: New.
* tests/input/class_decl_1.scl: New.
* tests/input/class_decl_2.scl: New.
* tests/input/class_decl_3.scl: New.
* tests/input/class_decl_inh.scl: New.
* tests/input/class_decl_inh_abst.scl: New.
* tests/input/class_decl_inh_fin.scl: New.
* tests/input/class_members_1.scl: New.
* tests/input/class_predecl.scl: New.
* tests/input/class_predecl_inh.scl: New.
* tests/input/class_template_1.scl: New.
* tests/input/class_template_2.scl: New.
* tests/input/cons_decl_1.scl: New.
* tests/input/cons_decl_2.scl: New.
* tests/input/function_call_1.scl: New.
* tests/input/function_call_2.scl: New.
* tests/input/function_call_3.scl: New.
* tests/input/function_decl_1.scl: New.
* tests/input/function_decl_10.scl: New.
* tests/input/function_decl_2.scl: New.
* tests/input/function_decl_3.scl: New.
* tests/input/function_decl_4.scl: New.
* tests/input/function_decl_5.scl: New.
* tests/input/function_decl_6.scl: New.
* tests/input/function_decl_7.scl: New.
* tests/input/function_decl_8.scl: New.
* tests/input/function_decl_9.scl: New.
* tests/input/function_ftype_1.scl: New.
* tests/input/function_ftype_2.scl: New.
* tests/input/function_return_1.scl: New.
* tests/input/function_return_2.scl: New.
* tests/input/function_return_3.scl: New.
* tests/input/sample_1.scl: New.
* tests/input/sample_2.scl: New.
* tests/input/sample_3.scl: New.
* tests/input/sample_4.scl: New.
* tests/input/sample_container.scl: New.
* tests/input/var_decl_1.scl: New.
* tests/input/var_decl_2.scl: New.
* tests/input/var_decl_3.scl: New.
* tests/input/var_decl_4.scl: New.
* tests/input/var_decl_5.scl: New.
* tests/input/var_decl_6.scl: New.
* tests/input/var_decl_7.scl: New.
* tests/mouline.sh: .
* tests/parser/class_decl_1.ref: New.
* tests/parser/class_decl_2.ref: New.
* tests/parser/class_decl_3.ref: New.
* tests/parser/class_decl_inh.ref: New.
* tests/parser/class_decl_inh_abst.ref: New.
* tests/parser/class_decl_inh_fin.ref: New.
* tests/parser/class_members_1.ref: New.
* tests/parser/class_predecl.ref: New.
* tests/parser/class_predecl_inh.ref: New.
* tests/parser/class_template_1.ref: New.
* tests/parser/class_template_2.ref: New.
* tests/parser/command: .
* tests/parser/cons_decl_1.ref: New.
* tests/parser/cons_decl_2.ref: New.
* tests/parser/function_call_1.ref: New.
* tests/parser/function_call_2.ref: New.
* tests/parser/function_call_3.ref: New.
* tests/parser/function_decl_1.ref: New.
* tests/parser/function_decl_10.ref: New.
* tests/parser/function_decl_2.ref: New.
* tests/parser/function_decl_3.ref: New.
* tests/parser/function_decl_4.ref: New.
* tests/parser/function_decl_5.ref: New.
* tests/parser/function_decl_6.ref: New.
* tests/parser/function_decl_7.ref: New.
* tests/parser/function_decl_8.ref: New.
* tests/parser/function_decl_9.ref: New.
* tests/parser/function_ftype_1.ref: New.
* tests/parser/function_ftype_2.ref: New.
* tests/parser/function_return_1.ref: New.
* tests/parser/function_return_2.ref: New.
* tests/parser/function_return_3.ref: New.
* tests/parser/sample_1.ref: New.
* tests/parser/sample_2.ref: New.
* tests/parser/sample_3.ref: New.
* tests/parser/sample_4.ref: New.
* tests/parser/var_decl_1.ref: New.
* tests/parser/var_decl_2.ref: New.
* tests/parser/var_decl_3.ref: New.
* tests/parser/var_decl_4.ref: New.
* tests/parser/var_decl_5.ref: New.
* tests/parser/var_decl_6.ref: New.
* tests/transformer/class_decl_1.ref: New.
* tests/transformer/class_decl_2.ref: New.
* tests/transformer/class_decl_3.ref: New.
* tests/transformer/class_decl_abst.ref: New.
* tests/transformer/class_decl_inh.ref: New.
* tests/transformer/class_decl_inh_abst.ref: New.
* tests/transformer/class_decl_inh_fin.ref: New.
* tests/transformer/class_members_1.ref: New.
* tests/transformer/class_predecl.ref: New.
* tests/transformer/class_predecl_inh.ref: New.
* tests/transformer/class_template_1.ref: New.
* tests/transformer/class_template_2.ref: New.
* tests/transformer/command: New.
* tests/transformer/cons_decl_1.ref: New.
* tests/transformer/cons_decl_2.ref: New.
* tests/transformer/empty.ref: New.
* tests/transformer/function_decl_1.ref: New.
* tests/transformer/function_decl_10.ref: New.
* tests/transformer/function_decl_3.ref: New.
* tests/transformer/function_decl_4.ref: New.
* tests/transformer/function_decl_5.ref: New.
* tests/transformer/function_decl_6.ref: New.
* tests/transformer/function_decl_7.ref: New.
* tests/transformer/function_decl_8.ref: New.
* tests/transformer/function_decl_9.ref: New.
* tests/transformer/function_return_1.ref: New.
* tests/transformer/function_return_2.ref: New.
* tests/transformer/function_return_3.ref: New.
* tests/transformer/sample_1.ref: New.
* tests/transformer/sample_3.ref: New.
* tests/transformer/sample_4.ref: New.
* tests/transformer/var_decl_1.ref: New.
* tests/transformer/var_decl_2.ref: New.
* tests/transformer/var_decl_3.ref: New.
* tests/transformer/var_decl_5.ref: New.
* tests/transformer/var_decl_6.ref: New.
* tests/transformer: New.
AUTHORS | 2
Makefile.am | 10
bin/scoolc | 17
bootstrap | 7
config/Makefile.am | 15
configure.ac | 29 +
src/Makefile | 835 +++++++++++++++++++++++++++---
src/Makefile.am | 7
src/cxx-syn/Cxx.sdf | 12
src/cxx-syn/CxxDecl.sdf | 34 +
src/cxx-syn/CxxExp.sdf | 15
src/cxx-syn/CxxFun.sdf | 24
src/cxx-syn/CxxStm.sdf | 11
src/cxx-syn/CxxType.sdf | 14
src/cxx-syn/Lexical.sdf | 15
src/cxx-syn/Makefile.am | 19
src/parse-scool/parse-scool | 1
src/pp-cxx/CxxDecl.meta | 1
src/pp-cxx/CxxDecl.str | 90 +++
src/pp-cxx/CxxExp.str | 31 +
src/pp-cxx/CxxFun.meta | 1
src/pp-cxx/CxxFun.str | 69 ++
src/pp-cxx/CxxId.meta | 1
src/pp-cxx/CxxId.str | 12
src/pp-cxx/CxxProgram.meta | 1
src/pp-cxx/CxxProgram.str | 15
src/pp-cxx/CxxStm.meta | 1
src/pp-cxx/CxxStm.str | 8
src/pp-cxx/CxxType.meta | 1
src/pp-cxx/CxxType.str | 25
src/pp-cxx/Makefile.am | 21
src/pp-cxx/pp-cxx.meta | 1
src/pp-cxx/pp-cxx.str | 6
src/scl-syn/Decl.sdf | 8
src/scl-syn/Lexical.sdf | 7
src/scl-syn/Makefile.am | 19
src/scl-syn/Type.sdf | 2
src/scoolt/Access.str | 15
src/scoolt/Decl.str | 229 ++++++++
src/scoolt/Exp.str | 21
src/scoolt/Makefile.am | 21
src/scoolt/Program.str | 8
src/scoolt/Stm.str | 21
src/scoolt/Tools.str | 29 +
src/scoolt/Type.str | 32 +
src/scoolt/scoolt.str | 184 ++++++
tests/input/class_decl_1.scl | 1
tests/input/class_decl_2.scl | 15
tests/input/class_decl_3.scl | 12
tests/input/class_decl_inh.scl | 9
tests/input/class_decl_inh_abst.scl | 9
tests/input/class_decl_inh_fin.scl | 14
tests/input/class_members_1.scl | 6
tests/input/class_predecl.scl | 1
tests/input/class_predecl_inh.scl | 1
tests/input/class_template_1.scl | 3
tests/input/class_template_2.scl | 3
tests/input/cons_decl_1.scl | 1
tests/input/cons_decl_2.scl | 1
tests/input/function_call_1.scl | 4
tests/input/function_call_2.scl | 4
tests/input/function_call_3.scl | 1
tests/input/function_decl_1.scl | 2
tests/input/function_decl_10.scl | 1
tests/input/function_decl_2.scl | 1
tests/input/function_decl_3.scl | 1
tests/input/function_decl_4.scl | 3
tests/input/function_decl_5.scl | 2
tests/input/function_decl_6.scl | 3
tests/input/function_decl_7.scl | 4
tests/input/function_decl_8.scl | 1
tests/input/function_decl_9.scl | 1
tests/input/function_ftype_1.scl | 1
tests/input/function_ftype_2.scl | 1
tests/input/function_return_1.scl | 4
tests/input/function_return_2.scl | 4
tests/input/function_return_3.scl | 1
tests/input/sample_1.scl | 9
tests/input/sample_2.scl | 5
tests/input/sample_3.scl | 9
tests/input/sample_4.scl | 4
tests/input/sample_container.scl | 26
tests/input/var_decl_1.scl | 1
tests/input/var_decl_2.scl | 1
tests/input/var_decl_3.scl | 4
tests/input/var_decl_4.scl | 1
tests/input/var_decl_5.scl | 1
tests/input/var_decl_6.scl | 1
tests/input/var_decl_7.scl | 1
tests/mouline.sh | 116 +++-
tests/parser/class_decl_1.ref | 1
tests/parser/class_decl_2.ref | 1
tests/parser/class_decl_3.ref | 1
tests/parser/class_decl_inh.ref | 1
tests/parser/class_decl_inh_abst.ref | 1
tests/parser/class_decl_inh_fin.ref | 1
tests/parser/class_members_1.ref | 1
tests/parser/class_predecl.ref | 1
tests/parser/class_predecl_inh.ref | 1
tests/parser/class_template_1.ref | 1
tests/parser/class_template_2.ref | 1
tests/parser/command | 2
tests/parser/cons_decl_1.ref | 1
tests/parser/cons_decl_2.ref | 1
tests/parser/function_call_1.ref | 1
tests/parser/function_call_2.ref | 1
tests/parser/function_call_3.ref | 1
tests/parser/function_decl_1.ref | 1
tests/parser/function_decl_10.ref | 1
tests/parser/function_decl_2.ref | 1
tests/parser/function_decl_3.ref | 1
tests/parser/function_decl_4.ref | 1
tests/parser/function_decl_5.ref | 1
tests/parser/function_decl_6.ref | 1
tests/parser/function_decl_7.ref | 1
tests/parser/function_decl_8.ref | 1
tests/parser/function_decl_9.ref | 1
tests/parser/function_ftype_1.ref | 1
tests/parser/function_ftype_2.ref | 1
tests/parser/function_return_1.ref | 1
tests/parser/function_return_2.ref | 1
tests/parser/function_return_3.ref | 1
tests/parser/sample_1.ref | 1
tests/parser/sample_2.ref | 1
tests/parser/sample_3.ref | 1
tests/parser/sample_4.ref | 1
tests/parser/var_decl_1.ref | 1
tests/parser/var_decl_2.ref | 1
tests/parser/var_decl_3.ref | 1
tests/parser/var_decl_4.ref | 1
tests/parser/var_decl_5.ref | 1
tests/parser/var_decl_6.ref | 1
tests/transformer/class_decl_1.ref | 11
tests/transformer/class_decl_2.ref | 20
tests/transformer/class_decl_3.ref | 20
tests/transformer/class_decl_abst.ref | 1
tests/transformer/class_decl_inh.ref | 19
tests/transformer/class_decl_inh_abst.ref | 17
tests/transformer/class_decl_inh_fin.ref | 26
tests/transformer/class_members_1.ref | 13
tests/transformer/class_predecl.ref | 5
tests/transformer/class_predecl_inh.ref | 4
tests/transformer/class_template_1.ref | 7
tests/transformer/class_template_2.ref | 7
tests/transformer/command | 85 +++
tests/transformer/cons_decl_1.ref | 4
tests/transformer/cons_decl_2.ref | 4
tests/transformer/empty.ref | 2
tests/transformer/function_decl_1.ref | 6
tests/transformer/function_decl_10.ref | 7
tests/transformer/function_decl_3.ref | 4
tests/transformer/function_decl_4.ref | 6
tests/transformer/function_decl_5.ref | 6
tests/transformer/function_decl_6.ref | 7
tests/transformer/function_decl_7.ref | 8
tests/transformer/function_decl_8.ref | 8
tests/transformer/function_decl_9.ref | 8
tests/transformer/function_return_1.ref | 7
tests/transformer/function_return_2.ref | 7
tests/transformer/function_return_3.ref | 7
tests/transformer/sample_1.ref | 10
tests/transformer/sample_3.ref | 11
tests/transformer/sample_4.ref | 7
tests/transformer/var_decl_1.ref | 4
tests/transformer/var_decl_2.ref | 4
tests/transformer/var_decl_3.ref | 6
tests/transformer/var_decl_5.ref | 4
tests/transformer/var_decl_6.ref | 4
168 files changed, 2573 insertions(+), 87 deletions(-)
Index: trunk/Makefile (deleted)
===================================================================
Index: trunk/tests/input/class_members_1.scl
===================================================================
--- trunk/tests/input/class_members_1.scl (revision 0)
+++ trunk/tests/input/class_members_1.scl (revision 49)
@@ -0,0 +1,6 @@
+final Student : class =
+{
+ public {
+ var money : int;
+ }
+};
Index: trunk/tests/input/class_predecl_inh.scl
===================================================================
--- trunk/tests/input/class_predecl_inh.scl (revision 0)
+++ trunk/tests/input/class_predecl_inh.scl (revision 49)
@@ -0,0 +1 @@
+Foo : class < Bar;
Index: trunk/tests/input/sample_1.scl
===================================================================
--- trunk/tests/input/sample_1.scl (revision 0)
+++ trunk/tests/input/sample_1.scl (revision 49)
@@ -0,0 +1,9 @@
+
+f : () -> void =
+{
+ i : int16 = 3;
+ i := 4;
+
+ var j : int16 := 3;
+ j := 4;
+}
Index: trunk/tests/input/sample_2.scl
===================================================================
--- trunk/tests/input/sample_2.scl (revision 0)
+++ trunk/tests/input/sample_2.scl (revision 49)
@@ -0,0 +1,5 @@
+f : () -> void =
+{
+ var a : array[int16, 2];
+ var i : int16 := a.at(0);
+}
Index: trunk/tests/input/class_decl_inh_abst.scl
===================================================================
--- trunk/tests/input/class_decl_inh_abst.scl (revision 0)
+++ trunk/tests/input/class_decl_inh_abst.scl (revision 49)
@@ -0,0 +1,9 @@
+abstract Animal: class =
+{
+
+};
+
+Mammal : class < Animal =
+{
+
+};
Index: trunk/tests/input/class_predecl.scl
===================================================================
--- trunk/tests/input/class_predecl.scl (revision 0)
+++ trunk/tests/input/class_predecl.scl (revision 49)
@@ -0,0 +1 @@
+Foo : class;
Index: trunk/tests/input/sample_3.scl
===================================================================
--- trunk/tests/input/sample_3.scl (revision 0)
+++ trunk/tests/input/sample_3.scl (revision 49)
@@ -0,0 +1,9 @@
+f : () -> void =
+{
+ var i : int;
+ var j : int;
+
+ i := 0;
+ j := i;
+ i := j + i;
+}
Index: trunk/tests/input/function_return_1.scl
===================================================================
--- trunk/tests/input/function_return_1.scl (revision 0)
+++ trunk/tests/input/function_return_1.scl (revision 49)
@@ -0,0 +1,4 @@
+answer : () -> int =
+{
+ -> 42;
+}
Index: trunk/tests/input/sample_4.scl
===================================================================
--- trunk/tests/input/sample_4.scl (revision 0)
+++ trunk/tests/input/sample_4.scl (revision 49)
@@ -0,0 +1,4 @@
+sqrt : (arg : float) -> float =
+{
+ -> |[ std::sqrt(arg) ]|;
+}
Index: trunk/tests/input/function_return_2.scl
===================================================================
--- trunk/tests/input/function_return_2.scl (revision 0)
+++ trunk/tests/input/function_return_2.scl (revision 49)
@@ -0,0 +1,4 @@
+answer : (a : int, b : bool) -> int =
+{
+ -> 42;
+}
Index: trunk/tests/input/function_return_3.scl
===================================================================
--- trunk/tests/input/function_return_3.scl (revision 0)
+++ trunk/tests/input/function_return_3.scl (revision 49)
@@ -0,0 +1 @@
+answer : () -> int => 42;
Index: trunk/tests/input/cons_decl_1.scl
===================================================================
--- trunk/tests/input/cons_decl_1.scl (revision 0)
+++ trunk/tests/input/cons_decl_1.scl (revision 49)
@@ -0,0 +1 @@
+i : int;
Index: trunk/tests/input/cons_decl_2.scl
===================================================================
--- trunk/tests/input/cons_decl_2.scl (revision 0)
+++ trunk/tests/input/cons_decl_2.scl (revision 49)
@@ -0,0 +1 @@
+i : int = 3;
Index: trunk/tests/input/class_decl_1.scl
===================================================================
--- trunk/tests/input/class_decl_1.scl (revision 0)
+++ trunk/tests/input/class_decl_1.scl (revision 49)
@@ -0,0 +1 @@
+Foo: class = {};
Index: trunk/tests/input/class_decl_2.scl
===================================================================
--- trunk/tests/input/class_decl_2.scl (revision 0)
+++ trunk/tests/input/class_decl_2.scl (revision 49)
@@ -0,0 +1,15 @@
+point : class =
+{
+ public
+ {
+ x : () -> int =
+ {
+ -> x;
+ }
+ }
+ private
+ {
+ var x :int;
+ var y :int;
+ }
+};
Index: trunk/tests/input/class_decl_3.scl
===================================================================
--- trunk/tests/input/class_decl_3.scl (revision 0)
+++ trunk/tests/input/class_decl_3.scl (revision 49)
@@ -0,0 +1,12 @@
+point : class =
+{
+ public
+ {
+ x : () -> int => x;
+ }
+ private
+ {
+ var x :int;
+ var y :int;
+ }
+};
Index: trunk/tests/input/class_template_1.scl
===================================================================
--- trunk/tests/input/class_template_1.scl (revision 0)
+++ trunk/tests/input/class_template_1.scl (revision 49)
@@ -0,0 +1,3 @@
+A : [T : type] -> class =
+{
+}
Index: trunk/tests/input/class_template_2.scl
===================================================================
--- trunk/tests/input/class_template_2.scl (revision 0)
+++ trunk/tests/input/class_template_2.scl (revision 49)
@@ -0,0 +1,3 @@
+A : [T : type, B : bool] -> class =
+{
+}
Index: trunk/tests/input/class_decl_inh.scl
===================================================================
--- trunk/tests/input/class_decl_inh.scl (revision 0)
+++ trunk/tests/input/class_decl_inh.scl (revision 49)
@@ -0,0 +1,9 @@
+Bar: class =
+{
+
+};
+
+Foo : class < Bar =
+{
+
+};
Index: trunk/tests/input/function_decl_1.scl
===================================================================
--- trunk/tests/input/function_decl_1.scl (revision 0)
+++ trunk/tests/input/function_decl_1.scl (revision 49)
@@ -0,0 +1,2 @@
+f : (a: int, b : int) -> bool =
+{}
Index: trunk/tests/input/function_decl_2.scl
===================================================================
--- trunk/tests/input/function_decl_2.scl (revision 0)
+++ trunk/tests/input/function_decl_2.scl (revision 49)
@@ -0,0 +1 @@
+f : [i : int where i > 0]() -> int = {}
Index: trunk/tests/input/function_decl_3.scl
===================================================================
--- trunk/tests/input/function_decl_3.scl (revision 0)
+++ trunk/tests/input/function_decl_3.scl (revision 49)
@@ -0,0 +1 @@
+decl foo : () -> void;
Index: trunk/tests/input/function_decl_4.scl
===================================================================
--- trunk/tests/input/function_decl_4.scl (revision 0)
+++ trunk/tests/input/function_decl_4.scl (revision 49)
@@ -0,0 +1,3 @@
+decl foo : () -> void;
+decl foo : (arg1 : int) -> float;
+decl foo : (arg1 : toto, arg2 : ref double) -> char;
Index: trunk/tests/input/var_decl_1.scl
===================================================================
--- trunk/tests/input/var_decl_1.scl (revision 0)
+++ trunk/tests/input/var_decl_1.scl (revision 49)
@@ -0,0 +1 @@
+var i : int;
Index: trunk/tests/input/function_decl_5.scl
===================================================================
--- trunk/tests/input/function_decl_5.scl (revision 0)
+++ trunk/tests/input/function_decl_5.scl (revision 49)
@@ -0,0 +1,2 @@
+f : (a: int, b: ref int) -> bool =
+{}
Index: trunk/tests/input/function_call_1.scl
===================================================================
--- trunk/tests/input/function_call_1.scl (revision 0)
+++ trunk/tests/input/function_call_1.scl (revision 49)
@@ -0,0 +1,4 @@
+doit : () -> int =
+{
+ -> foo();
+}
\ No newline at end of file
Index: trunk/tests/input/var_decl_2.scl
===================================================================
--- trunk/tests/input/var_decl_2.scl (revision 0)
+++ trunk/tests/input/var_decl_2.scl (revision 49)
@@ -0,0 +1 @@
+var i : int := 42;
Index: trunk/tests/input/function_decl_6.scl
===================================================================
--- trunk/tests/input/function_decl_6.scl (revision 0)
+++ trunk/tests/input/function_decl_6.scl (revision 49)
@@ -0,0 +1,3 @@
+f : [T : type] () -> void =
+{
+}
Index: trunk/tests/input/function_call_2.scl
===================================================================
--- trunk/tests/input/function_call_2.scl (revision 0)
+++ trunk/tests/input/function_call_2.scl (revision 49)
@@ -0,0 +1,4 @@
+doit : () -> int =
+{
+ -> foo("bar", "baz");
+}
\ No newline at end of file
Index: trunk/tests/input/var_decl_3.scl
===================================================================
--- trunk/tests/input/var_decl_3.scl (revision 0)
+++ trunk/tests/input/var_decl_3.scl (revision 49)
@@ -0,0 +1,4 @@
+answer : int = 42;
+
+var i : int;
+var j : int := i;
Index: trunk/tests/input/function_decl_7.scl
===================================================================
--- trunk/tests/input/function_decl_7.scl (revision 0)
+++ trunk/tests/input/function_decl_7.scl (revision 49)
@@ -0,0 +1,4 @@
+f : [T : type] (a : int) -> void =
+{
+ -> 42;
+}
Index: trunk/tests/input/function_call_3.scl
===================================================================
--- trunk/tests/input/function_call_3.scl (revision 0)
+++ trunk/tests/input/function_call_3.scl (revision 49)
@@ -0,0 +1 @@
+i : int = pow[4](3);
Index: trunk/tests/input/var_decl_4.scl
===================================================================
--- trunk/tests/input/var_decl_4.scl (revision 0)
+++ trunk/tests/input/var_decl_4.scl (revision 49)
@@ -0,0 +1 @@
+var l : list[int];
Index: trunk/tests/input/function_decl_8.scl
===================================================================
--- trunk/tests/input/function_decl_8.scl (revision 0)
+++ trunk/tests/input/function_decl_8.scl (revision 49)
@@ -0,0 +1 @@
+f : [T : type] (a : int) -> void => 42;
Index: trunk/tests/input/var_decl_5.scl
===================================================================
--- trunk/tests/input/var_decl_5.scl (revision 0)
+++ trunk/tests/input/var_decl_5.scl (revision 49)
@@ -0,0 +1 @@
+var a : array[int, 42];
Index: trunk/tests/input/function_decl_9.scl
===================================================================
--- trunk/tests/input/function_decl_9.scl (revision 0)
+++ trunk/tests/input/function_decl_9.scl (revision 49)
@@ -0,0 +1 @@
+f : [T : type] (a : T) -> T => a + 42;
Index: trunk/tests/input/var_decl_6.scl
===================================================================
--- trunk/tests/input/var_decl_6.scl (revision 0)
+++ trunk/tests/input/var_decl_6.scl (revision 49)
@@ -0,0 +1 @@
+var a : buffer[int];
Index: trunk/tests/input/var_decl_7.scl
===================================================================
--- trunk/tests/input/var_decl_7.scl (revision 0)
+++ trunk/tests/input/var_decl_7.scl (revision 49)
@@ -0,0 +1 @@
+var a : test[int];
Index: trunk/tests/input/function_decl_10.scl
===================================================================
--- trunk/tests/input/function_decl_10.scl (revision 0)
+++ trunk/tests/input/function_decl_10.scl (revision 49)
@@ -0,0 +1 @@
+f : (a : int, b : double) -> double => a + b;
Index: trunk/tests/input/function_ftype_1.scl
===================================================================
--- trunk/tests/input/function_ftype_1.scl (revision 0)
+++ trunk/tests/input/function_ftype_1.scl (revision 49)
@@ -0,0 +1 @@
+var f : () -> void;
Index: trunk/tests/input/function_ftype_2.scl
===================================================================
--- trunk/tests/input/function_ftype_2.scl (revision 0)
+++ trunk/tests/input/function_ftype_2.scl (revision 49)
@@ -0,0 +1 @@
+var f : (int, bool) -> float;
Index: trunk/tests/input/sample_container.scl
===================================================================
--- trunk/tests/input/sample_container.scl (revision 0)
+++ trunk/tests/input/sample_container.scl (revision 49)
@@ -0,0 +1,26 @@
+// Container
+
+Container : class =
+{
+ public {
+ value_type : type;
+
+ iterator : type;
+ const_iterator : type;
+
+ reference : type;
+ const_reference : type;
+
+ size_type : type;
+
+ decl begin : () -> iterator;
+ decl begin : const () -> const_iterator;
+
+ decl end : () -> iterator;
+ decl end : const () -> const_iterator;
+
+ decl size : const () -> size_type;
+ decl empty : const () -> bool;
+ }
+};
+
Index: trunk/tests/input/class_decl_inh_fin.scl
===================================================================
--- trunk/tests/input/class_decl_inh_fin.scl (revision 0)
+++ trunk/tests/input/class_decl_inh_fin.scl (revision 49)
@@ -0,0 +1,14 @@
+Animal: class =
+{
+
+};
+
+Mammal : class < Animal =
+{
+
+};
+
+final Monkey : class < Mammal =
+{
+
+};
Index: trunk/tests/mouline.sh
===================================================================
--- trunk/tests/mouline.sh (revision 48)
+++ trunk/tests/mouline.sh (revision 49)
@@ -1,7 +1,4 @@
-function align
-{
- echo -e -n "\033[$1G"
-}
+#!/bin/sh
red="\033[33;00;31m"
bred="\033[33;01;31m"
@@ -12,31 +9,106 @@
blue="\033[33;00;34m"
bblue="\033[33;01;34m"
-alias echo="echo -e"
+print_diff=0
+gen_ref=0
+
+align ()
+{
+ echo -e -n "\033[$1G"
+}
-for dir in `dirname $0`/*; do
- if [ -d "$dir" ] && ! [ "x"`basename $dir` = "xinput" ]; then
+prolog()
+{
align 2
- echo $bblue`basename $dir`
- for test in $dir/*.ref; do
- name=${test%.ref}
- name=${name#$dir/}
+ echo -e ${bblue}`basename ${1}`/
+}
+
+perform_test()
+{
+ test_name=`basename $1 .scl`
+ input=$1
+ ref=$2/${test_name}.ref
+ cmd=$2/command
+
align 6
- echo -n $yell$name
- align 26
- if [ "x$1" = "x--gen" ]; then
- `cat $dir/command` -i input/$name.scl > $test
- echo
+ echo -e -n ${yell}${test_name}
+ align 36
+
+ if [ $gen_ref -eq 1 ]; then
+ $cmd $input > $ref
+ else
+ if [ -r $ref ]; then
+ cmd_log=`$cmd $input 2> /dev/null`
+ diff_log=`printf "%s\n" "$cmd_log" | diff -u $ref -`
+ if [ "$diff_log" = "" ]; then
+ echo -e "$bblue[$bgreen ok $bblue]"
else
- if `dirname $0`/`cat $dir/command` -i `dirname $0`/input/$name.scl | diff - $test > /dev/null 2> /dev/null; then
- echo "$bblue[$bgreen ok $bblue]"
+ echo -e "$bblue[$bred ko $bblue]"
+ if [ $print_diff -eq 1 ]; then
+ echo -e -n $red
+ echo "$diff_log"
+ echo -e
+ fi
+ fi
else
- echo "$bblue[$bred ko $bblue]"
- echo -n $red
- `dirname $0`/`cat $dir/command` -i `dirname $0`/input/$name.scl | diff - $test
- echo
+ echo -e "$bblue[$byell sk $bblue]"
+ echo -e -n $red
fi
fi
+}
+
+# Parse command line options
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -d | --diff)
+ print_diff=1
+ ;;
+
+ -g | --gen)
+ gen_ref=1
+ ;;
+
+ -*)
+ echo Unknown option : $1
+ exit 1
+ ;;
+
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+# If files are given on the command line, only check those tests
+cmd_line=0
+while [ $# -gt 0 ]
+do
+ cmd_line=1
+ prolog "$1"
+
+ for dir in `dirname $0`/*
+ do
+ align 4
+ if [ -d "$dir" ] && ! [ "`basename $dir`" = "input" ]; then
+ echo -e ${red}`basename ${dir}`/
+ perform_test "$1" "$dir"
+ fi
+ done
+ shift
+done
+
+if [ $cmd_line -eq 1 ]; then
+ exit 0
+fi
+
+for dir in `dirname $0`/*
+do
+ if [ -d "$dir" ] && ! [ "`basename $dir`" = "input" ]; then
+ prolog "$dir"
+ for input in `dirname $0`/input/*.scl; do
+ perform_test "$input" "$dir"
done
fi
done
Index: trunk/tests/transformer/sample_4.ref
===================================================================
--- trunk/tests/transformer/sample_4.ref (revision 0)
+++ trunk/tests/transformer/sample_4.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+float sqrt(float arg)
+{
+ return std::sqrt(arg);
+}
Index: trunk/tests/transformer/function_return_1.ref
===================================================================
--- trunk/tests/transformer/function_return_1.ref (revision 0)
+++ trunk/tests/transformer/function_return_1.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int answer()
+{
+ return 42;
+}
Index: trunk/tests/transformer/function_return_2.ref
===================================================================
--- trunk/tests/transformer/function_return_2.ref (revision 0)
+++ trunk/tests/transformer/function_return_2.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int answer(int a, bool b)
+{
+ return 42;
+}
Index: trunk/tests/transformer/class_decl_abst.ref
===================================================================
--- trunk/tests/transformer/class_decl_abst.ref (revision 0)
+++ trunk/tests/transformer/class_decl_abst.ref (revision 49)
@@ -0,0 +1 @@
+
Index: trunk/tests/transformer/function_return_3.ref
===================================================================
--- trunk/tests/transformer/function_return_3.ref (revision 0)
+++ trunk/tests/transformer/function_return_3.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int answer()
+{
+ return 42;
+}
Index: trunk/tests/transformer/cons_decl_1.ref
===================================================================
--- trunk/tests/transformer/cons_decl_1.ref (revision 0)
+++ trunk/tests/transformer/cons_decl_1.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+const int i;
Index: trunk/tests/transformer/cons_decl_2.ref
===================================================================
--- trunk/tests/transformer/cons_decl_2.ref (revision 0)
+++ trunk/tests/transformer/cons_decl_2.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+const int i = 3;
Index: trunk/tests/transformer/class_decl_1.ref
===================================================================
--- trunk/tests/transformer/class_decl_1.ref (revision 0)
+++ trunk/tests/transformer/class_decl_1.ref (revision 49)
@@ -0,0 +1,11 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Foo
+
+template < typename T >
+class Foo_: public stc::any<stc_find_exact(Foo_, T)>
+{
+};
+
+typedef Foo_<stc::itself> Foo;
Index: trunk/tests/transformer/class_decl_2.ref
===================================================================
--- trunk/tests/transformer/class_decl_2.ref (revision 0)
+++ trunk/tests/transformer/class_decl_2.ref (revision 49)
@@ -0,0 +1,20 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class point
+
+template < typename T >
+class point_: public stc::any<stc_find_exact(point_, T)>
+{
+ public:
+ int x()
+ {
+ return x;
+ }
+
+ private:
+ int x;
+ int y;
+};
+
+typedef point_<stc::itself> point;
Index: trunk/tests/transformer/class_decl_3.ref
===================================================================
--- trunk/tests/transformer/class_decl_3.ref (revision 0)
+++ trunk/tests/transformer/class_decl_3.ref (revision 49)
@@ -0,0 +1,20 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class point
+
+template < typename T >
+class point_: public stc::any<stc_find_exact(point_, T)>
+{
+ public:
+ int x()
+ {
+ return x;
+ }
+
+ private:
+ int x;
+ int y;
+};
+
+typedef point_<stc::itself> point;
Index: trunk/tests/transformer/class_template_1.ref
===================================================================
--- trunk/tests/transformer/class_template_1.ref (revision 0)
+++ trunk/tests/transformer/class_template_1.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+class A
+{
+};
Index: trunk/tests/transformer/class_template_2.ref
===================================================================
--- trunk/tests/transformer/class_template_2.ref (revision 0)
+++ trunk/tests/transformer/class_template_2.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T, bool B >
+class A
+{
+};
Index: trunk/tests/transformer/class_decl_inh.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh.ref (revision 0)
+++ trunk/tests/transformer/class_decl_inh.ref (revision 49)
@@ -0,0 +1,19 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Bar
+
+template < typename T >
+class Bar_: public stc::any<stc_find_exact(Bar_, T)>
+{
+};
+
+typedef Bar_<stc::itself> Bar;
+// Class Foo
+
+template < typename T >
+class Foo_: public Bar_<stc_find_exact(Foo_, T)>
+{
+};
+
+typedef Foo_<stc::itself> Foo;
Index: trunk/tests/transformer/function_decl_1.ref
===================================================================
--- trunk/tests/transformer/function_decl_1.ref (revision 0)
+++ trunk/tests/transformer/function_decl_1.ref (revision 49)
@@ -0,0 +1,6 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+bool f(int a, int b)
+{
+}
Index: trunk/tests/transformer/function_decl_3.ref
===================================================================
--- trunk/tests/transformer/function_decl_3.ref (revision 0)
+++ trunk/tests/transformer/function_decl_3.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+void foo();
Index: trunk/tests/transformer/empty.ref
===================================================================
--- trunk/tests/transformer/empty.ref (revision 0)
+++ trunk/tests/transformer/empty.ref (revision 49)
@@ -0,0 +1,2 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
Index: trunk/tests/transformer/var_decl_1.ref
===================================================================
--- trunk/tests/transformer/var_decl_1.ref (revision 0)
+++ trunk/tests/transformer/var_decl_1.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int i;
Index: trunk/tests/transformer/function_decl_4.ref
===================================================================
--- trunk/tests/transformer/function_decl_4.ref (revision 0)
+++ trunk/tests/transformer/function_decl_4.ref (revision 49)
@@ -0,0 +1,6 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+void foo();
+float foo(int arg1);
+char foo(const toto& arg1, double& arg2);
Index: trunk/tests/transformer/function_decl_5.ref
===================================================================
--- trunk/tests/transformer/function_decl_5.ref (revision 0)
+++ trunk/tests/transformer/function_decl_5.ref (revision 49)
@@ -0,0 +1,6 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+bool f(int a, int& b)
+{
+}
Index: trunk/tests/transformer/var_decl_2.ref
===================================================================
--- trunk/tests/transformer/var_decl_2.ref (revision 0)
+++ trunk/tests/transformer/var_decl_2.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int i = 42;
Index: trunk/tests/transformer/function_decl_6.ref
===================================================================
--- trunk/tests/transformer/function_decl_6.ref (revision 0)
+++ trunk/tests/transformer/function_decl_6.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+void f()
+{
+}
Index: trunk/tests/transformer/var_decl_3.ref
===================================================================
--- trunk/tests/transformer/var_decl_3.ref (revision 0)
+++ trunk/tests/transformer/var_decl_3.ref (revision 49)
@@ -0,0 +1,6 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+const int answer = 42;
+int i;
+int j = i;
Index: trunk/tests/transformer/function_decl_7.ref
===================================================================
--- trunk/tests/transformer/function_decl_7.ref (revision 0)
+++ trunk/tests/transformer/function_decl_7.ref (revision 49)
@@ -0,0 +1,8 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+void f(int a)
+{
+ return 42;
+}
Index: trunk/tests/transformer/function_decl_8.ref
===================================================================
--- trunk/tests/transformer/function_decl_8.ref (revision 0)
+++ trunk/tests/transformer/function_decl_8.ref (revision 49)
@@ -0,0 +1,8 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+void f(int a)
+{
+ return 42;
+}
Index: trunk/tests/transformer/command
===================================================================
--- trunk/tests/transformer/command (revision 0)
+++ trunk/tests/transformer/command (revision 49)
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+red="\033[33;00;31m"
+bred="\033[33;01;31m"
+green="\033[33;00;32m"
+bgreen="\033[33;01;32m"
+yell="\033[33;00;33m"
+byell="\033[33;01;33m"
+blue="\033[33;00;34m"
+bblue="\033[33;01;34m"
+
+step=0
+verb=0
+printsrc=0
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -s | --step)
+ step=1
+ ;;
+
+ -v | --verbose)
+ verb=1
+ ;;
+
+ -p | --print)
+ printsrc=1
+ ;;
+
+ -*)
+ echo Unknown option : $1
+ exit 1
+ ;;
+
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+base="`dirname $0`/../../src/"
+parser="$base/parse-scool/parse-scool $1"
+transformer="$base/scoolt/scoolt"
+printer="$base/pp-cxx/pp-cxx"
+cxxprinter="abox2text"
+
+if [ $printsrc -eq 1 ]; then
+ echo "----[ cat $1 ]----"
+ cat $1
+ echo
+fi
+
+if [ $step -eq 1 ]
+then
+ echo '----[' $parser ']----'
+ tmp=`$parser`
+ if [ $? -ne 0 ]; then exit $?; fi
+ printf "%s\n" "$tmp" | pp-aterm
+ echo
+
+ echo '----[' $transformer ']----'
+ tmp=`printf "%s\n" "$tmp" | $transformer`
+ if [ $? -ne 0 ]; then exit $?; fi
+ printf "%s\n" "$tmp" | pp-aterm
+ echo
+
+ echo '----[' $printer ']----'
+ tmp=`printf "%s\n" "$tmp" | $printer`
+ if [ $? -ne 0 ]; then exit $?; fi
+ printf "%s\n" "$tmp"
+ echo
+
+ echo '---[' $cxxprinter ']----'
+ tmp=`printf "%s\n" "$tmp" | $cxxprinter`
+ if [ $? -ne 0 ]; then exit $?; fi
+ printf "%s\n" "$tmp"
+ echo
+else
+ if [ $verb -eq 1 ]; then
+ printf "%s\n" "`$parser | $transformer | $printer | $cxxprinter`"
+ else
+ printf "%s\n" "`$parser 2> err-log | $transformer 2>> err-log | $printer 2>> err-log | $cxxprinter 2>> err-log`"
+ fi
+fi
Property changes on: trunk/tests/transformer/command
___________________________________________________________________
Name: svn:executable
+ *
Index: trunk/tests/transformer/var_decl_5.ref
===================================================================
--- trunk/tests/transformer/var_decl_5.ref (revision 0)
+++ trunk/tests/transformer/var_decl_5.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int a[42];
Index: trunk/tests/transformer/function_decl_9.ref
===================================================================
--- trunk/tests/transformer/function_decl_9.ref (revision 0)
+++ trunk/tests/transformer/function_decl_9.ref (revision 49)
@@ -0,0 +1,8 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+T f(const T& a)
+{
+ return a + 42;
+}
Index: trunk/tests/transformer/var_decl_6.ref
===================================================================
--- trunk/tests/transformer/var_decl_6.ref (revision 0)
+++ trunk/tests/transformer/var_decl_6.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+std::vector<int> a;
Index: trunk/tests/transformer/function_decl_10.ref
===================================================================
--- trunk/tests/transformer/function_decl_10.ref (revision 0)
+++ trunk/tests/transformer/function_decl_10.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+double f(int a, double b)
+{
+ return a + b;
+}
Index: trunk/tests/transformer/class_decl_inh_fin.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh_fin.ref (revision 0)
+++ trunk/tests/transformer/class_decl_inh_fin.ref (revision 49)
@@ -0,0 +1,26 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Animal
+
+template < typename T >
+class Animal_: public stc::any<stc_find_exact(Animal_, T)>
+{
+};
+
+typedef Animal_<stc::itself> Animal;
+// Class Mammal
+
+template < typename T >
+class Mammal_: public Animal_<stc_find_exact(Mammal_, T)>
+{
+};
+
+typedef Mammal_<stc::itself> Mammal;
+// Class Monkey
+
+class Monkey: public Mammal_<Monkey>
+{
+};
+
+typedef Monkey_<stc::itself> Monkey;
Index: trunk/tests/transformer/class_members_1.ref
===================================================================
--- trunk/tests/transformer/class_members_1.ref (revision 0)
+++ trunk/tests/transformer/class_members_1.ref (revision 49)
@@ -0,0 +1,13 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Student
+
+template < typename T >
+class Student_: public stc::any<stc_find_exact(Student_, T)>
+{
+ public:
+ int money;
+};
+
+typedef Student_<stc::itself> Student;
Index: trunk/tests/transformer/sample_1.ref
===================================================================
--- trunk/tests/transformer/sample_1.ref (revision 0)
+++ trunk/tests/transformer/sample_1.ref (revision 49)
@@ -0,0 +1,10 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+void f()
+{
+ const int16 i = 3;
+ i = 4;
+ int16 j = 3;
+ j = 4;
+}
Index: trunk/tests/transformer/class_predecl_inh.ref
===================================================================
--- trunk/tests/transformer/class_predecl_inh.ref (revision 0)
+++ trunk/tests/transformer/class_predecl_inh.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+class Foo: public Bar;
Index: trunk/tests/transformer/sample_3.ref
===================================================================
--- trunk/tests/transformer/sample_3.ref (revision 0)
+++ trunk/tests/transformer/sample_3.ref (revision 49)
@@ -0,0 +1,11 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+void f()
+{
+ int i;
+ int j;
+ i = 0;
+ j = i;
+ i = j + i;
+}
Index: trunk/tests/transformer/class_decl_inh_abst.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh_abst.ref (revision 0)
+++ trunk/tests/transformer/class_decl_inh_abst.ref (revision 49)
@@ -0,0 +1,17 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Animal
+
+template < typename T >
+class Animal_: public stc::any<stc_find_exact(Animal_, T)>
+{
+};
+// Class Mammal
+
+template < typename T >
+class Mammal_: public Animal_<stc_find_exact(Mammal_, T)>
+{
+};
+
+typedef Mammal_<stc::itself> Mammal;
Index: trunk/tests/transformer/class_predecl.ref
===================================================================
--- trunk/tests/transformer/class_predecl.ref (revision 0)
+++ trunk/tests/transformer/class_predecl.ref (revision 49)
@@ -0,0 +1,5 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < typename T >
+class Foo_;
Index: trunk/tests/parser/function_return_1.ref
===================================================================
--- trunk/tests/parser/function_return_1.ref (revision 0)
+++ trunk/tests/parser/function_return_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"answer",[],Var("int"),[Return(Int("42"))])])
Index: trunk/tests/parser/sample_4.ref
===================================================================
--- trunk/tests/parser/sample_4.ref (revision 0)
+++ trunk/tests/parser/sample_4.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"sqrt",[("arg",Var("float"))],Var("float"),[Return(Cxx("std::sqrt(arg)"))])])
Index: trunk/tests/parser/function_return_2.ref
===================================================================
--- trunk/tests/parser/function_return_2.ref (revision 0)
+++ trunk/tests/parser/function_return_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"answer",[("a",Var("int")),("b",Var("bool"))],Var("int"),[Return(Int("42"))])])
Index: trunk/tests/parser/function_return_3.ref
===================================================================
--- trunk/tests/parser/function_return_3.ref (revision 0)
+++ trunk/tests/parser/function_return_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"answer",[],Var("int"),ExpStm(Int("42")))])
Index: trunk/tests/parser/cons_decl_1.ref
===================================================================
--- trunk/tests/parser/cons_decl_1.ref (revision 0)
+++ trunk/tests/parser/cons_decl_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"i",None,Var("int"))])
Index: trunk/tests/parser/cons_decl_2.ref
===================================================================
--- trunk/tests/parser/cons_decl_2.ref (revision 0)
+++ trunk/tests/parser/cons_decl_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"i",Var("int"),Int("3"))])
Index: trunk/tests/parser/class_decl_1.ref
===================================================================
--- trunk/tests/parser/class_decl_1.ref (revision 0)
+++ trunk/tests/parser/class_decl_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Foo",Class,ClassVal([]))])
Index: trunk/tests/parser/class_decl_2.ref
===================================================================
--- trunk/tests/parser/class_decl_2.ref (revision 0)
+++ trunk/tests/parser/class_decl_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"point",Class,ClassVal([Accessblock(Public,[FunDec([],"x",[],Var("int"),[Return(Var("x"))])]),Accessblock(Private,[VarDec([],"x",Var("int")),VarDec([],"y",Var("int"))])]))])
Index: trunk/tests/parser/class_decl_3.ref
===================================================================
--- trunk/tests/parser/class_decl_3.ref (revision 0)
+++ trunk/tests/parser/class_decl_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"point",Class,ClassVal([Accessblock(Public,[FunDec([],"x",[],Var("int"),ExpStm(Var("x")))]),Accessblock(Private,[VarDec([],"x",Var("int")),VarDec([],"y",Var("int"))])]))])
Index: trunk/tests/parser/class_template_1.ref
===================================================================
--- trunk/tests/parser/class_template_1.ref (revision 0)
+++ trunk/tests/parser/class_template_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([StaticFunDec([],"A",[("T",Var("type"),None)],Class,[])])
Index: trunk/tests/parser/class_template_2.ref
===================================================================
--- trunk/tests/parser/class_template_2.ref (revision 0)
+++ trunk/tests/parser/class_template_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([StaticFunDec([],"A",[("T",Var("type"),None),("B",Var("bool"),None)],Class,[])])
Index: trunk/tests/parser/class_decl_inh.ref
===================================================================
--- trunk/tests/parser/class_decl_inh.ref (revision 0)
+++ trunk/tests/parser/class_decl_inh.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Bar",Class,ClassVal([])),ConstDec([],"Foo",Class(Var("Bar")),ClassVal([]))])
Index: trunk/tests/parser/function_decl_1.ref
===================================================================
--- trunk/tests/parser/function_decl_1.ref (revision 0)
+++ trunk/tests/parser/function_decl_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[("a",Var("int")),("b",Var("int"))],Var("bool"),[])])
Index: trunk/tests/parser/function_decl_2.ref
===================================================================
--- trunk/tests/parser/function_decl_2.ref (revision 0)
+++ trunk/tests/parser/function_decl_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("i",Var("int"),Some((Sup(Var("i"),Int("0")))))],[],Var("int"),[])])
Index: trunk/tests/parser/function_decl_3.ref
===================================================================
--- trunk/tests/parser/function_decl_3.ref (revision 0)
+++ trunk/tests/parser/function_decl_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec(["decl"],"foo",None,FunType([],Var("void")))])
Index: trunk/tests/parser/function_decl_4.ref
===================================================================
--- trunk/tests/parser/function_decl_4.ref (revision 0)
+++ trunk/tests/parser/function_decl_4.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec(["decl"],"foo",None,FunType([],Var("void"))),ConstDec(["decl"],"foo",None,FunType([FunArg("arg1",Var("int"))],Var("float"))),ConstDec(["decl"],"foo",None,FunType([FunArg("arg1",Var("toto")),FunArg("arg2",RefType(Var("double")))],Var("char")))])
Index: trunk/tests/parser/var_decl_1.ref
===================================================================
--- trunk/tests/parser/var_decl_1.ref (revision 0)
+++ trunk/tests/parser/var_decl_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"i",Var("int"))])
Index: trunk/tests/parser/function_decl_5.ref
===================================================================
--- trunk/tests/parser/function_decl_5.ref (revision 0)
+++ trunk/tests/parser/function_decl_5.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[("a",Var("int")),("b",RefType(Var("int")))],Var("bool"),[])])
Index: trunk/tests/parser/function_call_1.ref
===================================================================
--- trunk/tests/parser/function_call_1.ref (revision 0)
+++ trunk/tests/parser/function_call_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"doit",[],Var("int"),[Return(FunCall("foo",[]))])])
Index: trunk/tests/parser/var_decl_2.ref
===================================================================
--- trunk/tests/parser/var_decl_2.ref (revision 0)
+++ trunk/tests/parser/var_decl_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"i",Var("int"),Int("42"))])
Index: trunk/tests/parser/function_decl_6.ref
===================================================================
--- trunk/tests/parser/function_decl_6.ref (revision 0)
+++ trunk/tests/parser/function_decl_6.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("T",Var("type"),None)],[],Var("void"),[])])
Index: trunk/tests/parser/function_call_2.ref
===================================================================
--- trunk/tests/parser/function_call_2.ref (revision 0)
+++ trunk/tests/parser/function_call_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"doit",[],Var("int"),[Return(FunCall("foo",[String("\"bar\""),String("\"baz\"")]))])])
Index: trunk/tests/parser/var_decl_3.ref
===================================================================
--- trunk/tests/parser/var_decl_3.ref (revision 0)
+++ trunk/tests/parser/var_decl_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"answer",Var("int"),Int("42")),VarDec([],"i",Var("int")),VarDec([],"j",Var("int"),Var("i"))])
Index: trunk/tests/parser/function_decl_7.ref
===================================================================
--- trunk/tests/parser/function_decl_7.ref (revision 0)
+++ trunk/tests/parser/function_decl_7.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("T",Var("type"),None)],[("a",Var("int"))],Var("void"),[Return(Int("42"))])])
Index: trunk/tests/parser/function_call_3.ref
===================================================================
--- trunk/tests/parser/function_call_3.ref (revision 0)
+++ trunk/tests/parser/function_call_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"i",Var("int"),BiFunCall("pow",[Int("4")],[Int("3")]))])
Index: trunk/tests/parser/var_decl_4.ref
===================================================================
--- trunk/tests/parser/var_decl_4.ref (revision 0)
+++ trunk/tests/parser/var_decl_4.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"l",StaticFunCall("list",[Var("int")]))])
Index: trunk/tests/parser/command
===================================================================
--- trunk/tests/parser/command (revision 48)
+++ trunk/tests/parser/command (revision 49)
@@ -1 +1 @@
-../bin/parse-scool
\ No newline at end of file
+`dirname $0`/../../bin/parse-scool -i $1
Index: trunk/tests/parser/function_decl_8.ref
===================================================================
--- trunk/tests/parser/function_decl_8.ref (revision 0)
+++ trunk/tests/parser/function_decl_8.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("T",Var("type"),None)],[("a",Var("int"))],Var("void"),ExpStm(Int("42")))])
Index: trunk/tests/parser/var_decl_5.ref
===================================================================
--- trunk/tests/parser/var_decl_5.ref (revision 0)
+++ trunk/tests/parser/var_decl_5.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"a",StaticFunCall("array",[Var("int"),Int("42")]))])
Index: trunk/tests/parser/function_decl_9.ref
===================================================================
--- trunk/tests/parser/function_decl_9.ref (revision 0)
+++ trunk/tests/parser/function_decl_9.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("T",Var("type"),None)],[("a",Var("T"))],Var("T"),ExpStm(Sum(Var("a"),Int("42"))))])
Index: trunk/tests/parser/var_decl_6.ref
===================================================================
--- trunk/tests/parser/var_decl_6.ref (revision 0)
+++ trunk/tests/parser/var_decl_6.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"a",StaticFunCall("buffer",[Var("int")]))])
Index: trunk/tests/parser/function_decl_10.ref
===================================================================
--- trunk/tests/parser/function_decl_10.ref (revision 0)
+++ trunk/tests/parser/function_decl_10.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[("a",Var("int")),("b",Var("double"))],Var("double"),ExpStm(Sum(Var("a"),Var("b"))))])
Index: trunk/tests/parser/function_ftype_1.ref
===================================================================
--- trunk/tests/parser/function_ftype_1.ref (revision 0)
+++ trunk/tests/parser/function_ftype_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"f",FunType([],Var("void")))])
Index: trunk/tests/parser/function_ftype_2.ref
===================================================================
--- trunk/tests/parser/function_ftype_2.ref (revision 0)
+++ trunk/tests/parser/function_ftype_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"f",FunType([Var("int"),Var("bool")],Var("float")))])
Index: trunk/tests/parser/class_decl_inh_fin.ref
===================================================================
--- trunk/tests/parser/class_decl_inh_fin.ref (revision 0)
+++ trunk/tests/parser/class_decl_inh_fin.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Animal",Class,ClassVal([])),ConstDec([],"Mammal",Class(Var("Animal")),ClassVal([])),ConstDec(["final"],"Monkey",Class(Var("Mammal")),ClassVal([]))])
Index: trunk/tests/parser/class_members_1.ref
===================================================================
--- trunk/tests/parser/class_members_1.ref (revision 0)
+++ trunk/tests/parser/class_members_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec(["final"],"Student",Class,ClassVal([Accessblock(Public,[VarDec([],"money",Var("int"))])]))])
Index: trunk/tests/parser/class_predecl_inh.ref
===================================================================
--- trunk/tests/parser/class_predecl_inh.ref (revision 0)
+++ trunk/tests/parser/class_predecl_inh.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Foo",None,Class(Var("Bar")))])
Index: trunk/tests/parser/sample_1.ref
===================================================================
--- trunk/tests/parser/sample_1.ref (revision 0)
+++ trunk/tests/parser/sample_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[],Var("void"),[ConstDec([],"i",Var("int16"),Int("3")),ExpStm(Affect(Var("i"),Int("4"))),VarDec([],"j",Var("int16"),Int("3")),ExpStm(Affect(Var("j"),Int("4")))])])
Index: trunk/tests/parser/sample_2.ref
===================================================================
--- trunk/tests/parser/sample_2.ref (revision 0)
+++ trunk/tests/parser/sample_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[],Var("void"),[VarDec([],"a",StaticFunCall("array",[Var("int16"),Int("2")])),VarDec([],"i",Var("int16"),MethodCall("a","at",[Int("0")]))])])
Index: trunk/tests/parser/class_decl_inh_abst.ref
===================================================================
--- trunk/tests/parser/class_decl_inh_abst.ref (revision 0)
+++ trunk/tests/parser/class_decl_inh_abst.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec(["abstract"],"Animal",Class,ClassVal([])),ConstDec([],"Mammal",Class(Var("Animal")),ClassVal([]))])
Index: trunk/tests/parser/class_predecl.ref
===================================================================
--- trunk/tests/parser/class_predecl.ref (revision 0)
+++ trunk/tests/parser/class_predecl.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Foo",None,Class)])
Index: trunk/tests/parser/sample_3.ref
===================================================================
--- trunk/tests/parser/sample_3.ref (revision 0)
+++ trunk/tests/parser/sample_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[],Var("void"),[VarDec([],"i",Var("int")),VarDec([],"j",Var("int")),ExpStm(Affect(Var("i"),Int("0"))),ExpStm(Affect(Var("j"),Var("i"))),ExpStm(Affect(Var("i"),Sum(Var("j"),Var("i"))))])])
Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac (revision 0)
+++ trunk/configure.ac (revision 49)
@@ -0,0 +1,29 @@
+AC_PREREQ(2.59)
+
+AC_INIT([scool], 0.1, [yabo(a)lrde.epita.fr]
+
+# Auxiliary files
+AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_FILES(config/Makefile)
+
+AM_INIT_AUTOMAKE([1.9.5 dist-bzip2])
+
+XT_USE_XT_PACKAGES
+XT_PKG_ATERM
+XT_PKG_SDF
+XT_PKG_STRATEGOXT
+
+# Look for common programs
+AC_LANG_C
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+# Output Files
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ src/cxx-syn/Makefile
+ src/pp-cxx/Makefile
+ src/scl-syn/Makefile
+ src/scoolt/Makefile])
+AC_OUTPUT
Index: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS (revision 0)
+++ trunk/AUTHORS (revision 49)
@@ -0,0 +1,2 @@
+* mefyl <mefyl(a)lrde.epita.fr>
+* yabo <yabo(a)lrde.epita.fr>
Index: trunk/config/Makefile.am
===================================================================
--- trunk/config/Makefile.am (revision 0)
+++ trunk/config/Makefile.am (revision 49)
@@ -0,0 +1,15 @@
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(STANDARD_TOOLS)
+
+STANDARD_TOOLS = \
+ install-sh \
+ missing \
+ mkinstalldirs \
+ depcomp
+
+EXTRA_DIST = \
+ Makefile.xt \
+ autoxt.m4
+
+bootclean:
Index: trunk/src/pp-cxx/CxxProgram.meta
===================================================================
--- trunk/src/pp-cxx/CxxProgram.meta (revision 0)
+++ trunk/src/pp-cxx/CxxProgram.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxDecl.meta
===================================================================
--- trunk/src/pp-cxx/CxxDecl.meta (revision 0)
+++ trunk/src/pp-cxx/CxxDecl.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxFun.str
===================================================================
--- trunk/src/pp-cxx/CxxFun.str (revision 0)
+++ trunk/src/pp-cxx/CxxFun.str (revision 49)
@@ -0,0 +1,69 @@
+module CxxFun
+
+imports Cxx Box libstratego-lib CxxType CxxExp CxxStm CxxId
+
+rules
+
+ CxxTopLevelToAbox:
+ CxxFun(params, t, idf, args) ->
+ V vs=0
+ [
+ ~<CxxParamsToAbox> params
+ H hs=0
+ [
+ H hs=1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf ] "(" H hs=1 [ ~*<CxxListToAbox(CxxArgDefToAbox|",")> args ] ")" ";"
+ ]
+ ]
+
+ CxxTopLevelToAbox:
+ CxxFun(params, t, idf, args, body) ->
+ V vs=0
+ [
+ ~<CxxParamsToAbox> params
+ H hs=0 [
+ H hs=1 [ ~<CxxTypeToAbox>t ~<CxxIdToAbox>idf] "(" H hs=1 [ ~*<CxxListToAbox(CxxArgDefToAbox|",")> args ] ")"
+ ]
+ V vs=0 is=2
+ [
+ "{"
+ ~*<map(CxxStmToAbox <+ CxxTopLevelToAbox)>body
+ ]
+ "}"
+ ]
+
+ CxxTopLevelToAbox:
+ CxxTypedef(t, idf) ->
+ H hs=0 [ H hs=1 [ "typedef" ~<CxxTypeToAbox> t ~S(idf)] ";" ]
+
+ CxxArgDefToAbox:
+ (t, idf) ->
+ H hs = 1
+ [
+ ~<CxxTypeToAbox>t
+ ~<CxxIdToAbox>idf
+ ]
+
+ CxxListToAbox(sub|sep):
+ [e| [h|tail] ] ->
+ [
+ H hs=1 [
+ H hs=0 [
+ ~<sub>e
+ ~S(sep)
+ ]
+ ~<CxxListToAbox(sub|sep)> [h|tail]
+ ]
+ ]
+
+ CxxListToAbox(sub|sep):
+ [e| [] ] ->
+ [
+ H hs=0 [
+ ~<sub>e
+ ]
+ ]
+
+ CxxListToAbox(sub|sep):
+ [] ->
+ [ H [] ]
+
Index: trunk/src/pp-cxx/pp-cxx.str
===================================================================
--- trunk/src/pp-cxx/pp-cxx.str (revision 0)
+++ trunk/src/pp-cxx/pp-cxx.str (revision 49)
@@ -0,0 +1,6 @@
+module pp-cxx
+
+imports Cxx Box libstratego-lib CxxProgram
+
+strategies
+ pp-cxx = io-wrap(CxxProgramToAbox)
Index: trunk/src/pp-cxx/CxxId.str
===================================================================
--- trunk/src/pp-cxx/CxxId.str (revision 0)
+++ trunk/src/pp-cxx/CxxId.str (revision 49)
@@ -0,0 +1,12 @@
+module CxxId
+
+imports Cxx Box libstratego-lib
+
+rules
+
+ CxxIdToAbox:
+ x -> S(x)
+ where not(<?CxxScope(_, _)> x)
+
+ CxxIdToAbox:
+ CxxScope(idf1, idf2) -> H hs=0 [ ~<CxxIdToAbox>idf1 "::" ~<CxxIdToAbox>idf2 ]
Index: trunk/src/pp-cxx/CxxExp.str
===================================================================
--- trunk/src/pp-cxx/CxxExp.str (revision 0)
+++ trunk/src/pp-cxx/CxxExp.str (revision 49)
@@ -0,0 +1,31 @@
+module CxxExp
+
+imports Cxx Box libstratego-lib CxxId
+
+rules
+
+ CxxExpToAbox:
+ CxxInt(i) -> S(i)
+
+ CxxExpToStr:
+ CxxInt(i) -> i
+
+ CxxExpToStr:
+ CxxSum(e1, e2) -> <concat-strings> [<CxxExpToStr> e1, " + ", <CxxExpToStr> e2]
+
+ CxxExpToStr:
+ x -> x
+ where <is-string> x
+
+ /*
+ * Handle the CxxKeyword ctor.
+ * TODO: Generalize the type of exp.
+ */
+ CxxExpToAbox:
+ CxxKeyword(idf, exp) -> S(<concat-strings> [idf, " ", <CxxExpToStr> exp, ";"])
+
+ CxxExpToAbox:
+ CxxAffect(idf, exp) -> S(<concat-strings> [idf, " = ", <CxxExpToStr> exp, ";"])
+
+ CxxExpToAbox:
+ x -> S(x)
Index: trunk/src/pp-cxx/CxxType.meta
===================================================================
--- trunk/src/pp-cxx/CxxType.meta (revision 0)
+++ trunk/src/pp-cxx/CxxType.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxStm.str
===================================================================
--- trunk/src/pp-cxx/CxxStm.str (revision 0)
+++ trunk/src/pp-cxx/CxxStm.str (revision 49)
@@ -0,0 +1,8 @@
+module CxxStm
+
+imports Cxx Box libstratego-lib CxxType CxxExp CxxId
+
+rules
+
+ CxxStmToAbox:
+ CxxExpStm(e) -> <CxxExpToAbox> e
Index: trunk/src/pp-cxx/CxxFun.meta
===================================================================
--- trunk/src/pp-cxx/CxxFun.meta (revision 0)
+++ trunk/src/pp-cxx/CxxFun.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxProgram.str
===================================================================
--- trunk/src/pp-cxx/CxxProgram.str (revision 0)
+++ trunk/src/pp-cxx/CxxProgram.str (revision 49)
@@ -0,0 +1,15 @@
+module CxxProgram
+
+imports Cxx Box libstratego-lib CxxDecl CxxFun
+
+rules
+
+ CxxProgramToAbox:
+ CxxProgram(l) ->
+ V vs=1 [
+ V vs=0 [
+ "#include <stc/any.hh>"
+ "#include <stc/find_exact.hh>"
+ ]
+ V vs=0 [ ~*<map(CxxTopLevelToAbox)> l ]
+ ]
Index: trunk/src/pp-cxx/CxxDecl.str
===================================================================
--- trunk/src/pp-cxx/CxxDecl.str (revision 0)
+++ trunk/src/pp-cxx/CxxDecl.str (revision 49)
@@ -0,0 +1,90 @@
+module CxxDecl
+
+imports Cxx Box libstratego-lib CxxType CxxExp CxxId
+
+rules
+
+ CxxTopLevelToAbox:
+ l ->
+ V vs=1 [
+ ~*<map(CxxTopLevelToAbox)>l
+ ]
+
+ CxxTopLevelToAbox:
+ CxxDecl(t, idf) -> H hs=0 [ H hs=1 [ ~<CxxTypeToAbox>t ~<CxxIdToAbox>idf ] ";"]
+
+ CxxTopLevelToAbox:
+ CxxDecl(t, idf, v) -> H hs=0 [ H hs=1 [ ~<CxxTypeToAbox>t ~<CxxIdToAbox>idf "=" ~<CxxExpToAbox> v] ";"]
+
+ CxxTopLevelToAbox:
+ CxxArrayDecl(t, idf, n) -> H hs=0 [ H hs=1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf] "[" ~<CxxExpToAbox> n "]" ";" ]
+
+ CxxTopLevelToAbox:
+ CxxClassDecl(params, idf, parents) ->
+ V vs=0 [
+ ~<CxxParamsToAbox> params
+ H hs=0 [
+ H hs=1 [ "class" ~<CxxIdToAbox>idf ]
+ ~<CxxParentsToAbox>parents
+ ";"
+ ]
+ ]
+
+ CxxTopLevelToAbox:
+ CxxClassDecl(params, idf, parents) ->
+ V vs=0 [
+ ~<CxxParamsToAbox> params
+ H hs=0 [
+ H hs=1 [ "class" ~<CxxIdToAbox>idf ]
+ ~<CxxParentsToAbox>parents
+ ";"
+ ]
+ ]
+
+ CxxTopLevelToAbox:
+ CxxComment(txt) ->
+ H hs=1 [ "//" ~S(txt) ]
+
+// FIXME: MERGE!!!
+
+ CxxBodyToAbox:
+ CxxPublic(b) -> V is=2 [ "public:" V [ ~*<map(CxxTopLevelToAbox)> b ] ]
+
+ CxxBodyToAbox:
+ CxxProtected(b) -> V is=2 [ "private:" V [ ~*<map(CxxTopLevelToAbox)> b ] ]
+
+ CxxBodyToAbox:
+ CxxPrivate(b) -> V is=2 [ "private:" V [ ~*<map(CxxTopLevelToAbox)> b ] ]
+
+ CxxTopLevelToAbox:
+ CxxClassDecl(params, idf, parents, body) ->
+ V vs=0 [
+ ~<CxxParamsToAbox> params
+ H hs=0 [
+ H hs=1 [ "class" ~<CxxIdToAbox> idf ]
+ ~<CxxParentsToAbox> parents
+ ]
+ V vs=0 is=2 [ "{" V vs=1 [ ~*<map (CxxBodyToAbox)> body ] ]
+ H hs=0 [ "}" ";" ]
+ ]
+
+ CxxParamsToAbox:
+ [] -> H []
+
+ CxxParamsToAbox:
+ params -> H hs=1 [ "template" "<" ~<CxxListToAbox(CxxParamToAbox|",")> params ">" ]
+ where not(<?[]> params)
+
+ CxxParamToAbox:
+ (t, idf) -> H hs = 1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf ]
+
+ CxxParentsToAbox:
+ [] -> H []
+
+ CxxParentsToAbox:
+ parents -> H hs=1 [ ":" ~<CxxListToAbox(CxxParentToAbox|",")>parents ]
+ where not(<?[]> parents)
+
+ CxxParentToAbox:
+ (modifier, t) ->
+ H hs=1 [ ~S(modifier) ~<CxxTypeToAbox>t ]
Index: trunk/src/pp-cxx/pp-cxx.meta
===================================================================
--- trunk/src/pp-cxx/pp-cxx.meta (revision 0)
+++ trunk/src/pp-cxx/pp-cxx.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxId.meta
===================================================================
--- trunk/src/pp-cxx/CxxId.meta (revision 0)
+++ trunk/src/pp-cxx/CxxId.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/Makefile.am
===================================================================
--- trunk/src/pp-cxx/Makefile.am (revision 0)
+++ trunk/src/pp-cxx/Makefile.am (revision 49)
@@ -0,0 +1,21 @@
+# Makefile.am -*-Makefile-*-
+
+MODULES = pp-cxx
+
+include $(top_srcdir)/config/Makefile.xt
+-include $(MODULES:=.c.dep)
+
+SCFLAGS = --main $* --verbose 0
+STRINCLUDES = -I $(top_builddir)/src/scl-syn \
+ -I $(top_builddir)/src/cxx-syn \
+ -I `dirname \`xtc get Stratego-Box.tbl\`` \
+ -I $(srcdir) \
+ -la stratego-lib
+
+libexec_PROGRAMS = pp-cxx
+
+nodist_pp_cxx_SOURCES = pp-cxx.c
+
+EXTRA_DIST = $(MODULES:=.str)
+
+CLEANFILES = $(MODULES:=.c) $(MODULES:=.c.dep)
Index: trunk/src/pp-cxx/CxxType.str
===================================================================
--- trunk/src/pp-cxx/CxxType.str (revision 0)
+++ trunk/src/pp-cxx/CxxType.str (revision 49)
@@ -0,0 +1,25 @@
+module CxxType
+
+imports Cxx Box libstratego-lib CxxId
+
+rules
+
+ CxxTypeToAbox:
+ CxxType(idf) -> <CxxIdToAbox> idf
+
+ CxxTypeToAbox:
+ CxxRefType(t) -> H hs=0 [ ~<CxxTypeToAbox> t "&" ]
+
+ CxxTypeToAbox:
+ CxxType(idf, params) -> H hs=0 [ ~<CxxIdToAbox> idf "<" ~<CxxListToAbox(CxxTypeToAbox|",")> params ">" ]
+
+ CxxTypeToAbox:
+ CxxConstType(t) -> H [ "const" ~<CxxTypeToAbox> t]
+
+ CxxTypeToAbox:
+ Typename -> S("typename")
+
+ /* These function are actually macros */
+
+ CxxTypeToAbox:
+ CxxFunCall(idf, args) -> H hs=0 [ ~<CxxIdToAbox>idf "(" H hs=1 [ ~*<CxxListToAbox(CxxTypeToAbox <+ CxxExpToAbox|",")>args ] ")"]
Index: trunk/src/pp-cxx/CxxStm.meta
===================================================================
--- trunk/src/pp-cxx/CxxStm.meta (revision 0)
+++ trunk/src/pp-cxx/CxxStm.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/scoolt/Exp.str
===================================================================
--- trunk/src/scoolt/Exp.str (revision 0)
+++ trunk/src/scoolt/Exp.str (revision 49)
@@ -0,0 +1,21 @@
+module Exp
+
+imports libstratego-lib Cxx AsFix Scool
+
+rules
+
+ ExpToCxx:
+ Int(i) -> CxxInt(i)
+
+ ExpToCxx:
+ Var(v) -> v
+
+ ExpToCxx:
+ Sum(e1, e2) -> CxxSum(<ExpToCxx> e1, <ExpToCxx> e2)
+
+ ExpToCxx:
+ Affect(Var(v), e) -> CxxAffect(v, <ExpToCxx> e)
+ where <debug> e
+
+ ExpToCxx:
+ Cxx(s) -> s
Index: trunk/src/scoolt/Tools.str
===================================================================
--- trunk/src/scoolt/Tools.str (revision 0)
+++ trunk/src/scoolt/Tools.str (revision 49)
@@ -0,0 +1,29 @@
+module Tools
+
+imports libstratego-lib Cxx AsFix Scool
+
+rules
+
+ SclNewIdf:
+ idf -> <conc-strings> (idf, "_")
+
+ CxxTypeToIdf:
+ CxxType(idf) -> idf
+ where <is-string> idf
+
+strategies
+
+ NewCount =
+ rules(count_:- _)
+
+ Count =
+ if count_ => res then
+ rules(count_:- _)
+ ; rules(count_: _ -> <sum> (res, 1))
+ else
+ rules(count_: _ -> 1)
+ end
+ ; count_
+
+ GetCount =
+ count_ <+ !0
Index: trunk/src/scoolt/Access.str
===================================================================
--- trunk/src/scoolt/Access.str (revision 0)
+++ trunk/src/scoolt/Access.str (revision 49)
@@ -0,0 +1,15 @@
+module Access
+
+imports libstratego-lib Cxx Type Exp Stm Tools AsFix Scool
+
+rules
+
+ AccessToCxx:
+ Accessblock(Public, l) -> CxxPublic(<map (DeclToCxx)> l)
+
+ AccessToCxx:
+ Accessblock(Private, l) -> CxxPrivate(<map (DeclToCxx)> l)
+
+ AccessToCxx:
+ Accessblock(Protected, l) -> CxxProtected(<map (DeclToCxx)> l)
+
Index: trunk/src/scoolt/Type.str
===================================================================
--- trunk/src/scoolt/Type.str (revision 0)
+++ trunk/src/scoolt/Type.str (revision 49)
@@ -0,0 +1,32 @@
+module Type
+
+imports libstratego-lib Cxx AsFix Scool
+
+rules
+
+ IsScalar:
+ t -> t
+ where
+ (
+ <eq> (t, "char")
+ <+ <eq> (t, "bool")
+ <+ <eq> (t, "short")
+ <+ <eq> (t, "int")
+ <+ <eq> (t, "float")
+ <+ <eq> (t, "double")
+ )
+
+ TypeToCxx:
+ Var(x) -> CxxType(x)
+
+ TypeToCxx:
+ RefType(t) -> CxxRefType(<TypeToCxx> t)
+
+ // Constify + Referencify a type
+ TypeToConstRefCxx:
+ Var(t) -> CxxConstType(CxxRefType(CxxType(t)))
+ where
+ (
+ <is-string> t
+ ; <not (IsScalar)> t
+ )
Index: trunk/src/scoolt/Makefile.am
===================================================================
--- trunk/src/scoolt/Makefile.am (revision 0)
+++ trunk/src/scoolt/Makefile.am (revision 49)
@@ -0,0 +1,21 @@
+# Makefile.am -*-Makefile-*-
+
+MODULES = scoolt
+
+include $(top_srcdir)/config/Makefile.xt
+-include $(MODULES:=.c.dep)
+
+SCFLAGS = --main $* --verbose 0 --asfix
+STRINCLUDES = -I $(top_builddir)/src/scl-syn \
+ -I $(top_builddir)/src/cxx-syn \
+ -I `dirname \`xtc get Stratego-Box.tbl\`` \
+ -I $(srcdir) \
+ -la stratego-lib
+
+libexec_PROGRAMS = scoolt
+
+nodist_scoolt_SOURCES = scoolt.c
+
+EXTRA_DIST = $(MODULES:=.str)
+
+CLEANFILES = $(MODULES:=.c) $(MODULES:=.c.dep)
Index: trunk/src/scoolt/Stm.str
===================================================================
--- trunk/src/scoolt/Stm.str (revision 0)
+++ trunk/src/scoolt/Stm.str (revision 49)
@@ -0,0 +1,21 @@
+module Stm
+
+imports libstratego-lib Cxx Type Exp AsFix Scool
+
+rules
+
+ StmToCxx:
+ ExpStm(e) -> CxxExpStm(<ExpToCxx> e)
+ where <debug> e
+
+ /* Handle the 'return' statement */
+ StmToCxx:
+ Return(e) -> CxxExpStm(CxxKeyword("return", <ExpToCxx> e))
+
+ StmToCxx:
+ VarDec([], idf, t, i) -> <DeclToCxx> VarDec([], idf, t, i)
+ where <debug> idf
+
+ StmToCxx:
+ x -> <DeclToCxx> x
+ where <debug> x
Index: trunk/src/scoolt/scoolt.str
===================================================================
--- trunk/src/scoolt/scoolt.str (revision 0)
+++ trunk/src/scoolt/scoolt.str (revision 49)
@@ -0,0 +1,184 @@
+module scoolt
+
+imports libstratego-lib Cxx Program AsFix Scool
+
+strategies
+
+ scoolt = io-wrap(ProgramToCxx)
+
+
+
+/*
+ t-Program:
+ Program(l) -> Cxx(<collect-vtypes> l, <map(t-Decl)> l)
+
+
+
+ t-Decl:
+ VarDec(i, t) -> CxxVarDec(<t-Type> t, i)
+ where not(<?Var("type")> t)
+
+ t-Decl:
+ VarDec(i, t, v) -> CxxVarDec(<t-Type> t, i, <t-Exp> v)
+ where not(<?Var("type")> t)
+
+ t-Decl:
+ ConsDec(_, i, t) -> CxxVarDec(CxxConsType(<t-Type> t), i)
+ where not(<?Var("type")> t)
+
+ t-Decl:
+ ConsDec(_, i, t, v) -> CxxVarDec(CxxConsType(<t-Type> t), i, <t-Exp> v)
+ where not(<?Var("type")> t)
+
+
+
+
+ t-Decl:
+ ConsDec(_, i, t) -> CxxEscape(<concat-strings> ["/", "/ virtual typedef /abstract/ ", i, ";"] )
+ where <?Var("type")> t
+
+ t-Decl: // FIXME : vvvvvv
+ ConsDec(_, i, t, Var(v)) -> CxxEscape(<concat-strings> ["/", "/ virtual typedef ", v, " ", i, ";"] )
+ where <?Var("type")> t
+
+
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class, ClassVal(l)) -> [CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic, CxxTemplateType(CxxScope("stc", "any"), "E"), <map(t-ABlock)> l), CxxTypedef(CxxTemplateType(newname, "itself"), name)] where <conc-strings> (name, "_") => newname
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class(parent), ClassVal(l)) -> [CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic, CxxTemplateType(<t-r-Type> parent, "E"), <map(t-ABlock)> l), CxxTypedef(CxxTemplateType(newname, "itself"), name)] where <conc-strings> (name, "_") => newname; <not(one(?"final"))> qualifiers
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class(parent)) -> [CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic, CxxTemplateType(<t-r-Type> parent, "E"), []), CxxTypedef(CxxTemplateType(newname, "itself"), name)] where <conc-strings> (name, "_") => newname; <not(one(?"final"))> qualifiers
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class) -> [CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic, CxxTemplateType(CxxScope("stc", "any"), "E"), []), CxxTypedef(CxxTemplateType(newname, "itself"), name)] where <conc-strings> (name, "_") => newname
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class(parent), ClassVal(l)) -> [CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic, CxxTemplateType(<t-r-Type> parent, "E"), <map(t-ABlock)> l), CxxTypedef(CxxTemplateType(newname, "itself"), name)] where <conc-strings> (name, "_") => newname
+
+
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class(parent), ClassVal(l)) ->
+ [CxxClassDec (
+ newname,
+ CxxPublic,
+ CxxTemplateType(<t-r-Type> parent, newname),
+ <map(t-ABlock)> l
+ ),
+ CxxTypedef(newname, name)
+ ]
+ where <conc-strings> (name, "_") => newname; <one(?"final")> qualifiers
+
+ t-ABlock:
+ Accessblock(acc, decs) -> CxxAccessBlock(<t-ASpecifier> acc, <map(t-Decl)> decs)
+
+ t-ASpecifier:
+ Public -> CxxPublic
+
+ t-ASpecifier:
+ Private -> CxxPrivate
+
+ t-Decl:
+ FunDec(_, name, args, ret, body) -> CxxFunDec(<t-Type> ret, name, <map(t-Arg)> args, <map(t-Stm + t-Decl)> body)
+
+
+ t-Decl:
+ BiFunDec(qualifiers, name, s-args, args, rettype, body) ->
+ CxxOverloadingCase( name,
+ CxxInt(index),
+ <t-StaticCond>s-args,
+ <t-Type>rettype,
+ <map(t-Arg)>args,
+ <map(t-Stm + t-Decl)>body
+ )
+ where
+ <one(?"overloading")> qualifiers
+ ; if not(<index-over> name) then
+// say(!"first"); debug
+ !1 => index
+ ; rules(index-over: name -> 2)
+ else
+// say(!"not first"); debug
+ <index-over> name => index
+ ; rules(index-over: name -> <add>(index, 1))
+ end
+
+
+
+ t-Arg:
+ (name, type, guard) -> <t-Arg> (name, type)
+
+ t-Arg:
+ (name, type) -> (<t-Type> type, name)
+
+
+
+ t-Type:
+ Var(n) -> n
+
+ t-r-Type:
+ Var(n) -> <conc-strings> (n, "_")
+
+ t-Exp:
+ Int(n) -> CxxInt(n)
+
+ t-Exp:
+ Mul(e1, e2) -> CxxMul(<t-Exp> e1, <t-Exp> e2)
+
+ t-Exp:
+ Var(n) -> CxxVar(n)
+
+ t-Exp:
+ Cpp(cxx) -> CxxEscape(cxx)
+
+ t-Stm:
+ Return(e) -> CxxReturn(<t-Exp> e)
+
+ t-Decl:
+ Cpp(cxx) -> CxxEscape(cxx)
+
+ t-StaticCond:
+ [] -> CxxStaticTrue
+
+ t-StaticCond:
+ [h|[]] -> <t-StaticCond> h
+
+ t-StaticCond:
+ [h|t] -> CxxStaticAnd(<t-StaticCond> h, <t-StaticCond> t)
+ where not(<?[]>t)
+
+ t-StaticCond:
+ (idf, type, Guard(guard)) -> <t-StaticCond> guard
+
+ t-StaticCond:
+ (idf, type) -> CxxStaticTrue
+
+ t-StaticCond:
+ Eq(e1, e2) -> CxxStaticEq(<t-Type> e1, <t-Type> e2)
+
+ t-StaticCond:
+ Or(e1, e2) -> CxxStaticOr(<t-StaticCond> e1, <t-StaticCond> e2)
+
+ t-StaticCond:
+ Inf(e1, e2) -> CxxStaticIsA(<t-Type> e1, <t-Type> e2)
+
+ t-StaticCond:
+ Var("true") -> CxxStaticTrue
+
+ t-StaticCond:
+ Var("false") -> CxxStaticFalse
+
+
+
+ strategies
+
+ collect-vtypes =
+ collect(?ConsDec(attr, _, Var("type")); where (<one(?"decl")> attr) )
+ ; map(?ConsDec(_, <id>, _))
+ ; make-set
+
+
+*/
Index: trunk/src/scoolt/Decl.str
===================================================================
--- trunk/src/scoolt/Decl.str (revision 0)
+++ trunk/src/scoolt/Decl.str (revision 49)
@@ -0,0 +1,229 @@
+module Decl
+
+imports libstratego-lib Cxx Type Exp Stm Tools AsFix Scool Access
+
+rules
+
+ /*
+ * Variable declaration.
+ * Grammar: "var" idf ":" t ";"
+ */
+ DeclToCxx:
+ VarDec([], idf, t) -> CxxDecl(<TypeToCxx> t, idf)
+
+ /*
+ * Array declaration.
+ * Grammar: "var" idf ":" "array" "[" t "," n "]" ";"
+ */
+ DeclToCxx:
+ VarDec([], idf, StaticFunCall(st, [t, n])) ->
+ <if <eq> ("array", st) then
+ ! CxxArrayDecl(<TypeToCxx> t, idf, <ExpToCxx> n)
+ else
+ say(<concat-strings> ["Unkown construction: ", st])
+ ; <exit> 1
+ end>
+
+ /*
+ * Buffer declaration.
+ * Grammar: "var" idf ":" "buffer" "[" t "]" ";"
+ */
+ DeclToCxx:
+ VarDec([], idf, StaticFunCall(st, [t])) ->
+ <if <eq> ("buffer", st) then
+ ! CxxDecl(CxxType(CxxScope("std", "vector"), [<TypeToCxx> t]), idf)
+ else
+ say(<concat-strings> ["Unkown construction: ", st])
+ ; <exit> 1
+ end>
+
+ /*
+ * Variable declaration with initialisation.
+ * Grammar: "var" idf ":" t ":=" v ";"
+ */
+ DeclToCxx:
+ VarDec([], idf, t, v) -> CxxDecl(<TypeToCxx> t, idf, <ExpToCxx> v)
+
+ UnVar:
+ Var(x) -> x
+
+ /*
+ * Constant declaration.
+ * Grammar: idf ":" t ";"
+ */
+ DeclToCxx:
+ ConstDec([], idf, cs, t) ->
+ <if <eq> ("type", <UnVar> t) then
+ ! CxxDecl(<TypeToCxx> t, idf)
+ else
+ ! CxxDecl(CxxConstType(<TypeToCxx> t), idf)
+ end>
+ where not(<?Class> t)
+
+ /*
+ * Constant declaration with initialisation.
+ * Grammar: idf ":" t "=" v ";"
+ */
+ DeclToCxx:
+ ConstDec([], idf, t, v) -> CxxDecl(CxxConstType(<TypeToCxx> t), idf, <ExpToCxx> v)
+ where not(<?Class> t)
+
+ DeclToCxx:
+ ConstDec(["decl"], idf, cs, FunType(args, ret)) -> CxxFun([], <TypeToCxx> ret, idf, <map (ArgDefToCxx)> args)
+
+ /*
+ * Root Class predeclaration
+ * Grammar: idf ":" "class" ";"
+ */
+ DeclToCxx:
+ ConstDec([], idf, cs, Class) ->
+ CxxClassDecl(
+ [(Typename, "T")],
+ nidf,
+ []
+ )
+ where <conc-strings> (idf, "_") => nidf
+
+ /*
+ * Root Class declaration
+ * Grammar: specs idf ":" "class" "=" "{" v "}" ";"
+ */
+ DeclToCxx:
+ ConstDec(specs, idf, Class, ClassVal(v)) ->
+ <try(AddTypedef(|specs, idf)); AddClassComment(|idf)>
+ [
+ CxxClassDecl(
+ [(Typename, "T")],
+ nidf,
+ [
+ (
+ "public",
+ CxxType(CxxScope("stc", "any"), [CxxFunCall("stc_find_exact", [CxxType(nidf), CxxType("T")])])
+ )
+ ],
+ <map (AccessToCxx)> v
+ //[]
+ )
+ ]
+ where <SclNewIdf>idf => nidf
+ ; rules(CxxTypeToStc(|T): CxxType(idf) -> CxxType(<SclNewIdf>idf, [T]))
+
+ /*
+ * Final Class declaration
+ * Grammar: final idf ":" "class" "=" "{" v "}" ";"
+ */
+ DeclToCxx:
+ ConstDec(specs, idf, Class(p), v) ->
+ <try(AddTypedef(|specs, idf)); AddClassComment(|idf)>
+ [
+ CxxClassDecl(
+ params,
+ nidf,
+ [
+ (
+ "public",
+ parent
+ )
+ ],
+ [] // fixme
+ )
+ ]
+ where <TypeToCxx> p => cxxp
+ ; if
+ (
+ <one(?"final")> specs
+ ; !idf => nidf
+ ; <CxxTypeToStc(|CxxType(idf))>cxxp => parent
+ )
+ <+ (
+ <SclNewIdf>idf => nidf
+ ; <CxxTypeToStc(|CxxFunCall("stc_find_exact", [CxxType(nidf), CxxType("T")]))>cxxp => parent
+ )
+ then
+ if <one(?"final")> specs then
+ rules(CxxTypeToStcError: CxxType(idf) -> <concat-strings> [idf, " is final."])
+ ; ![] => params
+ else
+ rules(CxxTypeToStc(|T): CxxType(idf) -> CxxType(<SclNewIdf> idf, [T]))
+ ; ![(Typename, "T")] => params
+ end
+ else
+ say(!<concat-strings> [idf, " cannot inherit from ", <CxxTypeToIdf> cxxp])
+ ; if <CxxTypeToStcError> cxxp => error then
+ say(!error)
+ else
+ say(!<concat-strings> [<CxxTypeToIdf>cxxp, " does not exist."])
+ end
+ end
+
+ /*
+ * Handle class declarations with inheritance
+ * Grammar: idf ":" "class" "<" parent ";"
+ */
+ DeclToCxx:
+ ConstDec([], idf, cs, Class(parent)) -> CxxClassDecl([], idf, [("public", <TypeToCxx> parent)])
+ where <conc-strings> (idf, "_") => nidf
+
+ /*
+ * Handle functions
+ * Grammar: idf ":" "(" args ")" "->" t "=" "{" body "}"
+ * TODO: Handle templates
+ */
+ DeclToCxx:
+ FunDec([], idf, args, t, body) -> CxxFun([], <TypeToCxx> t, idf, <map(ArgDefToCxx)> args, <map(StmToCxx)> body)
+ //where <debug> body
+ //FunDec([], idf, args, t, body) -> <AddParameters(|<GetCount> 0)> CxxFun([], <TypeToCxx> t, idf, nargs, <map(StmToCxx)>body)
+ //where <NewCount; map(ArgDefToCxx)>args => nargs
+ /*
+ * Handle functions
+ * Grammar: idf ":" "(" args ")" "->" t "=>" Exp
+ * TODO: Handle templates
+ */
+ DeclToCxx:
+ FunDec([], idf, args, t, ExpStm(body)) -> CxxFun([], <TypeToCxx> t, idf, <map(ArgDefToCxx)> args, [<StmToCxx> Return(body)])
+ //where <debug> body
+
+ DeclToCxx:
+ StaticFunDec(l, idf, params, Class(), body) -> CxxClassDecl(<map (ParamToCxx)> params, idf, [], <map (AccessToCxx)> body)
+
+ DeclToCxx:
+ BiFunDec(l, idf, params, args, t, body) -> CxxFun(<map (ParamToCxx)> params, <TypeToCxx> t, idf, <map (ArgDefToCxx)> args, <map (StmToCxx)> body)
+
+ DeclToCxx:
+ BiFunDec(l, idf, params, args, t, ExpStm(body)) -> CxxFun(<map (ParamToCxx)> params, <TypeToCxx> t, idf, <map (ArgDefToCxx)> args, [<StmToCxx> Return(body)])
+
+ ParamToCxx:
+ (idf, Var(t), wclause) ->
+ <if <eq> (t, "type") then
+ ! (CxxType("class"), idf)
+ else
+ ! (CxxType(t), idf)
+ end>
+
+ ArgDefToCxx:
+ (idf, t) -> (<TypeToConstRefCxx <+ TypeToCxx> t, idf)
+ //(idf, t) -> (<TypeToCxx; try(CxxTypeToStc(|CxxType(p-idf)))> t, idf)
+ //where <concat-strings; SclNewIdf> ["T", <Count; int-to-string> 0] => p-idf
+
+ ArgDefToCxx:
+ FunArg(idf, t) -> <ArgDefToCxx> (idf, t)
+
+ AddTypedef(|specs, idf):
+ [x] -> [x, CxxTypedef(CxxType(<SclNewIdf>idf, [CxxType(CxxScope("stc", "itself"))]), idf)]
+ where <not(one(?"abstract"))> specs
+
+ AddClassComment(|idf):
+ l -> [CxxComment(<concat-strings> ["Class ", idf])|l]
+
+ AddParameters(|n):
+ CxxFun(p, t, idf, args, body) -> CxxFun(<Parameters(|n)> p, t, idf, args, body)
+ //where <debug> n
+
+ Parameters(|n):
+ l -> <Parameters(|<subt>(n, 1))>[(Typename, idf)|l]
+ where <not(?0)> n
+ ; <concat-strings; SclNewIdf> ["T", <int-to-string> n] => idf
+
+ Parameters(|n):
+ l -> l
+ where <?0> n
Index: trunk/src/scoolt/Program.str
===================================================================
--- trunk/src/scoolt/Program.str (revision 0)
+++ trunk/src/scoolt/Program.str (revision 49)
@@ -0,0 +1,8 @@
+module Program
+
+imports libstratego-lib Cxx Decl AsFix Scool
+
+rules
+
+ ProgramToCxx:
+ Program(l) -> CxxProgram(<map(DeclToCxx)> l)
Index: trunk/src/parse-scool/parse-scool
===================================================================
--- trunk/src/parse-scool/parse-scool (revision 0)
+++ trunk/src/parse-scool/parse-scool (revision 49)
@@ -0,0 +1 @@
+sglri -p `dirname $0`/../scl-syn/Scool.tbl -i $1
Property changes on: trunk/src/parse-scool/parse-scool
___________________________________________________________________
Name: svn:executable
+ *
Index: trunk/src/scl-syn/Decl.sdf
===================================================================
--- trunk/src/scl-syn/Decl.sdf (revision 48)
+++ trunk/src/scl-syn/Decl.sdf (revision 49)
@@ -18,9 +18,11 @@
Qualifier* Id ":" Type "=" Exp ";" -> Decl
{cons("ConstDec")}
- Qualifier* Id ":" Type ";" -> Decl
+
+ Qualifier* Id ":" Constifier? Type ";" -> Decl
{cons("ConstDec")}
+ Qualifier* Id ":" "(" {(Id ":" Type) ","}* ")" "->" Type "=>" Stm -> Decl { cons("FunDec") }
Qualifier* Id ":" "(" {(Id ":" Type) ","}* ")" "->" Type
"=" "{" Stm* "}" -> Decl
@@ -33,3 +35,7 @@
Qualifier* Id ":" "[" {(Id ":" Type ("where" Exp)?) ","}* "]" "(" {(Id ":" Type) ","}* ")" "->" Type
"=" "{" Stm* "}" -> Decl
{cons("BiFunDec")}
+
+ Qualifier* Id ":" "[" {(Id ":" Type ("where" Exp)?) ","}* "]" "(" {(Id ":" Type) ","}* ")" "->" Type
+ "=>" Stm -> Decl
+ {cons("BiFunDec")}
Index: trunk/src/scl-syn/Makefile.am
===================================================================
--- trunk/src/scl-syn/Makefile.am (revision 0)
+++ trunk/src/scl-syn/Makefile.am (revision 49)
@@ -0,0 +1,19 @@
+# Makefile.am -*-Makefile-*-
+
+MODULES = Scool
+SDFS = Class Decl Exp ExpOrType Lexical Scool Stm Type
+
+include $(top_srcdir)/config/Makefile.xt
+-include $(MODULES:=.dep)
+
+PGEN_FLAGS = -m $*
+SDF2RTG_FLAGS = -m $*
+SCFLAGS = -m $* --verbose 0
+
+pkgdata_DATA = $(MODULES:=.def) \
+ $(MODULES:=.tbl) \
+ $(MODULES:=.str) \
+ $(MODULES:=.rtree)
+
+EXTRA_DIST = $(SDFS:=.sdf) $(MODULES:=.sdf)
+CLEANFILES = $(pkgdata_DATA) $(MODULES:=.dep)
Index: trunk/src/scl-syn/Lexical.sdf
===================================================================
--- trunk/src/scl-syn/Lexical.sdf (revision 48)
+++ trunk/src/scl-syn/Lexical.sdf (revision 49)
@@ -1,7 +1,7 @@
module Lexical
exports
- sorts Id Int String Asterisk Slash BlockComment CommentPart Cxx RawCxx Qualifier
+ sorts Id Int String Asterisk Slash BlockComment CommentPart Cxx RawCxx Qualifier Constifier
context-free syntax
@@ -30,6 +30,9 @@
"final" -> Qualifier
"overloading" -> Qualifier
"decl" -> Qualifier
+ "abstract" -> Qualifier
+
+ "const" -> Constifier
lexical restrictions
Id -/- [A-Za-z]
@@ -38,4 +41,4 @@
context-free restrictions
LAYOUT? -/- [\ \t\n]
-
+ LAYOUT? -/- [\/].[\/]
Index: trunk/src/scl-syn/Type.sdf
===================================================================
--- trunk/src/scl-syn/Type.sdf (revision 48)
+++ trunk/src/scl-syn/Type.sdf (revision 49)
@@ -10,6 +10,8 @@
context-free syntax
ExpOrType -> Type
+ Id ":" Type -> Type {non-assoc,cons("FunArg")}
+ "ref" Type -> Type {non-assoc,cons("RefType")}
"(" {Type ","}* ")" "->" Type -> Type {cons("FunType")}
"[" {Type ","}* "]" "->" Type -> Type {cons("StaticFunType")}
"[" {Type ","}* "]"
Index: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am (revision 0)
+++ trunk/src/Makefile.am (revision 49)
@@ -0,0 +1,7 @@
+# Makefile.am -*-Makefile-*-
+
+include $(top_srcdir)/config/Makefile.xt
+
+SUBDIRS = cxx-syn scl-syn pp-cxx scoolt
+
+BOOTCLEAN_SUBDIRS = $(SUBDIRS)
Index: trunk/src/cxx-syn/CxxType.sdf
===================================================================
--- trunk/src/cxx-syn/CxxType.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxType.sdf (revision 49)
@@ -0,0 +1,14 @@
+module CxxType
+
+imports
+ Lexical
+
+exports
+ sorts CxxType
+ context-free syntax
+
+ CxxId -> CxxType {cons("CxxType")}
+ CxxId "<" {CxxType ","}* ">" -> CxxType {cons("CxxType")}
+ "const" CxxType -> CxxType {cons("CxxConstType")}
+ CxxType "&" -> CxxType {cons("CxxRefType")}
+
Index: trunk/src/cxx-syn/CxxStm.sdf
===================================================================
--- trunk/src/cxx-syn/CxxStm.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxStm.sdf (revision 49)
@@ -0,0 +1,11 @@
+module CxxStm
+
+imports
+ CxxType CxxExp CxxDecl
+
+exports
+ sorts CxxStm
+ context-free syntax
+
+ CxxDecl -> CxxStm
+ CxxExp -> CxxStm {cons("CxxExpStm")}
Index: trunk/src/cxx-syn/CxxDecl.sdf
===================================================================
--- trunk/src/cxx-syn/CxxDecl.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxDecl.sdf (revision 49)
@@ -0,0 +1,34 @@
+module CxxDecl
+
+imports
+ CxxType CxxExp Lexical
+
+exports
+ sorts CxxDecl CxxTopLevel
+ context-free syntax
+
+ CxxType CxxId ";" -> CxxDecl {cons("CxxDecl")}
+ CxxType CxxId ("[" CxxExp "]")? ";" -> CxxDecl {cons("CxxArrayDecl")}
+
+ CxxType CxxId "=" CxxExp ";" -> CxxDecl {cons("CxxDecl")}
+
+ "typedef" CxxType CxxId ";" -> CxxDecl {cons("CxxTypedef")}
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
+ "class" CxxId ":" {(CxxAccessModifier CxxId) ","}* ";"
+ -> CxxDecl {cons("CxxClassDecl")}
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
+ "class" CxxId ":" {(CxxAccessModifier CxxId) ","}*
+ "{"
+ CxxDecl*
+ "}" ";"
+ -> CxxDecl {cons("CxxClassDecl")}
+
+ "typename" -> CxxType {cons("Typename")}
+
+ "//" CxxText -> CxxTopLevel {cons("CxxComment")}
+
+ "public" ":" CxxTopLevel* -> CxxTopLevel {cons("CxxPublic")}
+ "protected" ":" CxxTopLevel* -> CxxTopLevel {cons("CxxProtected")}
+ "private" ":" CxxTopLevel* -> CxxTopLevel {cons("CxxPrivate")}
Index: trunk/src/cxx-syn/CxxFun.sdf
===================================================================
--- trunk/src/cxx-syn/CxxFun.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxFun.sdf (revision 49)
@@ -0,0 +1,24 @@
+module CxxFun
+
+imports
+ CxxType CxxExp Lexical CxxStm
+
+exports
+ sorts CxxTopLevel
+ context-free syntax
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
+ CxxType CxxId "(" {(CxxType CxxId) ","}* ")"
+ "{"
+ CxxStm*
+ "}"
+ -> CxxTopLevel {cons("CxxFun")}
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
+ CxxType CxxId "(" {(CxxType CxxId) ","}* ")" ";" -> CxxTopLevel {cons("CxxFun")}
+
+ CxxId ("<" {CxxType ","}* ">")? "(" {(CxxType CxxId) ","}* ")" ";" -> CxxTopLevel {cons("CxxFunCall")}
+
+ CxxDecl -> CxxTopLevel
+
+ CxxTopLevel* -> CxxTopLevel
Index: trunk/src/cxx-syn/CxxScope.sdf
===================================================================
Index: trunk/src/cxx-syn/Makefile.am
===================================================================
--- trunk/src/cxx-syn/Makefile.am (revision 0)
+++ trunk/src/cxx-syn/Makefile.am (revision 49)
@@ -0,0 +1,19 @@
+# Makefile.am -*-Makefile-*-
+
+MODULES = Cxx
+SDFS = Cxx CxxDecl CxxExp CxxFun CxxScope CxxStm CxxType Lexical
+
+include $(top_srcdir)/config/Makefile.xt
+-include $(MODULES:=.dep)
+
+PGEN_FLAGS = -m $*
+SDF2RTG_FLAGS = -m $*
+SCFLAGS = -m $* --verbose 0
+
+pkgdata_DATA = $(MODULES:=.def) \
+ $(MODULES:=.tbl) \
+ $(MODULES:=.str) \
+ $(MODULES:=.rtree)
+
+EXTRA_DIST = $(SDFS:=.sdf) $(MODULES:=.sdf)
+CLEANFILES = $(pkgdata_DATA) $(MODULES:=.dep)
Index: trunk/src/cxx-syn/CxxExp.sdf
===================================================================
--- trunk/src/cxx-syn/CxxExp.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxExp.sdf (revision 49)
@@ -0,0 +1,15 @@
+module CxxExp
+
+imports
+ Lexical
+
+exports
+ sorts CxxExp
+ context-free syntax
+
+ CxxInt -> CxxExp {cons("CxxInt")}
+ CxxId "(" {CxxExp ","}* ")" -> CxxExp {cons("CxxFunCall")}
+
+ CxxId CxxExp ";" -> CxxExp {cons("CxxKeyword")}
+ CxxId "=" CxxExp ";" -> CxxExp {cons("CxxAffect")}
+ CxxExp "+" CxxExp -> CxxExp {cons("CxxSum")}
Index: trunk/src/cxx-syn/Lexical.sdf
===================================================================
--- trunk/src/cxx-syn/Lexical.sdf (revision 0)
+++ trunk/src/cxx-syn/Lexical.sdf (revision 49)
@@ -0,0 +1,15 @@
+module Lexical
+
+exports
+ sorts CxxId CxxInt CxxAccessModifier CxxText
+ lexical syntax
+
+ ~[]* -> CxxText
+ [a-zA-Z0-9]+ -> CxxId
+ [0-9]+ -> CxxInt
+ "private" -> CxxAccessModifier
+ "public" -> CxxAccessModifier
+ "protected" -> CxxAccessModifier
+
+ context-free syntax
+ CxxId "::" CxxId -> CxxId {cons("CxxScope")}
Index: trunk/src/cxx-syn/Cxx.sdf
===================================================================
--- trunk/src/cxx-syn/Cxx.sdf (revision 0)
+++ trunk/src/cxx-syn/Cxx.sdf (revision 49)
@@ -0,0 +1,12 @@
+module Cxx
+
+imports
+ CxxDecl CxxFun
+
+exports
+ sorts CxxProgram CxxTopLevel
+ context-free start-symbols CxxProgram
+ context-free syntax
+
+ CxxTopLevel -> CxxProgram {cons("CxxProgram")}
+
Index: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile (revision 48)
+++ trunk/src/Makefile (revision 49)
@@ -1,62 +1,775 @@
-SCLSDF = $(wildcard scl-syn/*.sdf)
-CXXSDF = $(wildcard cxx-syn/*.sdf)
-ALL = \
-scl-syn/Scool.def scl-syn/Scool.tbl scl-syn/Scool.str scl-syn/Scool.rtg \
-#cxx-syn/Cxx.def cxx-syn/Cxx.tbl cxx-syn/Cxx.rtg cxx-syn/Cxx.str \
-#scoolt/scoolt \
-#pp-cxx/pp-cxx \
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# src/Makefile. Generated from Makefile.in by configure.
-STRC = strc -la stratego-lib
-
-all: $(ALL)
-
-
-
-
-
-
-scl-syn/Scool.def: $(SCLSDF)
- pack-sdf -i scl-syn/Scool.sdf -o $@
-
-scl-syn/Scool.tbl: scl-syn/Scool.def
- sdf2table -i $< -o $@ -m Scool
-
-scl-syn/Scool.rtg: scl-syn/Scool.def
- sdf2rtg -i $< -m Scool -o $@
-
-scl-syn/Scool.str: scl-syn/Scool.rtg
- rtg2sig --module Scool -i $< -o $@
-
-
-
-
-
-cxx-syn/Cxx.def: $(CXXSDF)
- pack-sdf -i cxx-syn/Cxx.sdf -o $@
-
-cxx-syn/Cxx.tbl: cxx-syn/Cxx.def
- sdf2table -i $< -o $@ -m Cxx
-
-cxx-syn/Cxx.rtg: cxx-syn/Cxx.def
- sdf2rtg -i $< -m Cxx -o $@
-
-cxx-syn/Cxx.str: cxx-syn/Cxx.rtg
- rtg2sig --module Cxx -i $< -o $@
-
-
-
-
-scoolt/scoolt: scoolt/scoolt.str
- $(STRC) -i $< -I scl-syn -I cxx-syn
-
-
-
-
-pp-cxx/pp-cxx: pp-cxx/pp-cxx.str
- $(STRC) -I ~/.nix-profile/share/sdf/gpp -I cxx-syn -i $<
-
-
-
-
-clean:
- rm -rf $(ALL)
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Makefile.am -*-Makefile-*-
+
+###########################################################
+# File: Makefile.xt
+#
+# autoxt
+#
+# Description
+#
+# This Makefile provides support for compiling Stratego
+# programs and use of some other XT tools.
+#
+###########################################################
+#
+# Variables
+#
+
+pkgdatadir = $(datadir)/scool
+pkglibdir = $(libdir)/scool
+pkgincludedir = $(includedir)/scool
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/Makefile.xt
+am__append_1 = -DDEFAULT_XTC_REPOSITORY="\"$(REPOSITORY)\""
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/config/autoxt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run aclocal-1.10
+AMTAR = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run tar
+AR = ar
+ASFIX_TOOLS = $(STRATEGOXT)
+ASF_LIBRARY = $(SDF)
+ATERM = /nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939
+ATERM_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+ATERM_FRONT = $(STRATEGOXT)
+ATERM_LIBS = -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lATerm
+ATERM_STRCFLAGS =
+ATERM_XTC =
+AUTOCONF = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run automake-1.10
+AWK = gawk
+BUILD_REPOSITORY = /home/yabo/dev/lrde/scool/trunk/BUILDTIME_XTC
+CC = /usr/bin/gcc32
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CONCRETE_SYNTAX = $(STRATEGOXT)
+CPP = /usr/bin/gcc32 -E
+CPPFLAGS =
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+C_TOOLS = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+C_TOOLS_CFLAGS = -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+C_TOOLS_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+C_TOOLS_STRCFLAGS = -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share/c-tools -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share/sdf/c-tools
+C_TOOLS_XTC =
+DEFS = -DPACKAGE_NAME=\"scool\" -DPACKAGE_TARNAME=\"scool\" -DPACKAGE_VERSION=\"0.1\" -DPACKAGE_STRING=\"scool\ 0.1\" -DPACKAGE_BUGREPORT=\"yabo(a)lrde.epita.fr\" -DPACKAGE=\"scool\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
+DEPDIR = .deps
+ECHO = echo
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /bin/grep -E
+EXEEXT =
+F77 = gfortran
+FFLAGS = -g -O2
+GPP = $(STRATEGOXT)
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS =
+LIBOBJS =
+LIBS =
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+OBJEXT = o
+PACKAGE = scool
+PACKAGE_BUGREPORT = yabo(a)lrde.epita.fr
+PACKAGE_NAME = scool
+PACKAGE_STRING = scool 0.1
+PACKAGE_TARNAME = scool
+PACKAGE_VERSION = 0.1
+PATH_SEPARATOR = :
+PGEN = $(SDF)
+PKG_CONFIG = /usr/bin/pkg-config
+PT_SUPPORT = $(SDF)
+RANLIB = ranlib
+REPOSITORY = ${datarootdir}/scool/XTC
+SCOMPILE = $(STRC)/bin/strc
+SDF = /nix/store/94msp5hiqhb82dh9k0jhzgdr9ld9n9r3-sdf2-bundle-2.4pre206999
+SDF_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+SDF_FRONT = $(STRATEGOXT)
+SDF_LIBRARY = $(SDF)
+SDF_LIBS = -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lATerm
+SDF_STRCFLAGS =
+SDF_TOOLS = $(STRATEGOXT)
+SDF_XTC =
+SED = /bin/sed
+SET_MAKE =
+SGLR = $(SDF)
+SHELL = /bin/sh
+SRTS = $(STRATEGO_RUNTIME)
+STRATEGOXT = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGOXT_CFLAGS =
+STRATEGOXT_LIBS =
+STRATEGOXT_STRCFLAGS =
+STRATEGOXT_XTC = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share/strategoxt/XTC
+STRATEGO_ATERM = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_ATERM_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_ATERM_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-aterm -lstratego-gpp -lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_ATERM_STRCFLAGS = -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_ATERM_XTC =
+STRATEGO_FRONT = $(STRATEGOXT)
+STRATEGO_GPP = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_GPP_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_GPP_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-gpp -lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_GPP_STRCFLAGS = -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_GPP_XTC =
+STRATEGO_LIB = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_LIBRARIES =
+STRATEGO_LIB_CFLAGS = -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+STRATEGO_LIB_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_LIB_STRCFLAGS = -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share/stratego-libraries -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_LIB_XTC =
+STRATEGO_REGULAR = $(STRATEGOXT)
+STRATEGO_RTG = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_RTG_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_RTG_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-rtg -lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_RTG_STRCFLAGS = -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_RTG_XTC =
+STRATEGO_RUNTIME = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_RUNTIME_CFLAGS = -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+STRATEGO_RUNTIME_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-runtime -lm -lATerm
+STRATEGO_RUNTIME_STRCFLAGS =
+STRATEGO_RUNTIME_XTC =
+STRATEGO_SGLR = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_SGLR_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_SGLR_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_SGLR_STRCFLAGS = -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_SGLR_XTC =
+STRATEGO_TOOL_DOC = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_TOOL_DOC_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_TOOL_DOC_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-tool-doc -lstratego-gpp -lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_TOOL_DOC_STRCFLAGS = -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_TOOL_DOC_XTC =
+STRATEGO_XTC = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_XTC_CFLAGS = -I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+STRATEGO_XTC_LIBS = -L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-xtc -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_XTC_STRCFLAGS = -I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_XTC_XTC =
+STRC = $(STRATEGOXT)
+STRIP = strip
+STR_CFLAGS = -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -Wno-unused-parameter
+STR_LDFLAGS =
+VERSION = 0.1
+XML_FRONT = $(STRATEGOXT)
+XTC = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+XTC_CFLAGS =
+XTC_LIBS = $(STRATEGO_XTC_LIBS)
+XTC_PROG = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/bin/xtc
+XTC_STRCFLAGS = $(STRATEGO_XTC_STRCFLAGS)
+XTC_XTC =
+abs_builddir = /home/yabo/dev/lrde/scool/trunk/src
+abs_srcdir = /home/yabo/dev/lrde/scool/trunk/src
+abs_top_builddir = /home/yabo/dev/lrde/scool/trunk
+abs_top_srcdir = /home/yabo/dev/lrde/scool/trunk
+ac_ct_CC = /usr/bin/gcc32
+ac_ct_CXX = g++
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = $(SHELL) /home/yabo/dev/lrde/scool/trunk/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_builddir = ..
+top_srcdir = ..
+AM_CFLAGS = $(STR_CFLAGS) $(am__append_1)
+AM_LDFLAGS = $(STR_LDFLAGS)
+AM_CPPFLAGS = $(STRATEGO_LIB_CFLAGS) $(STRATEGO_RUNTIME_CFLAGS) $(ATERM_CFLAGS)
+LDADD = $(STRATEGO_LIB_LIBS) $(STRATEGO_RUNTIME_LIBS) $(ATERM_LIBS)
+
+# backwards compatibilty: prefer STRATEGO_LIB_LIBS and STRATEGO_RUNTIME_LIBS in new code.
+SSL_LIBS = $(ATERM_LIBS) $(STRATEGO_XTC_LIBS) $(STRATEGO_LIB_LIBS) $(STRATEGO_RUNTIME_LIBS) $(ATERM_LIBS)
+STRATEGORUNLIBS = $(STRATEGO_RUNTIME_LIBS)
+SUFFIXES = .str .cr .r .rtree .def .tbl .pp .sdf .rtg .rtg-nf .dfta
+PARSESTRATEGO = $(STRATEGO_FRONT)/bin/parse-stratego
+pkgconfigdir = $(libdir)/pkgconfig
+sdfdatadir = $(datadir)/sdf/$(PACKAGE)
+docdatadir = $(datadir)/doc/$(PACKAGE)
+
+###########################################################
+#
+# Makerules for XTC
+#
+XTCFLAGS = -I $(XTC)/share/xtc
+DREPOSITORY = $(DESTDIR)$(REPOSITORY)
+SUBDIRS = cxx-syn scl-syn pp-cxx scoolt
+BOOTCLEAN_SUBDIRS = $(SUBDIRS)
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .str .cr .r .rtree .def .tbl .pp .sdf .rtg .rtg-nf .dfta .c
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/Makefile.xt $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+#all-local:
+all-am: Makefile all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#install-data-local:
+#install-exec-local:
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-recursive
+
+install-exec-am: install-exec-local
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am all-local check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive distclean \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-local \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+###########################################################
+#
+# Make rules for Stratego programs
+#
+
+.str.c :
+ $(SCOMPILE) $(STRINCLUDES) $(STRCFLAGS) $(SCFLAGS) -i $< -o $@ -c
+
+.str.rtree :
+ $(PARSESTRATEGO) $(STRINCLUDES) -i $< -o $@
+
+.rtree.c :
+ $(SCOMPILE) $(STRINCLUDES) $(STRCFLAGS) $(SCFLAGS) -i $< -o $@ -c
+
+bootclean-am: clean-am
+ -test -z "$(BOOTCLEANFILES)" || rm -f $(BOOTCLEANFILES)
+
+bootclean : bootclean-recursive
+
+bootclean-recursive :
+ @dot_seen=no; \
+ target=bootclean; \
+ list='$(BOOTCLEAN_SUBDIRS) .'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+###########################################################
+#
+# Makerules for SDF definitions
+#
+
+.sdf.def :
+ $(SDF_FRONT)/bin/pack-sdf $(SDFINCLUDES) -i $< -o $@ --dep $*.dep
+
+.def.tbl :
+ $(PGEN)/bin/sdf2table $(PGEN_FLAGS) -i $< -o $@
+
+###########################################################
+#
+# Makerules for GPP
+#
+
+%.pp.af : %.pp
+ $(GPP)/bin/parse-pp-table -i $< -o $@
+
+.def.pp :
+ @if [ ! -f ${srcdir}/$@ ]; then \
+ $(GPP)/bin/ppgen -i $< -o $@ ;\
+ else \
+ $(GPP)/bin/parse-pp-table -i ${srcdir}/$@ -o $@.af ;\
+ $(GPP)/bin/ppgen -t -i $< \
+ | $(GPP)/bin/pptable-diff --old $@.af 2>&1 || \
+ eval "echo '## pptable-diff error: $@ is not consistent with syntax definition' >&2; exit 1";\
+ touch $@ ;\
+ $(RM) $@.af ;\
+ fi
+
+###########################################################
+#
+# Makerules for Stratego Regular
+#
+
+.def.rtg :
+ $(STRATEGO_REGULAR)/bin/sdf2rtg $(SDF2RTG_FLAGS) -i $< -o $@
+
+.rtg.str :
+ $(STRATEGO_REGULAR)/bin/rtg2sig --module `basename "$*"` -i $< -o $@
+
+.rtg.rtg-nf :
+ $(STRATEGO_REGULAR)/bin/parse-rtg -i $< | \
+ $(STRATEGO_REGULAR)/libexec/rtg-reduce | \
+ $(STRATEGO_REGULAR)/libexec/rtg-group -o $@
+
+.rtg.dfta :
+ $(STRATEGO_REGULAR)/bin/rtg2dfta -i $< -o $@
+
+relname:
+ echo -n $(distdir) > relname
+
+install-data-local::
+ $(mkinstalldirs) `dirname $(DREPOSITORY)`
+ @for file in fordummy $(XTC_IMPORT) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) import $$file ; \
+ echo $(XTC_PROG) -r $(DREPOSITORY) import $$file ; \
+ done
+ @for file in fordummy $(pkgdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(pkgdatadir) -V $(VERSION) -t `basename $$file` ; \
+ done
+ @for file in fordummy $(nobase_pkgdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(pkgdatadir) -V $(VERSION) -t $$file ; \
+ done
+ @for file in fordummy $(sdfdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(sdfdatadir) -V $(VERSION) -t `basename $$file` ; \
+ done
+ @for file in fordummy $(nobase_sdfdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(sdfdatadir) -V $(VERSION) -t $$file ; \
+ done
+ @for file in fordummy $(data_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(datadir) -V $(VERSION) -t `basename $$file` ; \
+ done
+ @for file in fordummy $(nobase_data_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(datadir) -V $(VERSION) -t $$file ; \
+ done
+ @echo "Data registered in repository $(DREPOSITORY): $(data_DATA) $(nobase_data_DATA) $(pkgdata_DATA) $(nobase_pkgdata_DATA) $(sdfdata_DATA) $(nobase_sdfdata_DATA)"
+
+install-exec-local::
+ $(mkinstalldirs) `dirname $(DREPOSITORY)`
+ @for file in fordummy $(bin_PROGRAMS) $(bin_SCRIPTS) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(bindir) -V $(VERSION) -t `basename $$file $(EXEEXT)` ; \
+ done
+ @for file in fordummy $(libexec_PROGRAMS) $(libexec_SCRIPTS) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(libexecdir) -V $(VERSION) -t `basename $$file $(EXEEXT)` ; \
+ done
+ @echo "Tools registered in repository $(DREPOSITORY): $(bin_PROGRAMS) $(bin_SCRIPTS) $(libexec_PROGRAMS) $(libexec_SCRIPTS)"
+
+all-local::
+ @for file in fordummy $(XTC_IMPORT) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(BUILD_REPOSITORY) import $$file ; \
+ echo $(XTC_PROG) -r $(BUILD_REPOSITORY) import $$file ; \
+ done
+ @for file in fordummy $(data_DATA) $(pkgdata_DATA) $(sdfdata_DATA) $(bin_SCRIPTS) $(libexec_SCRIPTS); do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ if test -f "$$file"; then d="`pwd`"; else d="/home/yabo/dev/lrde/scool/trunk/src"; fi; \
+ $(XTC_PROG) -r $(BUILD_REPOSITORY) register -l "$$d" -V $(VERSION) -t `basename $$file` ; \
+ done
+ @for file in fordummy $(nobase_data_DATA) $(nobase_pkgdata_DATA) $(nobase_sdfdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ if test -f "$$file"; then d="`pwd`"; else d="/home/yabo/dev/lrde/scool/trunk/src"; fi; \
+ $(XTC_PROG) -r $(BUILD_REPOSITORY) register -l "$$d" -V $(VERSION) -t $$file ; \
+ done
+ @for file in fordummy $(bin_PROGRAMS) $(libexec_PROGRAMS) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ if test -f "$$file"; then d="`pwd`"; else d="/home/yabo/dev/lrde/scool/trunk/src"; fi; \
+ $(XTC_PROG) -r $(BUILD_REPOSITORY) register -l "$$d" -V $(VERSION) -t `basename $$file $(EXEEXT)` ; \
+ done
+ @echo "Tools registered in repository $(BUILD_REPOSITORY): $(bin_PROGRAMS) $(bin_SCRIPTS) $(libexec_PROGRAMS) $(libexec_SCRIPTS)"
+ @echo "Data registered in repository $(BUILD_REPOSITORY): $(data_DATA) $(nobase_data_DATA) $(pkgdata_DATA) $(nobase_pkgdata_DATA) $(sdfdata_DATA) $(nobase_sdfdata_DATA)"
+
+###########################################################
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: trunk/bin/scoolc
===================================================================
--- trunk/bin/scoolc (revision 0)
+++ trunk/bin/scoolc (revision 49)
@@ -0,0 +1,17 @@
+#!/bin/sh
+# -*- sh -*-
+
+if [ "$1" = "--cxx" ]; then
+ shift
+ if [ $# -gt 0 ]; then
+ parse-scool -i $1 | scoolt | pp-cxx | abox2text
+ else
+ parse-scool | scoolt | pp-cxx | abox2text
+ fi
+else
+ if [ $# -gt 0 ]; then
+ parse-scool -i $1 | scoolt | pp-cxx | abox2text | g++ -c -x c++ - -I $SCOOLC_ROOT/static -I $SCOOLC_ROOT/metalic
+ else
+ parse-scool | scoolt | pp-cxx | abox2text | g++ -c -x c++ - -I $SCOOLC_ROOT/static -I $SCOOLC_ROOT/metalic
+ fi
+fi
Property changes on: trunk/bin/scoolc
___________________________________________________________________
Name: svn:executable
+ *
Index: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am (revision 0)
+++ trunk/Makefile.am (revision 49)
@@ -0,0 +1,10 @@
+# Makefile.am -*-Makefile-*-
+
+include $(top_srcdir)/config/Makefile.xt
+
+XTC_IMPORT = $(STRATEGOXT)/share/strategoxt/XTC \
+ $(GENERIC_TOOLS_XTC)
+CLEANFILES = XTC
+BOOTCLEAN_SUBDIRS = $(SUBDIRS)
+ACLOCAL_AMFLAGS = -I config
+SUBDIRS = . config src
Index: trunk/NEWS
===================================================================
Index: trunk/README
===================================================================
Index: trunk/bootstrap
===================================================================
--- trunk/bootstrap (revision 0)
+++ trunk/bootstrap (revision 49)
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+here=`pwd`
+cd config
+ autoxt
+cd $here
+autoreconf -f -i --verbose
Property changes on: trunk/bootstrap
___________________________________________________________________
Name: svn:executable
+ *
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)
2
1
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Add extra documentation to milena.
* mln/debug/all.hh,
* mln/level/all.hh,
* mln/value/all.hh: New facade files.
* mln/debug/println.hh,
* mln/level/fill.hh,
* mln/level/compare.hh,
* mln/level/paste.hh,
* mln/value/props.hh: Add documentation.
debug/all.hh | 50 ++++++++++++++++++++++++++++++++++++++++
debug/println.hh | 10 ++++----
level/all.hh | 53 ++++++++++++++++++++++++++++++++++++++++++
level/compare.hh | 32 +++++++++++++++++++++++++
level/fill.hh | 68 +++++++++++++++++++++++++++++++++++++++++++++++--------
level/paste.hh | 22 +++++++++++++++++
value/all.hh | 51 +++++++++++++++++++++++++++++++++++++++++
value/props.hh | 16 ++++++++++++
8 files changed, 289 insertions(+), 13 deletions(-)
Index: mln/debug/println.hh
--- mln/debug/println.hh (revision 998)
+++ mln/debug/println.hh (working copy)
@@ -28,6 +28,11 @@
#ifndef MLN_DEBUG_PRINTLN_HH
# define MLN_DEBUG_PRINTLN_HH
+/*! \file mln/debug/println.hh
+ *
+ * \brief Print an image on the standard output.
+ */
+
# include <mln/core/concept/image.hh>
# include <mln/core/concept/window.hh>
# include <mln/core/box2d.hh>
@@ -39,13 +44,10 @@
namespace debug
{
+ /// Print the image \p input on the standard output.
template <typename I>
void println(const Image<I>& input);
- template <typename I, typename W>
- void println(const Image<I>& input_,
- const Window<W>& win_);
-
# ifndef MLN_INCLUDE_ONLY
Index: mln/debug/all.hh
--- mln/debug/all.hh (revision 0)
+++ mln/debug/all.hh (revision 0)
@@ -0,0 +1,50 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_DEBUG_ALL_HH
+# define MLN_DEBUG_ALL_HH
+
+/*! \file mln/debug/all.hh
+ *
+ * \brief File that includes all debug-related routines.
+ */
+
+
+namespace mln
+{
+
+ /*! Namespace of routines that help to debug.
+ */
+ namespace debug {}
+
+}
+
+
+# include <mln/debug/println.hh>
+
+
+#endif // ! MLN_DEBUG_ALL_HH
Index: mln/level/fill.hh
--- mln/level/fill.hh (revision 998)
+++ mln/level/fill.hh (working copy)
@@ -28,6 +28,11 @@
#ifndef MLN_LEVEL_FILL_HH
# define MLN_LEVEL_FILL_HH
+/*! \file mln/level/fill.hh
+ *
+ * \brief Fill an image, that is, set pixel values.
+ */
+
# include <mln/core/concept/image.hh>
@@ -37,23 +42,68 @@
namespace level
{
+ /*! Fill the whole image \p ima with the single value \p v.
+ *
+ * \param[in,out] ima The image to be filled.
+ * \param[in] v The value to assign to all pixels.
+ *
+ * \pre \p ima has to be initialized.
+ */
+ template <typename I>
+ void fill(Image<I>& ima,
+ const mln_value(I)& v);
+
+
+ /*! Fill the image \p ima by applying the function \p f.
+ *
+ * \param[in,out] ima The image to be filled.
+ * \param[in] f The function that defines the value of every pixel.
+ *
+ * The signature of \p f has to be:
+ * " value f(const point& p) "
+ *
+ * \pre \p ima has to be initialized.
+ */
template <typename I>
- void fill(Image<I>& ima_,
- const mln_value(I)& value);
-
- template <typename I>
- void fill(Image<I>& ima_,
+ void fill(Image<I>& ima,
mln_value(I) (*f)(const mln_point(I)& p));
- template <typename I>
- void fill(Image<I>& ima_,
- const mln_value(I) array[]);
+ /*! Fill the image \p ima with the values given by the array \p arr.
+ *
+ * \param[in,out] ima The image to be filled.
+ * \param[in] arr The array of values.
+ *
+ * \warning The size of the array has to be larger than the number
+ * of image points, otherwise the program crashes.
+ *
+ * \pre \p ima has to be initialized.
+ *
+ * \todo Add as parameter the array size, then add a test.
+ */
+ template <typename I>
+ void fill(Image<I>& ima,
+ const mln_value(I) arr[]);
+
+
+ /*! Fill the image \p ima with the values of the image \p data.
+ *
+ * \param[in,out] ima The image to be filled.
+ * \param[in] data The image.
+ *
+ * \warning The definition domain of \p ima has to be included in
+ * the one of \p data.
+ *
+ * \pre \p ima has to be initialized.
+ *
+ * \todo Test domain inclusion.
+ */
template <typename I, typename J>
- void fill(Image<I>& ima_,
+ void fill(Image<I>& ima,
const Image<J>& data);
+
# ifndef MLN_INCLUDE_ONLY
template <typename I>
Index: mln/level/compare.hh
--- mln/level/compare.hh (revision 998)
+++ mln/level/compare.hh (working copy)
@@ -28,22 +28,54 @@
#ifndef MLN_LEVEL_COMPARE_HH
# define MLN_LEVEL_COMPARE_HH
+/*! \file mln/level/compare.hh
+ *
+ * \brief Comparison operators between the pixel values of images.
+ */
+
# include <mln/core/concept/image.hh>
namespace mln
{
+ /*! Point-wise test if the pixel values of \p lhs are equal to the
+ * pixel values of \p rhs.
+ *
+ * \param[in] lhs A first image.
+ * \param[in] rhs A second image.
+ *
+ * \todo Test domain equality.
+ */
template <typename L, typename R>
bool operator = (const Image<L>& lhs, const Image<R>& rhs);
+
+ /*! Point-wise test if the pixel values of \p lhs are point-wise
+ * less than the pixel values of \p rhs.
+ *
+ * \param[in] lhs A first image.
+ * \param[in] rhs A second image.
+ *
+ * \todo Test domain equality.
+ */
template <typename L, typename R>
bool operator < (const Image<L>& lhs, const Image<R>& rhs);
+
+ /*! Point-wise test if the pixel values of \p lhs are point-wise
+ * less than or equal to the pixel values of \p rhs.
+ *
+ * \param[in] lhs A first image.
+ * \param[in] rhs A second image.
+ *
+ * \todo Test domain equality.
+ */
template <typename L, typename R> // required!
bool operator <= (const Image<L>& lhs, const Image<R>& rhs);
+
# ifndef MLN_INCLUDE_ONLY
template <typename L, typename R>
Index: mln/level/all.hh
--- mln/level/all.hh (revision 0)
+++ mln/level/all.hh (revision 0)
@@ -0,0 +1,53 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_LEVEL_ALL_HH
+# define MLN_LEVEL_ALL_HH
+
+/*! \file mln/level/all.hh
+ *
+ * \brief File that includes all level-related routines.
+ */
+
+
+namespace mln
+{
+
+ /*! Namespace of image processing routines related to pixel levels.
+ */
+ namespace level {}
+
+}
+
+
+# include <mln/level/fill.hh>
+# include <mln/level/compare.hh>
+# include <mln/level/paste.hh>
+
+
+
+#endif // ! MLN_LEVEL_ALL_HH
Index: mln/level/paste.hh
--- mln/level/paste.hh (revision 998)
+++ mln/level/paste.hh (working copy)
@@ -28,6 +28,11 @@
#ifndef MLN_LEVEL_PASTE_HH
# define MLN_LEVEL_PASTE_HH
+/*! \file mln/level/paste.hh
+ *
+ * \brief Paste the contents of an image into another one.
+ */
+
# include <mln/core/concept/image.hh>
@@ -37,6 +42,23 @@
namespace level
{
+ /*! Paste the contents of image \p data into the image \p
+ * destination.
+ *
+ * \param[in] data The input image providing pixels values.
+ * \param[in,out] destination The image in which values are
+ * assigned.
+ *
+ * This routine runs: \n
+ * for all p of \p data, \p destination(p) = \p data(p).
+ *
+ * \warning The definition domain of \p data has to be included
+ * in the one of \p destination.
+ *
+ * \pre Both images have to be initialized.
+ *
+ * \todo Test domain inclusion.
+ */
template <typename I, typename J>
void paste(const Image<I>& data, Image<J>& destination);
Index: mln/value/props.hh
--- mln/value/props.hh (revision 998)
+++ mln/value/props.hh (working copy)
@@ -28,23 +28,39 @@
#ifndef MLN_VALUE_PROPS_HH
# define MLN_VALUE_PROPS_HH
+/*! \file mln/value/props.hh
+ *
+ * \brief Define properties of value types.
+ */
+
# include <climits>
# include <cfloat>
+
+/// Get the minimum value of type \c T.
# define mln_min(T) mln::value::props<T>::min()
+
+
+/// Get the maximum value of type \c T.
# define mln_max(T) mln::value::props<T>::max()
+
namespace mln
{
namespace value
{
+ /*! Class that defines the properties of the value type \c T.
+ */
template <typename T>
struct props
{
+ /// Minimum value for type \c T.
static T min();
+
+ /// Maximum value for type \c T.
static T max();
};
Index: mln/value/all.hh
--- mln/value/all.hh (revision 0)
+++ mln/value/all.hh (revision 0)
@@ -0,0 +1,51 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_VALUE_ALL_HH
+# define MLN_VALUE_ALL_HH
+
+/*! \file mln/value/all.hh
+ *
+ * \brief File that includes all "value types"-related materials.
+ */
+
+
+namespace mln
+{
+
+ /*! Namespace of materials related to ixel value types.
+ */
+ namespace value {}
+
+}
+
+
+# include <mln/value/props.hh>
+
+
+
+#endif // ! MLN_VALUE_ALL_HH
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Add copyright to milena files.
* tests/main.cc,
* mln/morpho/Rd.hh,
* mln/morpho/erosion.hh,
* mln/debug/println.hh,
* mln/level/fill.hh,
* mln/level/compare.hh,
* mln/level/paste.hh,
* mln/core/neighb2d.hh,
* mln/core/dpoint2d.hh,
* mln/core/dpoints_piter.hh,
* mln/core/macros.hh,
* mln/core/box.hh,
* mln/core/point.hh,
* mln/core/rectangle2d.hh,
* mln/core/box_piter.hh,
* mln/core/neighb.hh,
* mln/core/concept/image.hh,
* mln/core/concept/piter.hh,
* mln/core/concept/genpoint.hh,
* mln/core/concept/point_set.hh,
* mln/core/concept/psite.hh,
* mln/core/concept/object.hh,
* mln/core/concept/doc/image.hh,
* mln/core/concept/doc/genpoint.hh,
* mln/core/concept/doc/piter.hh,
* mln/core/concept/doc/point_set.hh,
* mln/core/concept/doc/object.hh,
* mln/core/concept/doc/neighborhood.hh,
* mln/core/concept/doc/window.hh,
* mln/core/concept/doc/box.hh,
* mln/core/concept/doc/iterator.hh,
* mln/core/concept/doc/dpoint.hh,
* mln/core/concept/neighborhood.hh,
* mln/core/concept/window.hh,
* mln/core/concept/box.hh,
* mln/core/concept/point.hh,
* mln/core/concept/iterator.hh,
* mln/core/concept/dpoint.hh,
* mln/core/window2d.hh,
* mln/core/dpoint.hh,
* mln/core/ops.hh,
* mln/core/exact.hh,
* mln/core/window.hh,
* mln/core/image2d.hh,
* mln/core/vec.hh,
* mln/core/contract.hh,
* mln/core/internal/coord_impl.hh,
* mln/core/internal/image_adaptor.hh,
* mln/core/internal/image_base.hh,
* mln/core/internal/set_of.hh,
* mln/core/box2d.hh,
* mln/core/point2d.hh,
* mln/core/safe_image.hh,
* mln/value/props.hh,
* mlc/equal.hh,
* mlc/same_coord.hh,
* mlc/same_point.hh,
* sandbox/cxxcompilation/test.cc: Add copyright.
mlc/equal.hh | 27 +++++++++++++++++++++++++++
mlc/same_coord.hh | 27 +++++++++++++++++++++++++++
mlc/same_point.hh | 27 +++++++++++++++++++++++++++
mln/core/box.hh | 27 +++++++++++++++++++++++++++
mln/core/box2d.hh | 27 +++++++++++++++++++++++++++
mln/core/box_piter.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/box.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/box.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/dpoint.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/genpoint.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/image.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/iterator.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/neighborhood.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/object.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/piter.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/point_set.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/doc/window.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/dpoint.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/genpoint.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/image.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/iterator.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/neighborhood.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/object.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/piter.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/point.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/point_set.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/psite.hh | 27 +++++++++++++++++++++++++++
mln/core/concept/window.hh | 27 +++++++++++++++++++++++++++
mln/core/contract.hh | 27 +++++++++++++++++++++++++++
mln/core/dpoint.hh | 27 +++++++++++++++++++++++++++
mln/core/dpoint2d.hh | 27 +++++++++++++++++++++++++++
mln/core/dpoints_piter.hh | 27 +++++++++++++++++++++++++++
mln/core/exact.hh | 27 +++++++++++++++++++++++++++
mln/core/image2d.hh | 27 +++++++++++++++++++++++++++
mln/core/internal/coord_impl.hh | 27 +++++++++++++++++++++++++++
mln/core/internal/image_adaptor.hh | 27 +++++++++++++++++++++++++++
mln/core/internal/image_base.hh | 27 +++++++++++++++++++++++++++
mln/core/internal/set_of.hh | 27 +++++++++++++++++++++++++++
mln/core/macros.hh | 27 +++++++++++++++++++++++++++
mln/core/neighb.hh | 27 +++++++++++++++++++++++++++
mln/core/neighb2d.hh | 27 +++++++++++++++++++++++++++
mln/core/ops.hh | 27 +++++++++++++++++++++++++++
mln/core/point.hh | 27 +++++++++++++++++++++++++++
mln/core/point2d.hh | 27 +++++++++++++++++++++++++++
mln/core/rectangle2d.hh | 27 +++++++++++++++++++++++++++
mln/core/safe_image.hh | 27 +++++++++++++++++++++++++++
mln/core/vec.hh | 27 +++++++++++++++++++++++++++
mln/core/window.hh | 27 +++++++++++++++++++++++++++
mln/core/window2d.hh | 27 +++++++++++++++++++++++++++
mln/debug/println.hh | 27 +++++++++++++++++++++++++++
mln/level/compare.hh | 27 +++++++++++++++++++++++++++
mln/level/fill.hh | 27 +++++++++++++++++++++++++++
mln/level/paste.hh | 27 +++++++++++++++++++++++++++
mln/morpho/Rd.hh | 27 +++++++++++++++++++++++++++
mln/morpho/erosion.hh | 27 +++++++++++++++++++++++++++
mln/value/props.hh | 27 +++++++++++++++++++++++++++
sandbox/cxxcompilation/test.cc | 27 +++++++++++++++++++++++++++
tests/main.cc | 27 +++++++++++++++++++++++++++
58 files changed, 1566 insertions(+)
Index: tests/main.cc
--- tests/main.cc (revision 997)
+++ tests/main.cc (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#include <cmath>
#include <mln/core/image2d.hh>
Index: mln/morpho/Rd.hh
--- mln/morpho/Rd.hh (revision 997)
+++ mln/morpho/Rd.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_MORPHO_RD_HH
# define MLN_MORPHO_RD_HH
Index: mln/morpho/erosion.hh
--- mln/morpho/erosion.hh (revision 997)
+++ mln/morpho/erosion.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_MORPHO_EROSION_HH
# define MLN_MORPHO_EROSION_HH
Index: mln/debug/println.hh
--- mln/debug/println.hh (revision 997)
+++ mln/debug/println.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_DEBUG_PRINTLN_HH
# define MLN_DEBUG_PRINTLN_HH
Index: mln/level/fill.hh
--- mln/level/fill.hh (revision 997)
+++ mln/level/fill.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_LEVEL_FILL_HH
# define MLN_LEVEL_FILL_HH
Index: mln/level/compare.hh
--- mln/level/compare.hh (revision 997)
+++ mln/level/compare.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_LEVEL_COMPARE_HH
# define MLN_LEVEL_COMPARE_HH
Index: mln/level/paste.hh
--- mln/level/paste.hh (revision 997)
+++ mln/level/paste.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_LEVEL_PASTE_HH
# define MLN_LEVEL_PASTE_HH
Index: mln/core/neighb2d.hh
--- mln/core/neighb2d.hh (revision 997)
+++ mln/core/neighb2d.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_NEIGHB2D_HH
# define MLN_CORE_NEIGHB2D_HH
Index: mln/core/dpoint2d.hh
--- mln/core/dpoint2d.hh (revision 997)
+++ mln/core/dpoint2d.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_DPOINT2D_HH
# define MLN_CORE_DPOINT2D_HH
Index: mln/core/dpoints_piter.hh
--- mln/core/dpoints_piter.hh (revision 997)
+++ mln/core/dpoints_piter.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_DPOINTS_PITER_HH
# define MLN_CORE_DPOINTS_PITER_HH
Index: mln/core/macros.hh
--- mln/core/macros.hh (revision 997)
+++ mln/core/macros.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_MACROS_HH
# define MLN_CORE_MACROS_HH
Index: mln/core/box.hh
--- mln/core/box.hh (revision 997)
+++ mln/core/box.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_BOX_HH
# define MLN_CORE_BOX_HH
Index: mln/core/point.hh
--- mln/core/point.hh (revision 997)
+++ mln/core/point.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_POINT_HH
# define MLN_CORE_POINT_HH
Index: mln/core/rectangle2d.hh
--- mln/core/rectangle2d.hh (revision 997)
+++ mln/core/rectangle2d.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_RECTANGLE2D_HH
# define MLN_CORE_RECTANGLE2D_HH
Index: mln/core/box_piter.hh
--- mln/core/box_piter.hh (revision 997)
+++ mln/core/box_piter.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_BOX_PITER_HH
# define MLN_CORE_BOX_PITER_HH
Index: mln/core/neighb.hh
--- mln/core/neighb.hh (revision 997)
+++ mln/core/neighb.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_NEIGHB_HH
# define MLN_CORE_NEIGHB_HH
Index: mln/core/concept/image.hh
--- mln/core/concept/image.hh (revision 997)
+++ mln/core/concept/image.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_IMAGE_HH
# define MLN_CORE_CONCEPT_IMAGE_HH
Index: mln/core/concept/piter.hh
--- mln/core/concept/piter.hh (revision 997)
+++ mln/core/concept/piter.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_PITER_HH
# define MLN_CORE_CONCEPT_PITER_HH
Index: mln/core/concept/genpoint.hh
--- mln/core/concept/genpoint.hh (revision 997)
+++ mln/core/concept/genpoint.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_GENPOINT_HH
# define MLN_CORE_CONCEPT_GENPOINT_HH
Index: mln/core/concept/point_set.hh
--- mln/core/concept/point_set.hh (revision 997)
+++ mln/core/concept/point_set.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_POINT_SET_HH
# define MLN_CORE_CONCEPT_POINT_SET_HH
Index: mln/core/concept/psite.hh
--- mln/core/concept/psite.hh (revision 997)
+++ mln/core/concept/psite.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_PSITE_HH
# define MLN_CORE_CONCEPT_PSITE_HH
Index: mln/core/concept/object.hh
--- mln/core/concept/object.hh (revision 997)
+++ mln/core/concept/object.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_OBJECT_HH
# define MLN_CORE_CONCEPT_OBJECT_HH
Index: mln/core/concept/doc/image.hh
--- mln/core/concept/doc/image.hh (revision 997)
+++ mln/core/concept/doc/image.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/image.hh
* \brief This file documents the concept of mln::Image.
*/
Index: mln/core/concept/doc/genpoint.hh
--- mln/core/concept/doc/genpoint.hh (revision 997)
+++ mln/core/concept/doc/genpoint.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/genpoint.hh
* \brief This file documents the concept of mln::GenPoint.
*/
Index: mln/core/concept/doc/piter.hh
--- mln/core/concept/doc/piter.hh (revision 997)
+++ mln/core/concept/doc/piter.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/piter.hh
* \brief This file documents the concept of mln::Piter.
*/
Index: mln/core/concept/doc/point_set.hh
--- mln/core/concept/doc/point_set.hh (revision 997)
+++ mln/core/concept/doc/point_set.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/point_set.hh
* \brief This file documents the concept of mln::Point_Set.
*/
Index: mln/core/concept/doc/object.hh
--- mln/core/concept/doc/object.hh (revision 997)
+++ mln/core/concept/doc/object.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/object.hh
* \brief This file documents the concept of mln::Object.
*/
Index: mln/core/concept/doc/neighborhood.hh
--- mln/core/concept/doc/neighborhood.hh (revision 997)
+++ mln/core/concept/doc/neighborhood.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/neighborhood.hh
* \brief This file documents the concept of mln::Neighborhood.
*/
Index: mln/core/concept/doc/window.hh
--- mln/core/concept/doc/window.hh (revision 997)
+++ mln/core/concept/doc/window.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/window.hh
* \brief This file documents the concept of mln::Window.
*/
Index: mln/core/concept/doc/box.hh
--- mln/core/concept/doc/box.hh (revision 997)
+++ mln/core/concept/doc/box.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/box.hh
* \brief This file documents the concept of mln::Box.
*/
Index: mln/core/concept/doc/iterator.hh
--- mln/core/concept/doc/iterator.hh (revision 997)
+++ mln/core/concept/doc/iterator.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/iterator.hh
* \brief This file documents the concept of mln::Iterator.
*/
Index: mln/core/concept/doc/dpoint.hh
--- mln/core/concept/doc/dpoint.hh (revision 997)
+++ mln/core/concept/doc/dpoint.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
/*! \file mln/core/concept/doc/dpoint.hh
* \brief This file documents the concept of mln::Dpoint.
*/
Index: mln/core/concept/neighborhood.hh
--- mln/core/concept/neighborhood.hh (revision 997)
+++ mln/core/concept/neighborhood.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_NEIGHBORHOOD_HH
# define MLN_CORE_CONCEPT_NEIGHBORHOOD_HH
Index: mln/core/concept/window.hh
--- mln/core/concept/window.hh (revision 997)
+++ mln/core/concept/window.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_WINDOW_HH
# define MLN_CORE_CONCEPT_WINDOW_HH
Index: mln/core/concept/box.hh
--- mln/core/concept/box.hh (revision 997)
+++ mln/core/concept/box.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_BOX_HH
# define MLN_CORE_CONCEPT_BOX_HH
Index: mln/core/concept/point.hh
--- mln/core/concept/point.hh (revision 997)
+++ mln/core/concept/point.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_POINT_HH
# define MLN_CORE_CONCEPT_POINT_HH
Index: mln/core/concept/iterator.hh
--- mln/core/concept/iterator.hh (revision 997)
+++ mln/core/concept/iterator.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_ITERATOR_HH
# define MLN_CORE_CONCEPT_ITERATOR_HH
Index: mln/core/concept/dpoint.hh
--- mln/core/concept/dpoint.hh (revision 997)
+++ mln/core/concept/dpoint.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONCEPT_DPOINT_HH
# define MLN_CORE_CONCEPT_DPOINT_HH
Index: mln/core/window2d.hh
--- mln/core/window2d.hh (revision 997)
+++ mln/core/window2d.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_WINDOW2D_HH
# define MLN_CORE_WINDOW2D_HH
Index: mln/core/dpoint.hh
--- mln/core/dpoint.hh (revision 997)
+++ mln/core/dpoint.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_DPOINT_HH
# define MLN_CORE_DPOINT_HH
Index: mln/core/ops.hh
--- mln/core/ops.hh (revision 997)
+++ mln/core/ops.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_OPS_HH
# define MLN_CORE_OPS_HH
Index: mln/core/exact.hh
--- mln/core/exact.hh (revision 997)
+++ mln/core/exact.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_EXACT_HH
# define MLN_CORE_EXACT_HH
Index: mln/core/window.hh
--- mln/core/window.hh (revision 997)
+++ mln/core/window.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_WINDOW_HH
# define MLN_CORE_WINDOW_HH
Index: mln/core/image2d.hh
--- mln/core/image2d.hh (revision 997)
+++ mln/core/image2d.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_IMAGE2D_HH
# define MLN_CORE_IMAGE2D_HH
Index: mln/core/vec.hh
--- mln/core/vec.hh (revision 997)
+++ mln/core/vec.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_VEC_HH
# define MLN_CORE_VEC_HH
Index: mln/core/contract.hh
--- mln/core/contract.hh (revision 997)
+++ mln/core/contract.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_CONTRACT_HH
# define MLN_CORE_CONTRACT_HH
Index: mln/core/internal/coord_impl.hh
--- mln/core/internal/coord_impl.hh (revision 997)
+++ mln/core/internal/coord_impl.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_INTERNAL_COORD_IMPL_HH
# define MLN_CORE_INTERNAL_COORD_IMPL_HH
Index: mln/core/internal/image_adaptor.hh
--- mln/core/internal/image_adaptor.hh (revision 997)
+++ mln/core/internal/image_adaptor.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_INTERNAL_IMAGE_ADAPTOR_HH
# define MLN_CORE_INTERNAL_IMAGE_ADAPTOR_HH
Index: mln/core/internal/image_base.hh
--- mln/core/internal/image_base.hh (revision 997)
+++ mln/core/internal/image_base.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_INTERNAL_IMAGE_BASE_HH
# define MLN_CORE_INTERNAL_IMAGE_BASE_HH
Index: mln/core/internal/set_of.hh
--- mln/core/internal/set_of.hh (revision 997)
+++ mln/core/internal/set_of.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_INTERNAL_SET_OF_HH
# define MLN_CORE_INTERNAL_SET_OF_HH
Index: mln/core/box2d.hh
--- mln/core/box2d.hh (revision 997)
+++ mln/core/box2d.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_BOX2D_HH
# define MLN_CORE_BOX2D_HH
Index: mln/core/point2d.hh
--- mln/core/point2d.hh (revision 997)
+++ mln/core/point2d.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_POINT2D_HH
# define MLN_CORE_POINT2D_HH
Index: mln/core/safe_image.hh
--- mln/core/safe_image.hh (revision 997)
+++ mln/core/safe_image.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_CORE_SAFE_IMAGE_HH
# define MLN_CORE_SAFE_IMAGE_HH
Index: mln/value/props.hh
--- mln/value/props.hh (revision 997)
+++ mln/value/props.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLN_VALUE_PROPS_HH
# define MLN_VALUE_PROPS_HH
Index: mlc/equal.hh
--- mlc/equal.hh (revision 997)
+++ mlc/equal.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLC_EQUAL_HH
# define MLC_EQUAL_HH
Index: mlc/same_coord.hh
--- mlc/same_coord.hh (revision 997)
+++ mlc/same_coord.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLC_SAME_COORD_HH
# define MLC_SAME_COORD_HH
Index: mlc/same_point.hh
--- mlc/same_point.hh (revision 997)
+++ mlc/same_point.hh (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#ifndef MLC_SAME_POINT_HH
# define MLC_SAME_POINT_HH
Index: sandbox/cxxcompilation/test.cc
--- sandbox/cxxcompilation/test.cc (revision 997)
+++ sandbox/cxxcompilation/test.cc (working copy)
@@ -1,3 +1,30 @@
+// Copyright (C) 2007 EPITA Research and Development Laboratory
+//
+// 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. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
#include <oln/core/2d/image2d.hh>
#include <oln/core/3d/image3d.hh>
#include <oln/core/1d/image1d.hh>
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Make milena compile with g++-2.95.
* tests/main.cc,
* mln/morpho/Rd.hh,
* mln/level/fill.hh,
* mln/level/compare.hh,
* mln/level/paste.hh,
* mln/core/macros.hh,
* mln/core/box.hh,
* mln/core/rectangle2d.hh,
* mln/core/concept/box.hh,
* mln/core/ops.hh,
* mln/core/exact.hh,
* mln/core/image2d.hh,
* mln/core/contract.hh,
* mln/core/box2d.hh,
* mln/value/props.hh: Adapt to g++-2.95.
mln/core/box.hh | 2 -
mln/core/box2d.hh | 4 +--
mln/core/concept/box.hh | 3 +-
mln/core/contract.hh | 5 ++--
mln/core/exact.hh | 50 +++++++++++++++++++++++++++++++++++++-----------
mln/core/image2d.hh | 42 ++++++++++++++++++++++++++++++++++++----
mln/core/macros.hh | 39 +++++++++++++++++++------------------
mln/core/ops.hh | 4 +--
mln/core/rectangle2d.hh | 2 -
mln/level/compare.hh | 6 ++---
mln/level/fill.hh | 8 +++----
mln/level/paste.hh | 2 -
mln/morpho/Rd.hh | 6 ++---
mln/value/props.hh | 27 +++++++++++++------------
tests/main.cc | 8 +++----
15 files changed, 137 insertions(+), 71 deletions(-)
Index: tests/main.cc
--- tests/main.cc (revision 996)
+++ tests/main.cc (working copy)
@@ -16,10 +16,10 @@
typedef unsigned char int_u8;
-int_u8 cos_sin(const mln::point2d& p)
-{
- return (int_u8)(255 * std::cos(float(p.row())) * std::sin(float(p.col())));
-}
+// static int_u8 cos_sin(const mln::point2d& p)
+// {
+// return (int_u8)(255 * std::cos(float(p.row())) * std::sin(float(p.col())));
+// }
int main()
Index: mln/morpho/Rd.hh
--- mln/morpho/Rd.hh (revision 996)
+++ mln/morpho/Rd.hh (working copy)
@@ -97,7 +97,7 @@
{
if (f.has(n))
assert(is_proc(n) = is_proc__(n, p));
- if (f.has(n) and is_proc(n))
+ if (f.has(n) && is_proc(n))
do_union(n, p);
}
is_proc(p) = true;
@@ -119,7 +119,7 @@
bool is_proc__(const point& n, const point& p) const
{
- return g(n) > g(p) or (g(n) = g(p) and n < p);
+ return g(n) > g(p) || (g(n) = g(p) && n < p);
}
void make_set(const point& p)
@@ -137,7 +137,7 @@
bool equiv(const point& r, const point& p)
{
- return g(r) = g(p) or g(p) >= o(r);
+ return g(r) = g(p) || g(p) >= o(r);
}
void do_union(const point& n, const point& p)
Index: mln/level/fill.hh
--- mln/level/fill.hh (revision 996)
+++ mln/level/fill.hh (working copy)
@@ -34,7 +34,7 @@
const mln_value(I)& value)
{
I& ima = exact(ima_);
- assert(ima.has_data());
+ mln_precondition(ima.has_data());
mln_piter(I) p(ima.domain());
for_all(p)
ima(p) = value;
@@ -45,7 +45,7 @@
mln_value(I) (*f)(const mln_point(I)& p))
{
I& ima = exact(ima_);
- assert(ima.has_data());
+ mln_precondition(ima.has_data());
mln_piter(I) p(ima.domain());
for_all(p)
ima(p) = f(p);
@@ -56,7 +56,7 @@
const mln_value(I) array[])
{
I& ima = exact(ima_);
- assert(ima.has_data());
+ mln_precondition(ima.has_data());
mln_piter(I) p(ima.domain());
unsigned i = 0;
for_all(p)
@@ -69,7 +69,7 @@
{
I& ima = exact(ima_);
const J& data = exact(data_);
- assert(ima.has_data() and data.has_data());
+ mln_precondition(ima.has_data() && data.has_data());
mln_piter(I) p(ima.domain());
for_all(p)
Index: mln/level/compare.hh
--- mln/level/compare.hh (revision 996)
+++ mln/level/compare.hh (working copy)
@@ -26,7 +26,7 @@
const R& rhs = exact(rhs_);
mln_piter(L) p(lhs.domain());
for_all(p)
- if (not (lhs(p) = rhs(p)))
+ if (! (lhs(p) = rhs(p)))
return false;
return true;
}
@@ -38,7 +38,7 @@
const R& rhs = exact(rhs_);
mln_piter(L) p(lhs.domain());
for_all(p)
- if (not (lhs(p) < rhs(p)))
+ if (! (lhs(p) < rhs(p)))
return false;
return true;
}
@@ -50,7 +50,7 @@
const R& rhs = exact(rhs_);
mln_piter(L) p(lhs.domain());
for_all(p)
- if (not (lhs(p) <= rhs(p)))
+ if (! (lhs(p) <= rhs(p)))
return false;
return true;
}
Index: mln/level/paste.hh
--- mln/level/paste.hh (revision 996)
+++ mln/level/paste.hh (working copy)
@@ -21,7 +21,7 @@
{
const I& data = exact(data_);
I& destination = exact(destination_);
- assert(ima.has_data() and destination.has_data());
+ assert(ima.has_data() && destination.has_data());
mln_piter(I) p(data.domain());
for_all(p)
Index: mln/core/macros.hh
--- mln/core/macros.hh (revision 996)
+++ mln/core/macros.hh (working copy)
@@ -2,65 +2,66 @@
# define MLN_CORE_MACROS_HH
/*! \file mln/core/macros.hh
- * Definition of the set of milena macros.
+ *
+ * \brief Definition of the set of milena macros.
*/
-/// \brief Shortcut to access the point type associated to T.
+/// Shortcut to access the point type associated to T.
# define mln_point(T) typename T::point
-/// \brief Shortcut to access the dpoint type associated to T.
+/// Shortcut to access the dpoint type associated to T.
# define mln_dpoint(T) typename T::dpoint
-/// \brief Shortcut to access the psite type associated to T.
+/// Shortcut to access the psite type associated to T.
# define mln_psite(T) typename T::psite
-/// \brief Shortcut to access the pset type associated to T.
+/// Shortcut to access the pset type associated to T.
# define mln_pset(T) typename T::pset
-/// \brief Shortcut to access the box type associated to T.
+/// Shortcut to access the box type associated to T.
# define mln_box(T) typename T::box
-/// \brief Shortcut to access the coord type associated to T.
+/// Shortcut to access the coord type associated to T.
# define mln_coord(T) typename T::coord
-/// \brief Shortcut to access the piter type associated to T.
+/// Shortcut to access the piter type associated to T.
# define mln_piter(T) typename T::piter
-/// \brief Shortcut to access the fwd_piter type associated to T.
+/// Shortcut to access the fwd_piter type associated to T.
# define mln_fwd_piter(T) typename T::fwd_piter
-/// \brief Shortcut to access the bkd_piter type associated to T.
+/// Shortcut to access the bkd_piter type associated to T.
# define mln_bkd_piter(T) typename T::bkd_piter
-/// \brief Shortcut to access the qiter type associated to T.
+/// Shortcut to access the qiter type associated to T.
# define mln_qiter(T) typename T::qiter
-/// \brief Shortcut to access the fwd_qiter type associated to T.
+/// Shortcut to access the fwd_qiter type associated to T.
# define mln_fwd_qiter(T) typename T::fwd_qiter
-/// \brief Shortcut to access the bkd_qiter type associated to T.
+/// Shortcut to access the bkd_qiter type associated to T.
# define mln_bkd_qiter(T) typename T::bkd_qiter
-/// \brief Shortcut to access the niter type associated to T.
+/// Shortcut to access the niter type associated to T.
# define mln_niter(T) typename T::niter
-/// \brief Shortcut to access the fwd_niter type associated to T.
+/// Shortcut to access the fwd_niter type associated to T.
# define mln_fwd_niter(T) typename T::fwd_niter
-/// \brief Shortcut to access the bkd_niter type associated to T.
+/// Shortcut to access the bkd_niter type associated to T.
# define mln_bkd_niter(T) typename T::bkd_niter
-/// \brief Shortcut to access the value type associated to T.
+/// Shortcut to access the value type associated to T.
# define mln_value(T) typename T::value
-/// \brief Shortcut to access the rvalue type associated to T.
+/// Shortcut to access the rvalue type associated to T.
# define mln_rvalue(T) typename T::rvalue
-/// \brief Shortcut to access the lvalue type associated to T.
+/// Shortcut to access the lvalue type associated to T.
# define mln_lvalue(T) typename T::lvalue
Index: mln/core/box.hh
--- mln/core/box.hh (revision 996)
+++ mln/core/box.hh (working copy)
@@ -140,7 +140,7 @@
box_<P>::has(const P& p) const
{
for (unsigned i = 0; i < P::dim; ++i)
- if (p[i] < pmin_[i] or p[i] > pmax_[i])
+ if (p[i] < pmin_[i] || p[i] > pmax_[i])
return false;
return true;
}
Index: mln/core/rectangle2d.hh
--- mln/core/rectangle2d.hh (revision 996)
+++ mln/core/rectangle2d.hh (working copy)
@@ -97,7 +97,7 @@
: half_height_(half_height),
half_width_(half_width)
{
- assert(half_height != 0 and half_width != 0);
+ mln_precondition(half_height != 0 && half_width != 0);
const int drow = half_height, dcol = half_width;
for (int row = - drow; row <= drow; ++row)
for (int col = - dcol; col <= dcol; ++col)
Index: mln/core/concept/box.hh
--- mln/core/concept/box.hh (revision 996)
+++ mln/core/concept/box.hh (working copy)
@@ -73,7 +73,8 @@
Box<E>::npoints() const
{
std::size_t count = 1;
- for (unsigned i = 0; i < E::point::dim; ++i)
+ typedef typename E::point P; // helps g++-3.3.5
+ for (unsigned i = 0; i < P::dim; ++i)
count * exact(this)->pmax()[i]
+ 1
Index: mln/core/ops.hh
--- mln/core/ops.hh (revision 996)
+++ mln/core/ops.hh (working copy)
@@ -71,7 +71,7 @@
template <typename O1, typename O2>
bool operator!=(const Object<O1>& lhs, const Object<O2>& rhs)
{
- return not (exact(lhs) = exact(rhs));
+ return ! (exact(lhs) = exact(rhs));
}
template <typename O1, typename O2>
@@ -90,7 +90,7 @@
bool operator<=(const Object<O1>& lhs, const Object<O2>& rhs)
{
// if partial ordering, this operator should be re-defined!
- return not (exact(rhs) < exact(lhs));
+ return ! (exact(rhs) < exact(lhs));
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/core/exact.hh
--- mln/core/exact.hh (revision 996)
+++ mln/core/exact.hh (working copy)
@@ -39,6 +39,23 @@
/// \}
+ namespace internal
+ {
+
+ template <typename E, typename O>
+ struct helper_force_exact_
+ {
+ typedef E ret;
+ };
+
+ template <typename E, typename O>
+ struct helper_force_exact_< E, const O >
+ {
+ typedef const E ret;
+ };
+
+ } // end of namespace mln::internal
+
/*! \brief Violent exact cast routine.
*
@@ -62,14 +79,18 @@
const E* force_exact(const O* ptr);
template <typename E, typename O>
- E& force_exact(O& ref);
-
- template <typename E, typename O>
- const E& force_exact(const O& ref);
+ typename internal::helper_force_exact_<E, O>::ret & // help g++-3.3
+ force_exact(O& ref);
/// \}
+// template <typename E, typename O>
+// E& force_exact(O& ref);
+
+// template <typename E, typename O>
+// const E& force_exact(const O& ref);
+
# ifndef MLN_INCLUDE_ONLY
@@ -113,16 +134,23 @@
return (const E*)(const void*)ptr;
}
- template <typename E, typename O>
- E& force_exact(O& ref)
- {
- return *(E*)(void*)(&ref);
- }
+// template <typename E, typename O>
+// E& force_exact(O& ref)
+// {
+// return *(E*)(void*)(&ref);
+// }
+
+// template <typename E, typename O>
+// const E& force_exact(const O& ref)
+// {
+// return *(const E*)(const void*)(&ref);
+// }
template <typename E, typename O>
- const E& force_exact(const O& ref)
+ typename internal::helper_force_exact_<E, O>::ret &
+ force_exact(O& ref)
{
- return *(const E*)(const void*)(&ref);
+ return *(E*)(void*)(&ref);
}
# endif // ! MLN_INCLUDE_ONLY
Index: mln/core/image2d.hh
--- mln/core/image2d.hh (revision 996)
+++ mln/core/image2d.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_IMAGE2D_HH
# define MLN_CORE_IMAGE2D_HH
+/*! \file mln/core/image2d.hh
+ *
+ * \brief Definition of the basic mln::image2d class.
+ */
+
# include <mln/core/internal/image_base.hh>
# include <mln/core/box2d.hh>
@@ -8,32 +13,58 @@
namespace mln
{
+ /*! \brief Basic 2D image class.
+ *
+ * The parameter \c T is the type of pixel values. This image class
+ * stores data in memory and has no virtual border.
+ */
template <typename T>
struct image2d : public internal::image_base_< box2d, image2d<T> >
{
+ /// Value associated type.
typedef T value;
+
+ /// Return type of read-only access.
typedef const T& rvalue;
+
+ /// Return type of read-write access.
typedef T& lvalue;
+ /// Change value type.
template <typename U>
struct change_value
{
typedef image2d<U> ret;
};
+ /// Constructor without argument.
image2d();
+
+ /// Constructor with the numbers of rows and columns.
image2d(int nrows, int ncols);
+
+ /// Constructor with a box.
image2d(const box2d& b);
+
+ /// Copy constructor.
image2d(const image2d<T>& rhs);
+ /// Assignment operator.
image2d& operator=(const image2d<T>& rhs);
+ /// Test if this image has been initialized.
bool has_data() const;
+
+ /// Give the definition domain.
const box2d& domain() const;
+ /// Read-only access to the image value located at \p p.
const T& operator()(const point2d& p) const;
+
+ /// Read-write access to the image value located at \p p.
T& operator()(const point2d& p);
+ /// Destructor.
~image2d();
private:
@@ -44,6 +75,8 @@
void allocate_();
void deallocate_();
+
+ typedef internal::image_base_< box2d, image2d<T> > super;
};
@@ -74,7 +107,8 @@
template <typename T>
image2d<T>::image2d(const image2d<T>& rhs)
- : b_(rhs.domain())
+ : super(rhs),
+ b_(rhs.domain())
{
allocate_();
std::memcpy(this->buffer_,
@@ -106,7 +140,7 @@
bool
image2d<T>::has_data() const
{
- return buffer_ != 0 and array_ != 0;
+ return buffer_ != 0 && array_ != 0;
}
template <typename T>
@@ -120,7 +154,7 @@
const T&
image2d<T>::operator()(const point2d& p) const
{
- assert(this->has_data() and this->owns_(p));
+ assert(this->has_data() && this->owns_(p));
return array_[p.row()][p.col()];
}
@@ -128,7 +162,7 @@
T&
image2d<T>::operator()(const point2d& p)
{
- assert(this->has_data() and this->owns_(p));
+ assert(this->has_data() && this->owns_(p));
return array_[p.row()][p.col()];
}
Index: mln/core/contract.hh
--- mln/core/contract.hh (revision 996)
+++ mln/core/contract.hh (working copy)
@@ -2,7 +2,8 @@
# define MLN_CORE_CONTRACT_HH
/*! \file mln/core/contract.hh
- * Definition of the set of contracts.
+ *
+ * \brief Definition of the set of contracts.
*/
# include <cassert>
@@ -21,7 +22,7 @@
# define mln_postcondition(expr) assert(expr)
/// Implication.
-# define mln_implies(lexpr, repxr) assert(not (rexpr) or (lexpr))
+# define mln_implies(lexpr, repxr) assert(! (rexpr) || (lexpr))
#endif // ! MLN_CORE_CONTRACT_HH
Index: mln/core/box2d.hh
--- mln/core/box2d.hh (revision 996)
+++ mln/core/box2d.hh (working copy)
@@ -33,7 +33,7 @@
*/
box2d mk_box2d(unsigned nrows, unsigned ncols)
{
- mln_precondition(nrows != 0 and ncols != 0);
+ mln_precondition(nrows != 0 && ncols != 0);
box2d tmp(mk_point2d(0, 0),
mk_point2d(nrows - 1, ncols - 1));
return tmp;
@@ -56,7 +56,7 @@
box2d mk_box2d(int min_row, int max_row,
int min_col, int max_col)
{
- mln_precondition(max_row >= min_row and max_col >= min_col);
+ mln_precondition(max_row >= min_row && max_col >= min_col);
box2d tmp(mk_point2d(min_row, min_col),
mk_point2d(max_row, max_col));
return tmp;
Index: mln/value/props.hh
--- mln/value/props.hh (revision 996)
+++ mln/value/props.hh (working copy)
@@ -1,7 +1,8 @@
#ifndef MLN_VALUE_PROPS_HH
# define MLN_VALUE_PROPS_HH
-# include <limits>
+# include <climits>
+# include <cfloat>
# define mln_min(T) mln::value::props<T>::min()
# define mln_max(T) mln::value::props<T>::max()
@@ -63,29 +64,29 @@
template <>
struct props<unsigned int>
{
- static unsigned int min() { return std::numeric_limits<unsigned int>::min(); }
- static unsigned int max() { return std::numeric_limits<unsigned int>::max(); }
+ static unsigned int min() { return 0; }
+ static unsigned int max() { return UINT_MAX; }
};
template <>
struct props<signed int>
{
- static signed int min() { return std::numeric_limits<signed int>::min(); }
- static signed int max() { return std::numeric_limits<signed int>::max(); }
+ static signed int min() { return INT_MIN; }
+ static signed int max() { return INT_MAX; }
};
template <>
struct props<unsigned long int>
{
- static unsigned long int min() { return std::numeric_limits<unsigned long int>::min(); }
- static unsigned long int max() { return std::numeric_limits<unsigned long int>::max(); }
+ static unsigned long int min() { return 0; }
+ static unsigned long int max() { return ULONG_MAX; }
};
template <>
struct props<signed long int>
{
- static signed long int min() { return std::numeric_limits<signed long int>::min(); }
- static signed long int max() { return std::numeric_limits<signed long int>::max(); }
+ static signed long int min() { return LONG_MIN; }
+ static signed long int max() { return LONG_MAX; }
};
// floating
@@ -93,15 +94,15 @@
template <>
struct props<float>
{
- static float min() { return std::numeric_limits<float>::min(); }
- static float max() { return std::numeric_limits<float>::max(); }
+ static float min() { return FLT_MIN; }
+ static float max() { return FLT_MAX; }
};
template <>
struct props<double>
{
- static double min() { return std::numeric_limits<double>::min(); }
- static double max() { return std::numeric_limits<double>::max(); }
+ static double min() { return DBL_MIN; }
+ static double max() { return DBL_MAX; }
};
# endif // ! MLN_INCLUDE_ONLY
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Add extra documentation in milena.
* mln/core/window2d.cc,
* mln/core/window2d_qiter.cc: Remove; obsolete.
* mln/core/neighb2d.hh,
* mln/core/dpoint2d.hh,
* mln/core/dpoints_piter.hh,
* mln/core/macros.hh,
* mln/core/point.hh,
* mln/core/rectangle2d.hh,
* mln/core/box_piter.hh,
* mln/core/neighb.hh,
* mln/core/concept/image.hh,
* mln/core/concept/piter.hh,
* mln/core/concept/genpoint.hh,
* mln/core/concept/point_set.hh,
* mln/core/concept/psite.hh,
* mln/core/concept/object.hh,
* mln/core/concept/doc/genpoint.hh,
* mln/core/concept/doc/piter.hh,
* mln/core/concept/neighborhood.hh,
* mln/core/concept/window.hh,
* mln/core/concept/box.hh,
* mln/core/concept/point.hh,
* mln/core/concept/iterator.hh,
* mln/core/concept/dpoint.hh,
* mln/core/window2d.hh,
* mln/core/dpoint.hh,
* mln/core/exact.hh,
* mln/core/window.hh,
* mln/core/contract.hh,
* mln/core/internal/coord_impl.hh,
* mln/core/internal/image_adaptor.hh,
* mln/core/internal/image_base.hh,
* mln/core/internal/set_of.hh,
* mln/core/box2d.hh,
* mln/core/point2d.hh: Add some documentation.
box2d.hh | 16 +--
box_piter.hh | 201 +++++++++++++++++++++++++++++++++++++---------
concept/box.hh | 2
concept/doc/genpoint.hh | 11 +-
concept/doc/piter.hh | 12 +-
concept/dpoint.hh | 2
concept/genpoint.hh | 4
concept/image.hh | 2
concept/iterator.hh | 2
concept/neighborhood.hh | 2
concept/object.hh | 4
concept/piter.hh | 21 +++-
concept/point.hh | 3
concept/point_set.hh | 2
concept/psite.hh | 2
concept/window.hh | 2
contract.hh | 9 +-
dpoint.hh | 4
dpoint2d.hh | 8 -
dpoints_piter.hh | 36 ++++++++
exact.hh | 2
internal/coord_impl.hh | 10 ++
internal/image_adaptor.hh | 33 ++++++-
internal/image_base.hh | 26 +++++
internal/set_of.hh | 98 ++++++++++++++++++++++
macros.hh | 48 +++++++++-
neighb.hh | 34 +++++++
neighb2d.hh | 2
point.hh | 4
point2d.hh | 6 -
rectangle2d.hh | 63 +++++++++++++-
window.hh | 34 +++++++
window2d.hh | 6 -
33 files changed, 608 insertions(+), 103 deletions(-)
Index: mln/core/neighb2d.hh
--- mln/core/neighb2d.hh (revision 995)
+++ mln/core/neighb2d.hh (working copy)
@@ -3,7 +3,7 @@
/*! \file mln/core/neighb2d.hh
*
- * \brief This file defines the mln::neighb2d alias and some classical
+ * \brief Definition of the mln::neighb2d alias and of some classical
* 2D neighborhoods.
*/
Index: mln/core/dpoint2d.hh
--- mln/core/dpoint2d.hh (revision 995)
+++ mln/core/dpoint2d.hh (working copy)
@@ -3,8 +3,8 @@
/*! \file mln/core/dpoint2d.hh
*
- * \brief This file defines the mln::dpoint2d alias and its creation
- * routine.
+ * \brief Definition of the mln::dpoint2d alias and of its
+ * construction routine.
*/
# include <mln/core/dpoint.hh>
@@ -19,12 +19,12 @@
typedef dpoint_<2,int> dpoint2d;
- /*! \brief Create a 2D delta-point.
+ /*! \brief Create an mln::dpoint2d.
*
* \param[in] row Index of row.
* \param[in] col Index of column.
*
- * \return A dpoint2d.
+ * \return A 2D delta-point.
*/
dpoint2d mk_dpoint2d(int row, int col)
{
Index: mln/core/dpoints_piter.hh
--- mln/core/dpoints_piter.hh (revision 995)
+++ mln/core/dpoints_piter.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_DPOINTS_PITER_HH
# define MLN_CORE_DPOINTS_PITER_HH
+/*! \file mln/core/dpoints_piter.hh
+ *
+ * \brief Definition of mln::dpoints_fwd_piter and mln::dpoints_bkd_piter.
+ */
+
# include <mln/core/concept/piter.hh>
# include <mln/core/concept/genpoint.hh>
@@ -8,30 +13,59 @@
namespace mln
{
+ /*! \brief A generic forward iterator on points of windows and of
+ * neighborhoods.
+ *
+ * The parameter \c D is the type of delta-points.
+ */
template <typename D>
class dpoints_fwd_piter : public Piter< dpoints_fwd_piter<D> >
{
public:
+ /// Space dimension.
enum { dim = D::dim };
+ /// Dpoint associated type.
typedef D dpoint;
+
+ /// Point associated type.
typedef mln_point(D) point;
+
+ /// Psite associated type.
typedef point psite;
+
+ /// Coordinate associated type.
typedef mln_coord(D) coord;
+ /*! \brief Constructor.
+ *
+ * \param[in] dps Object that can provide an array of delta-points.
+ * \param[in] p_ref Center point to iterate around.
+ */
template <typename Dps, typename Pref>
dpoints_fwd_piter(const Dps& dps,
const GenPoint<Pref>& p_ref);
- operator point() const;
+ /// Convertion to point.
+ operator mln_point(D) () const;
+
+ /// Address of the point.
const point* pointer() const;
+ /// Test the iterator validity.
bool is_valid() const;
+
+ /// Invalidate the iterator.
void invalidate();
+
+ /// Start an iteration.
void start();
+
+ /// Go to the next point.
void next_();
+ /// Give the i-th coordinate.
coord operator[](unsigned i) const;
private:
Index: mln/core/macros.hh
--- mln/core/macros.hh (revision 995)
+++ mln/core/macros.hh (working copy)
@@ -2,42 +2,74 @@
# define MLN_CORE_MACROS_HH
/*! \file mln/core/macros.hh
- * This file defines the set of milena macros.
+ * Definition of the set of milena macros.
*/
-/*! \def mln_point
- */
-# define mln_point typename T::point
+/// \brief Shortcut to access the point type associated to T.
+# define mln_point(T) typename T::point
-/*! \def mln_dpoint
- */
+/// \brief Shortcut to access the dpoint type associated to T.
# define mln_dpoint(T) typename T::dpoint
+/// \brief Shortcut to access the psite type associated to T.
# define mln_psite(T) typename T::psite
+
+/// \brief Shortcut to access the pset type associated to T.
# define mln_pset(T) typename T::pset
+
+/// \brief Shortcut to access the box type associated to T.
# define mln_box(T) typename T::box
-/*! \def mln_coord(T)
- */
+/// \brief Shortcut to access the coord type associated to T.
# define mln_coord(T) typename T::coord
+
+/// \brief Shortcut to access the piter type associated to T.
# define mln_piter(T) typename T::piter
+
+/// \brief Shortcut to access the fwd_piter type associated to T.
# define mln_fwd_piter(T) typename T::fwd_piter
+
+/// \brief Shortcut to access the bkd_piter type associated to T.
# define mln_bkd_piter(T) typename T::bkd_piter
+
+/// \brief Shortcut to access the qiter type associated to T.
# define mln_qiter(T) typename T::qiter
+
+/// \brief Shortcut to access the fwd_qiter type associated to T.
# define mln_fwd_qiter(T) typename T::fwd_qiter
+
+/// \brief Shortcut to access the bkd_qiter type associated to T.
# define mln_bkd_qiter(T) typename T::bkd_qiter
+
+/// \brief Shortcut to access the niter type associated to T.
# define mln_niter(T) typename T::niter
+
+/// \brief Shortcut to access the fwd_niter type associated to T.
# define mln_fwd_niter(T) typename T::fwd_niter
+
+/// \brief Shortcut to access the bkd_niter type associated to T.
# define mln_bkd_niter(T) typename T::bkd_niter
+
+/// \brief Shortcut to access the value type associated to T.
# define mln_value(T) typename T::value
+
+/// \brief Shortcut to access the rvalue type associated to T.
# define mln_rvalue(T) typename T::rvalue
+
+/// \brief Shortcut to access the lvalue type associated to T.
# define mln_lvalue(T) typename T::lvalue
+
+/*! \brief Shortcut to change the value type of an image type.
+ *
+ * \c I is an image type
+ * \c T is the new value type
+ */
# define mln_ch_value(I, T) typename I::template change_value<T>::ret
Index: mln/core/point.hh
--- mln/core/point.hh (revision 995)
+++ mln/core/point.hh (working copy)
@@ -3,7 +3,7 @@
/*! \file mln/core/point.hh
*
- * \brief This file defines a generic point class.
+ * \brief Definition of the generic point class mln::point_.
*/
# include <mln/core/concept/point.hh>
@@ -36,7 +36,7 @@
*/
typedef dpoint_<n,C> dpoint;
- /*! Coordinate associated type.
+ /*! \brief Coordinate associated type.
*/
typedef C coord;
Index: mln/core/rectangle2d.hh
--- mln/core/rectangle2d.hh (revision 995)
+++ mln/core/rectangle2d.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_RECTANGLE2D_HH
# define MLN_CORE_RECTANGLE2D_HH
+/*! \file mln/core/rectangle2d.hh
+ *
+ * \brief Definition of the mln::rectangle2d window.
+ */
+
# include <mln/core/concept/window.hh>
# include <mln/core/internal/set_of.hh>
# include <mln/core/dpoint2d.hh>
@@ -10,28 +15,80 @@
namespace mln
{
- // FIXME: doc.
+ /*! \brief Rectangular window defined on the 2D square grid.
+ *
+ * A rectangle2d is a 2D window with rectangular shape. It is
+ * centered and symmetrical.
+ *
+ * For instance:
+ * o o o o o
+ * o o x o o
+ * o o o o o
+ * is defined with half_height = 1 and half_width = 2.
+ */
struct rectangle2d : public Window< rectangle2d >,
public internal::set_of_<dpoint2d>
{
+ /*! \brief Piter type to browse a rectangle such as: "for each row
+ * (increasing), for each column (increasing)."
+ */
typedef dpoints_fwd_piter<dpoint2d> fwd_qiter;
+
+ /*! \brief Piter type to browse a rectangle such as: "for each row
+ * (decreasing), for each column (decreasing)."
+ */
typedef dpoints_bkd_piter<dpoint2d> bkd_qiter;
+
+ /*! \brief Same as fwd_qiter.
+ */
typedef fwd_qiter qiter;
+ /*! \brief Constructor.
+ *
+ * \param[in] half_height sic
+ * \param[in] half_width sic
+ *
+ * \pre half_height != 0 and half_width != 0
+ */
rectangle2d(unsigned half_height, unsigned half_width);
+ /*! \brief Test if the window is centered.
+ *
+ * \return True.
+ */
bool is_centered() const;
+
+ /*! \brief Test if the window is symmetric.
+ *
+ * \return true.
+ */
bool is_symmetric() const;
+ /*! \brief Give the rectangle height.
+ */
unsigned height() const;
+
+ /*! \brief Give the rectangle width.
+ */
unsigned width() const;
protected:
unsigned half_height_, half_width_;
};
- std::ostream& operator<<(std::ostream& ostr,
- const rectangle2d& win);
+
+ /*! \brief Print a rectangle window \p win into the output stream \p
+ * ostr.
+ *
+ * \param[in,out] ostr An output stream.
+ * \param[in] win A rectangle window.
+ *
+ * \return The modified output stream \p ostr.
+ *
+ * \relates mln::rectangle2d
+ */
+ std::ostream& operator<<(std::ostream& ostr, const rectangle2d& win);
+
# ifndef MLN_INCLUDE_ONLY
Index: mln/core/box_piter.hh
--- mln/core/box_piter.hh (revision 995)
+++ mln/core/box_piter.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_BOX_PITER_HH
# define MLN_CORE_BOX_PITER_HH
+/*! \file mln/core/box_piter.hh
+ *
+ * \brief Definition of iterators on points of boxes.
+ */
+
# include <mln/core/concept/piter.hh>
# include <mln/core/concept/box.hh>
@@ -8,19 +13,134 @@
namespace mln
{
+ /*! \brief A generic forward iterator on points of boxes.
+ *
+ * The parameter \c P is the type of points.
+ *
+ * \see mln::box_
+ */
template <typename P>
class box_fwd_piter_ : public Piter< box_fwd_piter_<P> >
{
public:
+ /// Space dimension.
enum { dim = P::dim };
+ /// Psite associated type.
typedef P psite;
+
+ /// Point associated type.
typedef P point;
+
+ /// Dpoint associated type.
+ typedef mln_dpoint(P) dpoint;
+
+ /// Coordinate associated type.
typedef mln_coord(P) coord;
+
+ /*! \brief Constructor.
+ *
+ * \param[in] b A box.
+ */
+ box_fwd_piter_(const box_<P>& b);
+
+ /// Convertion to point.
+ operator P() const;
+
+ /// Address of the point.
+ const P* pointer() const;
+
+ /// Give the i-th coordinate.
+ coord operator[](unsigned i) const;
+
+ /// Test the iterator validity.
+ bool is_valid() const;
+
+ /// Invalidate the iterator.
+ void invalidate();
+
+ /// Start an iteration.
+ void start();
+
+ /// Go to the next point.
+ void next_();
+
+ private:
+ const box_<P>& b_;
+ P p_, nop_;
+ };
+
+
+
+ /*! \brief A generic backward iterator on points of boxes.
+ *
+ * The parameter \c P is the type of points.
+ *
+ * \see mln::box_
+ */
+ template <typename P>
+ class box_bkd_piter_ : public Piter< box_bkd_piter_<P> >
+ {
+ public:
+
+ /// Space dimension.
+ enum { dim = P::dim };
+
+ /// Psite associated type.
+ typedef P psite;
+
+ /// Point associated type.
+ typedef P point;
+
+ /// Dpoint associated type.
typedef mln_dpoint(P) dpoint;
- box_fwd_piter_(const box_<P>& b)
+ /// Coordinate associated type.
+ typedef mln_coord(P) coord;
+
+ /*! \brief Constructor.
+ *
+ * \param[in] b A box.
+ */
+ box_bkd_piter_(const box_<P>& b);
+
+ /// Convertion to point.
+ operator P() const;
+
+ /// Address of the point.
+ const P* pointer() const;
+
+ /// Give the i-th coordinate.
+ coord operator[](unsigned i) const;
+
+ /// Test the iterator validity.
+ bool is_valid() const;
+
+ /// Invalidate the iterator.
+ void invalidate();
+
+ /// Start an iteration.
+ void start();
+
+ /// Go to the next point.
+ void next_();
+
+ private:
+ const box_<P>& b_;
+ P p_, nop_;
+ };
+
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+
+ // box_fwd_piter_<P>
+
+ template <typename P>
+ box_fwd_piter_<P>::box_fwd_piter_(const box_<P>& b)
: b_(b)
{
nop_ = b_.pmax();
@@ -28,38 +148,51 @@
invalidate();
}
- operator P() const
+ template <typename P>
+ box_fwd_piter_<P>::operator P() const
{
return p_;
}
- const P* pointer() const
+ template <typename P>
+ const P*
+ box_fwd_piter_<P>::pointer() const
{
return & p_;
}
- coord operator[](unsigned i) const
+ template <typename P>
+ mln_coord(P)
+ box_fwd_piter_<P>::operator[](unsigned i) const
{
assert(i < dim);
return p_[i];
}
- bool is_valid() const
+ template <typename P>
+ bool
+ box_fwd_piter_<P>::is_valid() const
{
return p_ != nop_;
}
- void invalidate()
+ template <typename P>
+ void
+ box_fwd_piter_<P>::invalidate()
{
p_ = nop_;
}
- void start()
+ template <typename P>
+ void
+ box_fwd_piter_<P>::start()
{
p_ = b_.pmin();
}
- void next_()
+ template <typename P>
+ void
+ box_fwd_piter_<P>::next_()
{
for (int i = dim - 1; i >= 0; --i)
if (p_[i] = b_.pmax()[i])
@@ -73,25 +206,11 @@
p_ = nop_;
}
- private:
- const box_<P>& b_;
- P p_, nop_;
- };
-
+ // box_bkd_piter_<P>
template <typename P>
- class box_bkd_piter_ : public Piter< box_bkd_piter_<P> >
- {
- public:
-
- enum { dim = P::dim };
-
- typedef P psite;
- typedef P point;
- typedef mln_coord(P) coord;
-
- box_bkd_piter_(const box_<P>& b)
+ box_bkd_piter_<P>::box_bkd_piter_(const box_<P>& b)
: b_(b)
{
nop_ = b_.pmin();
@@ -99,38 +218,52 @@
invalidate();
}
- operator P() const
+ template <typename P>
+ box_bkd_piter_<P>::operator P() const
{
return p_;
}
- const P* pointer() const
+
+ template <typename P>
+ const P*
+ box_bkd_piter_<P>::pointer() const
{
return & p_;
}
- coord operator[](unsigned i) const
+ template <typename P>
+ mln_coord(P)
+ box_bkd_piter_<P>::operator[](unsigned i) const
{
assert(i < dim);
return p_[i];
}
- bool is_valid() const
+ template <typename P>
+ bool
+ box_bkd_piter_<P>::is_valid() const
{
return p_ != nop_;
}
- void invalidate()
+ template <typename P>
+ void
+ box_bkd_piter_<P>::invalidate()
{
p_ = nop_;
}
- void start()
+ template <typename P>
+ void
+ box_bkd_piter_<P>::start()
{
p_ = b_.pmax();
}
- void next_()
+ template <typename P>
+ void
+ box_bkd_piter_<P>::next_()
{
for (int i = dim - 1; i >= 0; --i)
if (p_[i] = b_.pmin()[i])
@@ -144,11 +277,7 @@
p_ = nop_;
}
- private:
- const box_<P>& b_;
- P p_, nop_;
- };
-
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln
Index: mln/core/neighb.hh
--- mln/core/neighb.hh (revision 995)
+++ mln/core/neighb.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_NEIGHB_HH
# define MLN_CORE_NEIGHB_HH
+/*! \file mln/core/neighb.hh
+ *
+ * \brief Definition of the generic neighborhood class mln::neighb_.
+ */
+
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/internal/set_of.hh>
# include <mln/core/dpoint.hh>
@@ -14,16 +19,45 @@
template <typename D> class dpoints_bkd_piter;
+ /*! \brief Generic neighborhood class.
+ *
+ * This neighborhood of window is just like a set of delta-points.
+ * The parameter is \c D, type of delta-point.
+ */
template <typename D>
struct neighb_ : public Neighborhood< neighb_<D> >,
public internal::set_of_<D>
{
+ /*! \brief Piter type to browse the points of a generic
+ * neighborhood w.r.t. the ordering of delta-points.
+ */
typedef dpoints_fwd_piter<D> fwd_niter;
+
+ /*! \brief Piter type to browse the points of a generic
+ * neighborhood w.r.t. the reverse ordering of delta-points.
+ */
typedef dpoints_bkd_piter<D> bkd_niter;
+
+ /*! \brief Same as fwd_niter.
+ */
typedef fwd_niter niter;
+ /*! \brief Constructor without argument.
+ *
+ * The constructed neighborhood is empty. You have to use insert()
+ * to proceed to the neighborhood definition.
+ */
neighb_();
+ /*! \brief Insert a delta-point \p dp in the neighborhood
+ * definition.
+ *
+ * \param[in] dp The delta-point to insert.
+ *
+ * This method also insert the symmetrical delta-point, - \p dp,
+ * in the neighborhood definition; thus the client has not to
+ * ensure the symmetry property; that is automatic.
+ */
void insert(const D& dp);
};
Index: mln/core/concept/image.hh
--- mln/core/concept/image.hh (revision 995)
+++ mln/core/concept/image.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_IMAGE_HH
/*! \file mln/core/concept/image.hh
- * \brief This file defines the concept of mln::Image.
+ * \brief Definition of the concept of mln::Image.
*/
# include <mln/core/concept/point_set.hh>
Index: mln/core/concept/piter.hh
--- mln/core/concept/piter.hh (revision 995)
+++ mln/core/concept/piter.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_CONCEPT_PITER_HH
# define MLN_CORE_CONCEPT_PITER_HH
+/*! \file mln/core/concept/piter.hh
+ *
+ * \brief Definition of the concept of mln::Piter.
+ */
+
# include <mln/core/concept/iterator.hh>
# include <mln/core/concept/genpoint.hh>
@@ -8,17 +13,22 @@
namespace mln
{
+ /*! \brief Base class for implementation of classes of iterator on
+ * points.
+ *
+ * An iterator on points is an iterator that browse over a set of
+ * points.
+ *
+ * \see mln::doc::Piter for a complete documentation of this class
+ * contents.
+ */
template <typename E>
struct Piter : public Iterator<E>,
public GenPoint<E>
{
/*
typedef psite;
- typedef point;
-
operator psite() const;
- operator point() const;
- const point* pointer() const;
*/
protected:
@@ -32,8 +42,7 @@
Piter<E>::Piter()
{
typedef mln_psite(E) psite;
- typedef mln_point(E) point;
- const point* (E::*m)() const = & E::pointer;
+ psite (E::*m)() const = & E::operator psite;
m = 0;
}
Index: mln/core/concept/genpoint.hh
--- mln/core/concept/genpoint.hh (revision 995)
+++ mln/core/concept/genpoint.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_GENPOINT_HH
/*! \file mln/core/concept/genpoint.hh
- * \brief This file defines the concept of mln::GenPoint.
+ * \brief Definition of the concept of mln::GenPoint.
*/
# include <mlc/equal.hh>
# include <mlc/same_point.hh>
@@ -163,7 +163,7 @@
GenPoint<E>::GenPoint()
{
const int dim = E::dim;
- invariant(dim > 0);
+ mln_invariant(dim > 0);
typedef mln_point(E) point;
typedef mln_dpoint(E) dpoint;
typedef mln_coord(E) coord;
Index: mln/core/concept/point_set.hh
--- mln/core/concept/point_set.hh (revision 995)
+++ mln/core/concept/point_set.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_POINT_SET_HH
/*! \file mln/core/concept/point_set.hh
- * \brief This file defines the concept of mln::Point_Set.
+ * \brief Definition of the concept of mln::Point_Set.
*/
# include <mln/core/concept/point.hh>
Index: mln/core/concept/psite.hh
--- mln/core/concept/psite.hh (revision 995)
+++ mln/core/concept/psite.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_PSITE_HH
/*! \file mln/core/concept/psite.hh
- * \brief This file defines the concept of mln::Psite.
+ * \brief Definition of the concept of mln::Psite.
*/
# include <mln/core/concept/genpoint.hh>
Index: mln/core/concept/object.hh
--- mln/core/concept/object.hh (revision 995)
+++ mln/core/concept/object.hh (working copy)
@@ -2,13 +2,15 @@
# define MLN_CORE_CONCEPT_OBJECT_HH
/*! \file mln/core/concept/object.hh
- * \brief This file contains the top milena class.
+ *
+ * \brief Definition of the top milena class mln::Object.
*/
# include <cassert>
# include <iostream>
# include <mln/core/macros.hh>
+# include <mln/core/contract.hh>
/*! \namespace mln
Index: mln/core/concept/doc/genpoint.hh
--- mln/core/concept/doc/genpoint.hh (revision 995)
+++ mln/core/concept/doc/genpoint.hh (working copy)
@@ -36,11 +36,16 @@
typedef void coord;
- // FIXME:
- // typedef void topo;
- // operator point() const;
+ // FIXME: typedef void topo;
+ /*! \brief Either \c E is a point or an convertion operator into
+ * a point is defined.
+ *
+ * \return A point.
+ */
+ operator point() const;
+
/*! \brief Give a hook to the point address.
*
* This method allows for iterators to refer to a point.
Index: mln/core/concept/doc/piter.hh
--- mln/core/concept/doc/piter.hh (revision 995)
+++ mln/core/concept/doc/piter.hh (working copy)
@@ -9,19 +9,23 @@
{
/*! \brief Documentation class for mln::Piter.
+ *
* \see mln::Piter
*/
template <typename E>
struct Piter : public Iterator<E>,
public GenPoint<E>
{
- // FIXME: HERE
+ /*! \brief Psite associated type.
+ * \invariant This type has to derive from mln::Psite.
+ */
typedef void psite;
- typedef void point;
+ /*! \brief Convertion into a point-site.
+ *
+ * \return A point site.
+ */
operator psite() const;
- operator point() const;
- const point* pointer() const;
};
} // end of namespace mln::doc
Index: mln/core/concept/neighborhood.hh
--- mln/core/concept/neighborhood.hh (revision 995)
+++ mln/core/concept/neighborhood.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_NEIGHBORHOOD_HH
/*! \file mln/core/concept/neighborhood.hh
- * \brief This file defines the concept of mln::Neighborhood.
+ * \brief Definition of the concept of mln::Neighborhood.
*/
# include <mln/core/concept/object.hh>
Index: mln/core/concept/window.hh
--- mln/core/concept/window.hh (revision 995)
+++ mln/core/concept/window.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_WINDOW_HH
/*! \file mln/core/concept/window.hh
- * \brief This file defines the concept of mln::Window.
+ * \brief Definition of the concept of mln::Window.
*/
# include <mln/core/concept/object.hh>
Index: mln/core/concept/box.hh
--- mln/core/concept/box.hh (revision 995)
+++ mln/core/concept/box.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_BOX_HH
/*! \file mln/core/concept/box.hh
- * \brief This file defines the concept of mln::Box.
+ * \brief Definition of the concept of mln::Box.
*/
# include <mln/core/concept/point_set.hh>
Index: mln/core/concept/point.hh
--- mln/core/concept/point.hh (revision 995)
+++ mln/core/concept/point.hh (working copy)
@@ -2,7 +2,8 @@
# define MLN_CORE_CONCEPT_POINT_HH
/*! \file mln/core/concept/point.hh
- * \brief This file defines the concept of mln::Point.
+ *
+ * \brief Definition of the concept of mln::Point.
*/
# include <mln/core/concept/psite.hh>
Index: mln/core/concept/iterator.hh
--- mln/core/concept/iterator.hh (revision 995)
+++ mln/core/concept/iterator.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_ITERATOR_HH
/*! \file mln/core/concept/iterator.hh
- * \brief This file defines the concept of mln::Iterator.
+ * \brief Definition of the concept of mln::Iterator.
*/
# include <mln/core/concept/object.hh>
Index: mln/core/concept/dpoint.hh
--- mln/core/concept/dpoint.hh (revision 995)
+++ mln/core/concept/dpoint.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_DPOINT_HH
/*! \file mln/core/concept/dpoint.hh
- * \brief This file defines the concept of mln::Dpoint.
+ * \brief Definition of the concept of mln::Dpoint.
*/
# include <mln/core/concept/object.hh>
Index: mln/core/window2d.hh
--- mln/core/window2d.hh (revision 995)
+++ mln/core/window2d.hh (working copy)
@@ -3,7 +3,7 @@
/*! \file mln/core/window2d.hh
*
- * \brief This file defines the mln::window2d alias and its creation
+ * \brief Definition of the mln::window2d alias and of a construction
* routine.
*/
@@ -21,13 +21,13 @@
typedef window_<dpoint2d> window2d;
- /*! \brief Create a 2D window with arbitrary shape.
+ /*! \brief Create an mln::window2d.
*
* \param[in] values Array of Booleans.
*
* \pre The array size, \c M, has to be a square of an odd integer.
*
- * \return A window2d.
+ * \return A 2D window.
*/
template <unsigned M>
window2d mk_window2d(const bool (&values)[M]);
Index: mln/core/dpoint.hh
--- mln/core/dpoint.hh (revision 995)
+++ mln/core/dpoint.hh (working copy)
@@ -3,7 +3,7 @@
/*! \file mln/core/dpoint.hh
*
- * \brief This file defines a generic delta-point class.
+ * \brief Definition of the generic delta-point class mln::dpoint_.
*/
# include <mln/core/concept/dpoint.hh>
@@ -36,7 +36,7 @@
*/
typedef point_<n,C> point;
- /*! Coordinate associated type.
+ /*! \brief Coordinate associated type.
*/
typedef C coord;
Index: mln/core/exact.hh
--- mln/core/exact.hh (revision 995)
+++ mln/core/exact.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_EXACT_HH
/*! \file mln/core/exact.hh
- * \brief This file defines the mln::exact downcast routines.
+ * \brief Definition of the mln::exact downcast routines.
*/
# include <mln/core/concept/object.hh>
Index: mln/core/window.hh
--- mln/core/window.hh (revision 995)
+++ mln/core/window.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_WINDOW_HH
# define MLN_CORE_WINDOW_HH
+/*! \file mln/core/window.hh
+ *
+ * \brief Definition of the generic window class mln::window_.
+ */
+
# include <mln/core/concept/window.hh>
# include <mln/core/internal/set_of.hh>
# include <mln/core/dpoint.hh>
@@ -14,21 +19,50 @@
template <typename D> class dpoints_bkd_piter;
+ /*! \brief Generic window class.
+ *
+ * This type of window is just like a set of delta-points. The
+ * parameter is \c D, type of delta-point.
+ */
template <typename D>
struct window_ : public Window< window_<D> >,
public internal::set_of_<D>
{
+ /*! \brief Piter type to browse the points of a generic window
+ * w.r.t. the ordering of delta-points.
+ */
typedef dpoints_fwd_piter<D> fwd_qiter;
+
+ /*! \brief Piter type to browse the points of a generic window
+ * w.r.t. the reverse ordering of delta-points.
+ */
typedef dpoints_bkd_piter<D> bkd_qiter;
+
+ /*! \brief Same as fwd_qiter.
+ */
typedef fwd_qiter qiter;
+ /*! \brief Constructor without argument.
+ *
+ * The constructed window is empty.
+ */
window_();
+ /*! \brief Test if the window is centered.
+ *
+ * \return True if the delta-point 0 belongs to the window.
+ */
bool is_centered() const;
+
+ /*! \brief Test if the window is symmetric.
+ *
+ * \todo Implementation!
+ */
bool is_symmetric() const;
};
+
# ifndef MLN_INCLUDE_ONLY
template <typename D>
Index: mln/core/contract.hh
--- mln/core/contract.hh (revision 995)
+++ mln/core/contract.hh (working copy)
@@ -2,18 +2,25 @@
# define MLN_CORE_CONTRACT_HH
/*! \file mln/core/contract.hh
- * This file defines the set of contracts.
+ * Definition of the set of contracts.
*/
# include <cassert>
+/// Assertion.
# define mln_assertion(expr) assert(expr)
+/// Invariant.
# define mln_invariant(expr) assert(expr)
+
+/// Precondition.
# define mln_precondition(expr) assert(expr)
+
+/// Postcondition.
# define mln_postcondition(expr) assert(expr)
+/// Implication.
# define mln_implies(lexpr, repxr) assert(not (rexpr) or (lexpr))
Index: mln/core/internal/coord_impl.hh
--- mln/core/internal/coord_impl.hh (revision 995)
+++ mln/core/internal/coord_impl.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_INTERNAL_COORD_IMPL_HH
# define MLN_CORE_INTERNAL_COORD_IMPL_HH
+/*! \file mln/core/internal/coord_impl.hh
+ *
+ * \brief Define some implementation classes for generalized points.
+ */
+
# include <mln/core/concept/object.hh>
@@ -12,6 +17,11 @@
// coord_impl
+ /*! \brief Implementation class to equip generalized points with
+ * explicit access to their coordinates.
+ *
+ * \internal
+ */
template <unsigned n, typename C, typename E>
struct coord_impl_;
Index: mln/core/internal/image_adaptor.hh
--- mln/core/internal/image_adaptor.hh (revision 995)
+++ mln/core/internal/image_adaptor.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_INTERNAL_IMAGE_ADAPTOR_HH
# define MLN_CORE_INTERNAL_IMAGE_ADAPTOR_HH
+/*! \file mln/core/internal/image_adaptor.hh
+ *
+ * \brief Definition of a base class for image adaptors.
+ */
+
# include <mln/core/internal/image_base.hh>
@@ -10,32 +15,54 @@
namespace internal
{
+ /*! \brief A base class for image adaptors.
+ *
+ * \internal
+ */
template <typename I, typename E>
struct image_adaptor_ : public internal::image_base_< mln_pset(I), E >
{
+ /// Psite associated type.
typedef mln_psite(I) psite;
+
+ /// Point_Set associated type.
typedef mln_pset(I) pset;
+ /// Value associated type.
typedef mln_value(I) value;
+
+ /// Return type of read-only access.
typedef mln_rvalue(I) rvalue;
+
+ /// Return type of read-write access.
typedef mln_lvalue(I) lvalue;
+ /// Test if this image has been initialized.
bool has_data() const;
+ /// Test if a pixel value is accessible at \p p.
bool owns_(const psite& p) const;
+
+ /// Give the definition domain.
const pset& domain() const;
+ /// Read-only access of pixel value at point site \p p.
rvalue operator()(const psite& p) const;
+
+ /// Read-write access of pixel value at point site \p p.
lvalue operator()(const psite& p);
protected:
I& adaptee_;
+
+ /// Constructor from an \p adaptee image.
image_adaptor_(Image<I>& adaptee);
};
// FIXME: image_const_adaptor_
+
# ifndef MLN_INCLUDE_ONLY
template <typename I, typename E>
@@ -51,21 +78,21 @@
}
template <typename I, typename E>
- const mln_pset(I)&
+ const image_adaptor_<I,E>::pset&
image_adaptor_<I,E>::domain() const
{
return adaptee_.domain();
}
template <typename I, typename E>
- mln_rvalue(I)
+ typename image_adaptor_<I,E>::rvalue
image_adaptor_<I,E>::operator()(const psite& p) const
{
return adaptee_(p);
}
template <typename I, typename E>
- mln_lvalue(I)
+ typename image_adaptor_<I,E>::lvalue
image_adaptor_<I,E>::operator()(const psite& p)
{
return adaptee_(p);
Index: mln/core/internal/image_base.hh
--- mln/core/internal/image_base.hh (revision 995)
+++ mln/core/internal/image_base.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_INTERNAL_IMAGE_BASE_HH
# define MLN_CORE_INTERNAL_IMAGE_BASE_HH
+/*! \file mln/core/internal/image_base.hh
+ *
+ * \brief Definition of a base class for some images.
+ */
+
# include <mln/core/concept/image.hh>
@@ -10,19 +15,38 @@
namespace internal
{
+ /*! \brief A base class for images.
+ *
+ * \internal
+ */
template <typename S, typename E>
struct image_base_ : public Image<E>
{
+ /// Point_Set associated type.
typedef S pset;
+
+ /// Psite associated type.
typedef mln_psite(S) psite;
+
+ /// Point associated type.
typedef mln_point(S) point;
+ /// Forward Piter associated type.
typedef mln_fwd_piter(S) fwd_piter;
+
+ /// Backward Piter associated type.
typedef mln_bkd_piter(S) bkd_piter;
+
+ /// Piter associated type.
typedef fwd_piter piter;
+ /// Test if \p p belongs to the image domain.
bool has(const psite& p) const;
- bool owns_(const psite& p) const; // default
+
+ /// Test if a pixel value is accessible at \p p.
+ bool owns_(const psite& p) const;
+
+ /// Give a bounding box of the image domain.
const box_<point>& bbox() const;
protected:
Index: mln/core/internal/set_of.hh
--- mln/core/internal/set_of.hh (revision 995)
+++ mln/core/internal/set_of.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_INTERNAL_SET_OF_HH
# define MLN_CORE_INTERNAL_SET_OF_HH
+/*! \file mln/core/internal/set_of.hh
+ *
+ * \brief Definition of mln::set_of_ for internal use only.
+ */
+
# include <vector>
# include <set>
# include <iterator>
@@ -12,30 +17,121 @@
namespace internal
{
+
+ /*! \brief An "efficient" mathematical set class.
+ *
+ * \internal
+ *
+ * This set class is designed to store a mathematical set and to
+ * present it to the user as a linear array.
+ *
+ * Elements are stored by copy.
+ *
+ * \invariant \a v_.size() = s_.size()
+ *
+ * The parameter \c E is the element type, which shall not be
+ * const-qualified.
+ */
template <typename E>
class set_of_
{
public:
+
+ /*! \brief Insert an element \p elt into the set.
+ *
+ * \param[in] elt The element to be inserted.
+ *
+ * If \p elt is already in the set, this method is a no-op.
+ */
void insert(const E& elt);
+
+
+ /*! \brief Return the i-th element of the set.
+ *
+ * \param[in] i Index of the element to retrieve.
+ *
+ * \pre i < nelements()
+ *
+ * The element is returned by reference and is constant.
+ */
const E& element(unsigned i) const;
+
+
+ /*! \brief Return the number of elements of the set.
+ */
unsigned nelements() const;
+
+
+ /*! \brief Test if the object \p elt belongs to the set.
+ *
+ * \param[in] elt A possible element of the set.
+ *
+ * \return True is \p elt is in the set.
+ */
bool has(const E& elt) const;
+
+
+ /*! \brief Test if the set is empty.
+ */
bool is_empty() const;
+
+
+ /*! \brief Make the set empty.
+ *
+ * All elements contained in the set are destroyed so the set is
+ * emptied.
+ *
+ * \post is_empty() = true
+ */
void clear();
+
+ /*! \brief Give access to the set elements.
+ *
+ * The complexity of this method is O(1).
+ *
+ * \return An array (std::vector) of elements.
+ */
const std::vector<E>& vec() const;
+
protected:
+ /*! \brief Array of elements.
+ *
+ * This structure is always up-to-date so that the access method
+ * vec is as fastest as possible.
+ */
std::vector<E> v_;
+
private:
+ /*! \brief Set of elements.
+ *
+ * This is an auxiliary structure.
+ */
std::set<E> s_;
+
+
+ /*! \brief Update both attributes.
+ *
+ * FIXME: explain.
+ */
void update_();
};
+ /*! \brief Print a set \p s into the output stream \p
+ * ostr.
+ *
+ * \param[in,out] ostr An output stream.
+ * \param[in] s A set.
+ *
+ * \return The modified output stream \p ostr.
+ *
+ * \relates mln::internal::set_of_
+ */
template <typename E>
std::ostream& operator<<(std::ostream& ostr, const set_of_<E>& s);
@@ -85,6 +181,7 @@
{
v_.clear();
s_.clear();
+ mln_postcondition(is_empty());
}
template <typename E>
@@ -100,6 +197,7 @@
{
v_.clear();
std::copy(s_.begin(), s_.end(), std::back_inserter(v_));
+ // no s_.clear() here to save some execution time
}
template <typename E>
Index: mln/core/box2d.hh
--- mln/core/box2d.hh (revision 995)
+++ mln/core/box2d.hh (working copy)
@@ -3,7 +3,7 @@
/*! \file mln/core/box2d.hh
*
- * \brief This file defines the mln::box2d alias and construction
+ * \brief Definition of the mln::box2d alias and of construction
* routines.
*/
@@ -16,11 +16,13 @@
/*! \brief Type alias for a box defined on the 2D square grid with
* integer coordinates.
+ *
+ * \see mln::rectangle2d.
*/
typedef box_<point2d> box2d;
- /*! \brief Create a 2D box.
+ /*! \brief Create an mln::box2d.
*
* \param[in] nrows Number of rows.
* \param[in] ncols Number of columns.
@@ -28,19 +30,17 @@
* \pre \p nrows != 0 and \p ncols != 0.
*
* \return A 2D box.
- *
- * \relates mln::box2d
*/
box2d mk_box2d(unsigned nrows, unsigned ncols)
{
- precondition(nrows != 0 and ncols != 0);
+ mln_precondition(nrows != 0 and ncols != 0);
box2d tmp(mk_point2d(0, 0),
mk_point2d(nrows - 1, ncols - 1));
return tmp;
}
- /*! \brief Create a 2D box.
+ /*! \brief Create an mln::box2d.
*
* \overload
*
@@ -52,13 +52,11 @@
* \pre \p max_row >= \p min_row and \p max_col >= \p min_col.
*
* \return A 2D box.
- *
- * \relates mln::box2d
*/
box2d mk_box2d(int min_row, int max_row,
int min_col, int max_col)
{
- precondition(max_row >= min_row and max_col >= min_col);
+ mln_precondition(max_row >= min_row and max_col >= min_col);
box2d tmp(mk_point2d(min_row, min_col),
mk_point2d(max_row, max_col));
return tmp;
Index: mln/core/point2d.hh
--- mln/core/point2d.hh (revision 995)
+++ mln/core/point2d.hh (working copy)
@@ -3,7 +3,7 @@
/*! \file mln/core/point2d.hh
*
- * \brief This file defines the mln::point2d alias and its creation
+ * \brief Definition of the mln::point2d alias and of its construction
* routine.
*/
@@ -19,12 +19,12 @@
typedef point_<2,int> point2d;
- /*! \brief Create a 2D point.
+ /*! \brief Create an mln::point2d.
*
* \param[in] row Index of row.
* \param[in] col Index of column.
*
- * \return A point2d.
+ * \return A 2D point.
*/
point2d mk_point2d(int row, int col)
{
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Extend mln documentation.
* doc/Doxyfile.in (PREDEFINED): Handle some macros.
* mln/core/neighb2d.hh,
* mln/core/dpoint2d.hh,
* mln/core/macros.hh,
* mln/core/box.hh,
* mln/core/point.hh,
* mln/core/rectangle2d.hh,
* mln/core/concept/image.hh,
* mln/core/concept/genpoint.hh,
* mln/core/concept/object.hh,
* mln/core/concept/doc/image.hh,
* mln/core/concept/doc/genpoint.hh,
* mln/core/concept/doc/point_set.hh,
* mln/core/concept/doc/object.hh,
* mln/core/concept/doc/neighborhood.hh,
* mln/core/concept/doc/window.hh,
* mln/core/concept/doc/box.hh,
* mln/core/concept/doc/iterator.hh,
* mln/core/concept/doc/dpoint.hh,
* mln/core/concept/neighborhood.hh,
* mln/core/concept/box.hh,
* mln/core/concept/point.hh,
* mln/core/concept/dpoint.hh,
* mln/core/window2d.hh,
* mln/core/dpoint.hh,
* mln/core/ops.hh,
* mln/core/exact.hh,
* mln/core/box2d.hh,
* mln/core/point2d.hh: Add extra documentation.
doc/Doxyfile.in | 10 +-
mln/core/box.hh | 118 +++++++++++++++++++++++++++++++----
mln/core/box2d.hh | 39 +++++++++++
mln/core/concept/box.hh | 19 +++++
mln/core/concept/doc/box.hh | 24 +++----
mln/core/concept/doc/dpoint.hh | 33 ++++++++-
mln/core/concept/doc/genpoint.hh | 3
mln/core/concept/doc/image.hh | 94 ++++++++++++++++++++++++++-
mln/core/concept/doc/iterator.hh | 20 +++--
mln/core/concept/doc/neighborhood.hh | 16 ++++
mln/core/concept/doc/object.hh | 1
mln/core/concept/doc/point_set.hh | 5 -
mln/core/concept/doc/window.hh | 4 +
mln/core/concept/dpoint.hh | 70 +++++++++++++++++++-
mln/core/concept/genpoint.hh | 37 ++++------
mln/core/concept/image.hh | 9 ++
mln/core/concept/neighborhood.hh | 9 ++
mln/core/concept/object.hh | 11 +++
mln/core/concept/point.hh | 13 ++-
mln/core/dpoint.hh | 39 +++++++++++
mln/core/dpoint2d.hh | 17 +++++
mln/core/exact.hh | 24 +++++--
mln/core/macros.hh | 6 -
mln/core/neighb2d.hh | 49 ++++++++++++++
mln/core/ops.hh | 23 +++++-
mln/core/point.hh | 39 +++++++++++
mln/core/point2d.hh | 17 +++++
mln/core/rectangle2d.hh | 1
mln/core/window2d.hh | 18 +++++
29 files changed, 667 insertions(+), 101 deletions(-)
Index: doc/Doxyfile.in
--- doc/Doxyfile.in (revision 994)
+++ doc/Doxyfile.in (working copy)
@@ -1041,7 +1041,10 @@
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
-PREDEFINED =
+PREDEFINED = \
+ "mln_coord(T)=typename T::coord" \
+ "mln_point(T)=typename T::point" \
+ "mln_dpoint(T)=typename T::dpoint"
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES
# then this tag can be used to specify a list of macro names that
@@ -1049,10 +1052,7 @@
# sources will be used. Use the PREDEFINED tag if you want to use a
# different macro definition.
-EXPAND_AS_DEFINED = \
- mln_point \
- mln_dpoint \
- mln_coord
+EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
Index: mln/core/neighb2d.hh
--- mln/core/neighb2d.hh (revision 994)
+++ mln/core/neighb2d.hh (working copy)
@@ -1,6 +1,12 @@
#ifndef MLN_CORE_NEIGHB2D_HH
# define MLN_CORE_NEIGHB2D_HH
+/*! \file mln/core/neighb2d.hh
+ *
+ * \brief This file defines the mln::neighb2d alias and some classical
+ * 2D neighborhoods.
+ */
+
# include <cmath>
# include <mln/core/neighb.hh>
# include <mln/core/dpoint2d.hh>
@@ -9,14 +15,57 @@
namespace mln
{
+ /*! \brief Type alias for a neighborhood defined on the 2D square
+ * grid with integer coordinates.
+ */
typedef neighb_<dpoint2d> neighb2d;
+
+ /*! \brief 4-connectivity neighborhood on the 2D grid.
+ *
+ * - o -
+ * o x o
+ * - o -
+ *
+ * \return A neighb2d.
+ */
const neighb2d& c4();
+
+
+ /*! \brief 8-connectivity neighborhood on the 2D grid.
+ *
+ * o o o
+ * o x o
+ * o o o
+ *
+ * \return A neighb2d.
+ */
const neighb2d& c8();
+
+
+ /*! \brief Horizontal 2-connectivity neighborhood on the 2D grid.
+ *
+ * - - -
+ * o x o
+ * - - -
+ *
+ * \return A neighb2d.
+ */
const neighb2d& c2_row();
+
+
+ /*! \brief Vertical 2-connectivity neighborhood on the 2D grid.
+ *
+ * - o -
+ * - x -
+ * - o -
+ *
+ * \return A neighb2d.
+ */
const neighb2d& c2_col();
+
# ifndef MLN_INCLUDE_ONLY
const neighb2d& c4()
Index: mln/core/dpoint2d.hh
--- mln/core/dpoint2d.hh (revision 994)
+++ mln/core/dpoint2d.hh (working copy)
@@ -1,14 +1,31 @@
#ifndef MLN_CORE_DPOINT2D_HH
# define MLN_CORE_DPOINT2D_HH
+/*! \file mln/core/dpoint2d.hh
+ *
+ * \brief This file defines the mln::dpoint2d alias and its creation
+ * routine.
+ */
+
# include <mln/core/dpoint.hh>
namespace mln
{
+ /*! \brief Type alias for a delta-point defined on the 2D square
+ * grid with integer coordinates.
+ */
typedef dpoint_<2,int> dpoint2d;
+
+ /*! \brief Create a 2D delta-point.
+ *
+ * \param[in] row Index of row.
+ * \param[in] col Index of column.
+ *
+ * \return A dpoint2d.
+ */
dpoint2d mk_dpoint2d(int row, int col)
{
dpoint2d tmp;
Index: mln/core/macros.hh
--- mln/core/macros.hh (revision 994)
+++ mln/core/macros.hh (working copy)
@@ -5,11 +5,11 @@
* This file defines the set of milena macros.
*/
-/*! \def mln_point(T)
+/*! \def mln_point
*/
-# define mln_point(T) typename T::point
+# define mln_point typename T::point
-/*! \def mln_dpoint(T)
+/*! \def mln_dpoint
*/
# define mln_dpoint(T) typename T::dpoint
Index: mln/core/box.hh
--- mln/core/box.hh (revision 994)
+++ mln/core/box.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_BOX_HH
# define MLN_CORE_BOX_HH
+/*! \file mln/core/box.hh
+ *
+ * \brief This file defines a generic box class.
+ */
+
# include <mln/core/concept/box.hh>
# include <mln/core/point.hh>
@@ -13,33 +18,126 @@
template <typename P> struct box_bkd_piter_;
+ /*! \brief Generic box class.
+ *
+ * Parameter \c P is the corresponding type of point.
+ */
template <typename P>
struct box_ : public Box< box_<P> >
{
+ /*! \brief Psite associated type.
+ */
typedef P psite;
+
+ /*! \brief Point associated type.
+ */
typedef P point;
+ /*! \brief Forward Piter associated type.
+ */
typedef box_fwd_piter_<P> fwd_piter;
+
+ /*! \brief Backward Piter associated type.
+ */
typedef box_bkd_piter_<P> bkd_piter;
+
+ /*! \brief Piter associated type.
+ */
typedef fwd_piter piter;
- P pmin() const { return pmin_; }
- P& pmin() { return pmin_; }
+ /*! \brief Minimum point.
+ */
+ P pmin() const;
+
+ /*! \brief Reference to the minimum point.
+ */
+ P& pmin();
+
+ /*! \brief Maximum point.
+ */
+ P pmax() const;
+
+ /*! \brief Reference to the maximum point.
+ */
+ P& pmax();
+
+ /*! \brief Constructor without argument.
+ */
+ box_();
+
+ /*! \brief Constructor of a box going from \p pmin to \p pmax.
+ */
+ box_(const point& pmin, const point& pmax);
+
+ /*! \brief Test if \p p belongs to the box.
+ *
+ * \param[in] p A point site.
+ */
+ bool has(const P& p) const;
+
+ protected:
+ P pmin_, pmax_;
+ };
+
+
+ /*! \brief Print a generic box \p b into the output stream \p ostr.
+ *
+ * \param[in,out] ostr An output stream.
+ * \param[in] b A generic box.
+ *
+ * \return The modified output stream \p ostr.
+ *
+ * \relates mln::box_
+ */
+ template <typename P>
+ std::ostream& operator<<(std::ostream& ostr, const box_<P>& b);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename P>
+ P
+ box_<P>::pmin() const
+ {
+ return pmin_;
+ }
+
+ template <typename P>
+ P&
+ box_<P>::pmin()
+ {
+ return pmin_;
+ }
- P pmax() const { return pmax_; }
- P& pmax() { return pmax_; }
+ template <typename P>
+ P
+ box_<P>::pmax() const
+ {
+ return pmax_;
+ }
+
+ template <typename P>
+ P&
+ box_<P>::pmax()
+ {
+ return pmax_;
+ }
- box_()
+ template <typename P>
+ box_<P>::box_()
{
}
- box_(const point& pmin, const point& pmax)
+ template <typename P>
+ box_<P>::box_(const point& pmin, const point& pmax)
: pmin_(pmin),
pmax_(pmax)
{
}
- bool has(const P& p) const
+ template <typename P>
+ bool
+ box_<P>::has(const P& p) const
{
for (unsigned i = 0; i < P::dim; ++i)
if (p[i] < pmin_[i] or p[i] > pmax_[i])
@@ -47,17 +145,13 @@
return true;
}
- protected:
- P pmin_, pmax_;
- };
-
-
template <typename P>
std::ostream& operator<<(std::ostream& ostr, const box_<P>& b)
{
return ostr << "[" << b.pmin() << ".." << b.pmax() << ']';
}
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln
Index: mln/core/point.hh
--- mln/core/point.hh (revision 994)
+++ mln/core/point.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_POINT_HH
# define MLN_CORE_POINT_HH
+/*! \file mln/core/point.hh
+ *
+ * \brief This file defines a generic point class.
+ */
+
# include <mln/core/concept/point.hh>
# include <mln/core/internal/coord_impl.hh>
@@ -12,19 +17,51 @@
template <unsigned n, typename C> struct dpoint_;
+ /*! \brief Generic point class.
+ *
+ * Parameters are \c n the dimension of the space and \c C the
+ * coordinate type in this space.
+ */
template <unsigned n, typename C>
struct point_ : public Point< point_<n,C> >,
public internal::mutable_coord_impl_< n, C, point_<n,C> >
{
+ /*! \var dim
+ * \brief Dimension of the space.
+ * \invariant dim > 0
+ */
enum { dim = n };
- typedef C coord;
+
+ /*! \brief Dpoint associated type.
+ */
typedef dpoint_<n,C> dpoint;
+ /*! Coordinate associated type.
+ */
+ typedef C coord;
+
+ /*! \brief Read-only access to the \p i-th coordinate value.
+ * \param[in] i The coordinate index.
+ * \pre \p i < \c dim
+ */
C operator[](unsigned i) const;
+
+ /*! \brief Read-write access to the \p i-th coordinate value.
+ * \param[in] i The coordinate index.
+ * \pre \p i < \c dim
+ */
C& operator[](unsigned i);
+ /*! \brief Constructor without argument.
+ */
point_();
+
+ /*! \brief Constructor; all coordinates are set to the value \p c.
+ */
point_(C c);
+
+ /*! \brief Set all coordinates to the value \p c.
+ */
void set_all(C c);
protected:
Index: mln/core/rectangle2d.hh
--- mln/core/rectangle2d.hh (revision 994)
+++ mln/core/rectangle2d.hh (working copy)
@@ -10,6 +10,7 @@
namespace mln
{
+ // FIXME: doc.
struct rectangle2d : public Window< rectangle2d >,
public internal::set_of_<dpoint2d>
{
Index: mln/core/concept/image.hh
--- mln/core/concept/image.hh (revision 994)
+++ mln/core/concept/image.hh (working copy)
@@ -1,12 +1,21 @@
#ifndef MLN_CORE_CONCEPT_IMAGE_HH
# define MLN_CORE_CONCEPT_IMAGE_HH
+/*! \file mln/core/concept/image.hh
+ * \brief This file defines the concept of mln::Image.
+ */
+
# include <mln/core/concept/point_set.hh>
namespace mln
{
+ /*! \brief Base class for implementation of image classes.
+ *
+ * \see mln::doc::Image for a complete documentation of this class
+ * contents.
+ */
template <typename E>
struct Image : public Object<E>
{
Index: mln/core/concept/genpoint.hh
--- mln/core/concept/genpoint.hh (revision 994)
+++ mln/core/concept/genpoint.hh (working copy)
@@ -57,8 +57,8 @@
/*! \brief Equality comparison between a couple of generalized point \p lhs
* and \p rhs.
*
- * @param[in] lhs A first generalized point.
- * @param[in] rhs A second generalized point.
+ * \param[in] lhs A first generalized point.
+ * \param[in] rhs A second generalized point.
*
* \pre Both \p lhs and \p rhs have to be defined on the same
* topology; otherwise this test does not compile.
@@ -73,10 +73,10 @@
/*! \brief Ordering "less than" comparison between a couple of generalized
- * point \p lhs and \p rhs.
+ * points \p lhs and \p rhs.
*
- * @param[in] lhs A first generalized point.
- * @param[in] rhs A second generalized point.
+ * \param[in] lhs A first generalized point.
+ * \param[in] rhs A second generalized point.
*
* This test is based on a lexicographical ordering over coordinates.
*
@@ -99,8 +99,8 @@
/*! \brief Difference between a couple of generalized point \p lhs and \p
* rhs.
*
- * @param[in] lhs A first generalized point.
- * @param[in] rhs A second generalized point.
+ * \param[in] lhs A first generalized point.
+ * \param[in] rhs A second generalized point.
*
* \warning There is no type promotion in milena so the client
* has to make sure that both points are defined with the same
@@ -112,7 +112,7 @@
*
* \post The result, \p dp, is such as \p lhs = \p rhs + \p dp.
*
- * \return A delta-point.
+ * \return A delta-point (temporary object).
*
* \see mln::Dpoint
* \relates mln::GenPoint
@@ -124,13 +124,13 @@
/*! \brief Add a delta-point \p rhs to a generalized point \p lhs.
*
- * @param[in] lhs A generalized point.
- * @param[in] rhs A delta-point.
+ * \param[in] lhs A generalized point.
+ * \param[in] rhs A delta-point.
*
* The type of \p rhs has to be exactly the delta-point type
* associated with the type of \p lhs.
*
- * \return A new point (temporary object).
+ * \return A point (temporary object).
*
* \see mln::Dpoint
* \relates mln::GenPoint
@@ -146,19 +146,12 @@
/*! \brief Print a generalized point \p p into the output stream \p
* ostr.
*
- * @param[in,out] ostr An output stream.
- * @param[in] p A generalized point.
+ * \param[in,out] ostr An output stream.
+ * \param[in] p A generalized point.
*
- * The type of \p rhs has to be exactly the delta-point type
- * associated with the type of \p lhs.
- *
- * \return The modified output stream.
+ * \return The modified output stream \p ostr.
*
- * \see mln::Dpoint
* \relates mln::GenPoint
- *
- * \todo Introduce the notion of "generalized dpoint" and
- * add the more general extra operator+(GenPoint, GenDpoint).
*/
template <typename P>
std::ostream& operator<<(std::ostream& ostr, const GenPoint<P>& p);
@@ -208,7 +201,6 @@
return false;
}
-
template <typename Pl, typename Pr>
mln_dpoint(Pl)
operator-(const GenPoint<Pl>& lhs, const GenPoint<Pr>& rhs)
@@ -225,7 +217,6 @@
return tmp;
}
-
template <typename P>
mln_point(P)
operator+(const GenPoint<P>& lhs, const mln_dpoint(P)& rhs)
Index: mln/core/concept/object.hh
--- mln/core/concept/object.hh (revision 994)
+++ mln/core/concept/object.hh (working copy)
@@ -11,6 +11,17 @@
# include <mln/core/macros.hh>
+/*! \namespace mln
+ * \brief The namespace mln corresponds to the Milena (mini-Olena) project.
+ *
+ * The contents of mln mimics the contents of the olena project but
+ * in a simplified way. Some classes have the same name in both
+ * projects and roughly have the same behavior.
+ *
+ * \warning The Milena project is independent from the Olena
+ * project; the user has to choose between both the project she
+ * wants to work with.
+ */
namespace mln
{
Index: mln/core/concept/doc/image.hh
--- mln/core/concept/doc/image.hh (revision 994)
+++ mln/core/concept/doc/image.hh (working copy)
@@ -1,5 +1,5 @@
/*! \file mln/core/concept/doc/image.hh
- * This file documents the concept of mln::Image.
+ * \brief This file documents the concept of mln::Image.
*/
namespace mln
@@ -8,26 +8,69 @@
namespace doc
{
- /*! Documentation class for mln::Image.
+ /*! \brief Documentation class for mln::Image.
* \see mln::Image
*/
template <typename E>
struct Image : public Object<E>
{
- // to be provided in concrete image classes:
-
+ /*! \brief Value associated type.
+ *
+ * \invariant This type is neither qualified by const, nor by
+ * reference.
+ */
typedef void value;
+
+ /*! \brief Type returned by the read pixel value operator.
+ */
typedef void rvalue;
+
+ /*! \brief Type returned by the read-write pixel value operator.
+ */
typedef void lvalue;
+ /*! \brief Test if the image have been initialized.
+ */
bool has_data() const;
- bool owns_(const psite& p) const; // default is like "has(p)"
+ /*! \brief Test if the image owns the poinst site \p p.
+ *
+ * \return True if accessing the image value at \p p is
+ * possible, that is, does not abort the execution.
+ */
+ bool owns_(const psite& p) const;
+
+ /*! \brief Give the definition domain of the image.
+ *
+ * \return A reference to the domain point set.
+ */
const pset& domain() const;
+ /*! \brief Read access to the image value located at \p p.
+ *
+ * \param[in] p A point site.
+ *
+ * \pre The image has to own the site \p p.
+ *
+ * \return The value at \p p.
+ */
rvalue operator()(const psite& p) const;
+
+ /*! \brief Read-write access to the image value located at \p p.
+ *
+ * \param[in] p A point site.
+ *
+ * \pre The image has to own the site \p p.
+ *
+ * \return The value at \p p.
+ */
lvalue operator()(const psite& p);
+
+
+ /*! \brief Trait that gives the corresponding image type with
+ the value type changes to T.
+ */
template <typename T>
struct change_value
{
@@ -35,17 +78,56 @@
};
- // provided by internal::image_base_:
+ /*! \brief Point set associated type.
+ * \invariant This type has to derive from mln::Point_Set.
+ */
typedef void pset;
+
+ /*! \brief Point associated type.
+ * \invariant This type has to derive from mln::Point.
+ */
typedef void point;
+
+ /*! \brief Psite associated type.
+ * \invariant This type has to derive from mln::Psite.
+ */
typedef void psite;
+ /*! \brief Piter associated type.
+ * \invariant This type has to derive from mln::Piter.
+ */
typedef void piter;
+
+ /*! \brief Forward point iterator associated type.
+ * \invariant This type has to derive from mln::Piter.
+ */
typedef void fwd_piter;
+
+ /*! \brief Backward point iterator associated type.
+ * \invariant This type has to derive from mln::Piter.
+ */
typedef void bkd_piter;
+ /*! \brief Test if \p p belongs to the image domain.
+ *
+ * \param[in] p A point site.
+ *
+ * \return True if \p p belongs to the image domain.
+ *
+ * \invariant has(p) is true => owns_(p) is also true.
+ */
bool has(const psite& p) const;
+
+ /*! \brief Give a bounding box of the image domain.
+ *
+ * This bounding box may be larger than the smallest bounding
+ * box (the optimal one). Practically an image type is not
+ * obliged to update its bounding box so that it is always
+ * optimal.
+ *
+ * \return A bounding box of the image domain.
+ */
const box_<point>& bbox() const;
};
Index: mln/core/concept/doc/genpoint.hh
--- mln/core/concept/doc/genpoint.hh (revision 994)
+++ mln/core/concept/doc/genpoint.hh (working copy)
@@ -9,6 +9,7 @@
{
/*! \brief Documentation class for mln::GenPoint.
+ *
* \see mln::GenPoint
*/
template <typename E>
@@ -50,7 +51,7 @@
/*! \brief Read-only access to the \p i-th coordinate value.
*
- * @param[in] i The coordinate index.
+ * \param[in] i The coordinate index.
*
* \pre \p i < \c dim
*
Index: mln/core/concept/doc/point_set.hh
--- mln/core/concept/doc/point_set.hh (revision 994)
+++ mln/core/concept/doc/point_set.hh (working copy)
@@ -9,6 +9,7 @@
{
/*! \brief Documentation class for mln::Point_Set.
+ *
* \see mln::Point_Set
*/
template <typename E>
@@ -34,9 +35,9 @@
*/
typedef void bkd_piter;
- /*! \brief Test if the \p p belongs to this point set.
+ /*! \brief Test if \p p belongs to this point set.
*
- * @param[in] p A point site.
+ * \param[in] p A point site.
* \return True if \p p is an element of the point set.
*/
bool has(const psite& p) const;
Index: mln/core/concept/doc/object.hh
--- mln/core/concept/doc/object.hh (revision 994)
+++ mln/core/concept/doc/object.hh (working copy)
@@ -4,6 +4,7 @@
namespace mln
{
+
/*! \namespace mln::doc
* \brief The namespace mln::doc is only for documentation purpose.
*
Index: mln/core/concept/doc/neighborhood.hh
--- mln/core/concept/doc/neighborhood.hh (revision 994)
+++ mln/core/concept/doc/neighborhood.hh (working copy)
@@ -1,5 +1,5 @@
/*! \file mln/core/concept/doc/neighborhood.hh
- * This file documents the concept of mln::Neighborhood.
+ * \brief This file documents the concept of mln::Neighborhood.
*/
namespace mln
@@ -8,14 +8,26 @@
namespace doc
{
- /*! Documentation class for mln::Neighborhood.
+ /*! \brief Documentation class for mln::Neighborhood.
+ *
* \see mln::Neighborhood
*/
template <typename E>
struct Neighborhood : public Object<E>
{
+ /*! \brief Piter type associated to this neighborhood to browse
+ * neighbors.
+ */
typedef void niter;
+
+ /*! \brief Piter type associated to this neighborhood to browse
+ * neighbors in a forward way.
+ */
typedef void fwd_niter;
+
+ /*! \brief Piter type associated to this neighborhood to browse
+ * neighbors in a backward way.
+ */
typedef void bkd_niter;
};
Index: mln/core/concept/doc/window.hh
--- mln/core/concept/doc/window.hh (revision 994)
+++ mln/core/concept/doc/window.hh (working copy)
@@ -9,6 +9,10 @@
{
/*! \brief Documentation class for mln::Window.
+ *
+ * A window is the definition of a set of points located around a
+ * central point.
+ *
* \see mln::Window
*/
template <typename E>
Index: mln/core/concept/doc/box.hh
--- mln/core/concept/doc/box.hh (revision 994)
+++ mln/core/concept/doc/box.hh (working copy)
@@ -1,5 +1,5 @@
/*! \file mln/core/concept/doc/box.hh
- * This file documents the concept of mln::Box.
+ * \brief This file documents the concept of mln::Box.
*/
namespace mln
@@ -8,29 +8,29 @@
namespace doc
{
- /*! Documentation class for mln::Box.
+ /*! \brief Documentation class for mln::Box.
* \see mln::Box
*/
template <typename E>
struct Box : public Point_Set<E>
{
- /*! \fn const point& pmin() const
+ /*! \brief Return the box "minimum" point.
*
- * Return the minimum point w.r.t. the ordering between points.
- *
- * In 2D this minimum is the top left point of the box.
+ * Return the "minimum" point w.r.t. the ordering between points.
+ * For instance, with mln::box2d, this minimum is the top left
+ * point of the box.
*/
const point& pmin() const;
- /*! \fn const point& pmax() const
- *
- * Return the maximum point w.r.t. the ordering between points.
+ /*! \brief Return the box "maximum" point.
*
- * In 2D this maximum is the bottom right point of the box.
+ * Return the "maximum" point w.r.t. the ordering between points.
+ * For instance, with mln::box2d, this maximum is the bottom
+ * right point of the box.
*/
const point& pmax() const;
- /*! \fn const E& bbox() const
+ /*! \brief Return the bounding box of this point set.
*
* Return the bounding box of this point set, so that is itself.
* This method is declared by the mln::Point_Set concept.
@@ -39,7 +39,7 @@
*/
const E& bbox() const;
- /*! \fn std::size_t npoints() const
+ /*! \brief Return the number of points of this box.
*
* Return the number of points of this box. This method is
* declared by the mln::Point_Set concept.
Index: mln/core/concept/doc/iterator.hh
--- mln/core/concept/doc/iterator.hh (revision 994)
+++ mln/core/concept/doc/iterator.hh (working copy)
@@ -1,5 +1,5 @@
/*! \file mln/core/concept/doc/iterator.hh
- * This file documents the concept of mln::Iterator.
+ * \brief This file documents the concept of mln::Iterator.
*/
@@ -9,27 +9,33 @@
namespace doc
{
- /*! Documentation class for mln::Iterator.
+ /*! \brief Documentation class for mln::Iterator.
* \see mln::Iterator
*/
template <typename E>
struct Iterator : public Object<E>
{
- /*! Returns true if the iterator is valid, that is, designates
+ /*! \brief Returns true if the iterator is valid, that is, designates
* an element.
*/
bool is_valid() const;
- /*! Invalidate the iterator.
+ /*! \brief Invalidate the iterator.
*/
void invalidate();
- /*! Start an iteration, that is, make the iterator designate the
- * first element if it exists.
+ /*! \brief Start an iteration.
+ *
+ * Make the iterator designate the first element if it exists.
+ * If this first element does not exist, the iterator is not
+ * valid.
*/
void start();
- /*! Make the iterator designate the next element.
+ /*! \brief Go to the next element.
+ *
+ * Make the iterator jump from the current element to the next
+ * one. The current element is thus updated.
*/
void next_();
Index: mln/core/concept/doc/dpoint.hh
--- mln/core/concept/doc/dpoint.hh (revision 994)
+++ mln/core/concept/doc/dpoint.hh (working copy)
@@ -1,5 +1,5 @@
/*! \file mln/core/concept/doc/dpoint.hh
- * This file documents the concept of mln::Dpoint.
+ * \brief This file documents the concept of mln::Dpoint.
*/
namespace mln
@@ -8,15 +8,40 @@
namespace doc
{
- /*! Documentation class for mln::Dpoint.
+ /*! \brief Documentation class for mln::Dpoint.
* \see mln::Dpoint
*/
template <typename E>
struct Dpoint : public Object<E>
{
- typedef point;
- typedef coord;
+ /*! \var dim
+ * \brief Dimension of the space.
+ * \invariant dim > 0
+ */
enum { dim };
+
+ /*! \brief Point associated type.
+ * \invariant This type has to derive from mln::Point.
+ */
+ typedef void point;
+
+ /*! \brief Dpoint associated type.
+ * \invariant This type has to derive from mln::Dpoint.
+ */
+ typedef void dpoint;
+
+ /*! Coordinate associated type.
+ */
+ typedef void coord;
+
+ /*! \brief Read-only access to the \p i-th coordinate value.
+ *
+ * \param[in] i The coordinate index.
+ *
+ * \pre \p i < \c dim
+ *
+ * \return The value of the \p i-th coordinate.
+ */
coord operator[](unsigned i) const;
};
Index: mln/core/concept/neighborhood.hh
--- mln/core/concept/neighborhood.hh (revision 994)
+++ mln/core/concept/neighborhood.hh (working copy)
@@ -1,12 +1,21 @@
#ifndef MLN_CORE_CONCEPT_NEIGHBORHOOD_HH
# define MLN_CORE_CONCEPT_NEIGHBORHOOD_HH
+/*! \file mln/core/concept/neighborhood.hh
+ * \brief This file defines the concept of mln::Neighborhood.
+ */
+
# include <mln/core/concept/object.hh>
namespace mln
{
+ /*! \brief Base class for implementation classes that are neighborhoods.
+ *
+ * \see mln::doc::Neighborhood for a complete documentation of this
+ * class contents.
+ */
template <typename E>
struct Neighborhood : public Object<E>
{
Index: mln/core/concept/box.hh
--- mln/core/concept/box.hh (revision 994)
+++ mln/core/concept/box.hh (working copy)
@@ -27,8 +27,23 @@
const point& pmax() const;
*/
- const E& bbox() const; //! final; \see mln::doc::Box::bbox
- std::size_t npoints() const; //! final; \see mln::doc::Box::npoints
+ /*! \brief Return the bounding box of this point set.
+ *
+ * Return the bounding box of this point set, so that is itself.
+ * This method is declared by the mln::Point_Set concept.
+ *
+ * \warning This method is final for all box classes.
+ */
+ const E& bbox() const;
+
+ /*! \brief Return the number of points of this box.
+ *
+ * Return the number of points of this box. This method is
+ * declared by the mln::Point_Set concept.
+ *
+ * \warning This method is final for all box classes.
+ */
+ std::size_t npoints() const;
protected:
Box();
Index: mln/core/concept/point.hh
--- mln/core/concept/point.hh (revision 994)
+++ mln/core/concept/point.hh (working copy)
@@ -13,7 +13,10 @@
/*! \brief Base class for implementation of point classes.
*
- * A point is a vector in a space.
+ * A point is an element of a space.
+ *
+ * For instance, mln::point2d is the type of elements defined on the
+ * discrete square grid of the 2D plane.
*/
template <typename P>
struct Point : public Psite<P>
@@ -33,8 +36,8 @@
/*! \brief Add a delta-point \p rhs to a point \p lhs.
*
- * @param[in,out] lhs The targeted point.
- * @param[in] rhs A delta-point.
+ * \param[in,out] lhs The targeted point.
+ * \param[in] rhs A delta-point.
*
* \pre The type of \p rhs has to be the Dpoint type associated with
* the type of \p lhs; otherwise this test does not compile.
@@ -50,8 +53,8 @@
/*! \brief Remove a delta-point \p rhs to a point \p lhs.
*
- * @param[in,out] lhs The targeted point.
- * @param[in] rhs A delta-point.
+ * \param[in,out] lhs The targeted point.
+ * \param[in] rhs A delta-point.
*
* \pre The type of \p rhs has to be the Dpoint type associated with
* the type of \p lhs; otherwise this test does not compile.
Index: mln/core/concept/dpoint.hh
--- mln/core/concept/dpoint.hh (revision 994)
+++ mln/core/concept/dpoint.hh (working copy)
@@ -1,6 +1,10 @@
#ifndef MLN_CORE_CONCEPT_DPOINT_HH
# define MLN_CORE_CONCEPT_DPOINT_HH
+/*! \file mln/core/concept/dpoint.hh
+ * \brief This file defines the concept of mln::Dpoint.
+ */
+
# include <mln/core/concept/object.hh>
@@ -8,6 +12,16 @@
{
+ /*! \brief Base class for implementation of delta-point classes.
+ *
+ * A delta-point is a vector defined by a couple of points.
+ *
+ * Given two points, A and B, the vector AB is mapped into the
+ * delta-point D = AB. Practically one can write: D = B - A.
+ *
+ * \see mln::doc::Dpoint for a complete documentation of this class
+ * contents.
+ */
template <typename E>
struct Dpoint : public Object<E>
{
@@ -23,15 +37,65 @@
};
+ /*! \brief Give the negate of the delta-point \p rhs.
+ *
+ * \param[in] rhs The targeted delta-point.
+ *
+ * \invariant For all delta-point dp, we have: -(-dp) = dp.
+ *
+ * \return A delta-point (temporary object).
+ *
+ * \relates mln::Dpoint
+ */
template <typename D>
- D operator-(const Dpoint<D>& dp);
+ D operator-(const Dpoint<D>& rhs);
+
+ /*! \brief Equality comparison between a couple of delta-point \p lhs
+ * and \p rhs.
+ *
+ * \param[in] lhs A first delta-point.
+ * \param[in] rhs A second delta-point.
+ *
+ * \pre Both \p lhs and \p rhs have to be defined on the same
+ * topology; otherwise this test does not compile.
+ *
+ * \return True if both delta-points have the same coordinates,
+ * otherwise false.
+ *
+ * \relates mln::Dpoint
+ */
template <typename Dl, typename Dr>
bool operator=(const Dpoint<Dl>& lhs, const Dpoint<Dr>& rhs);
+
+ /*! \brief Ordering "less than" comparison between a couple of
+ * delta-points \p lhs and \p rhs.
+ *
+ * \param[in] lhs A first delta-point.
+ * \param[in] rhs A second delta-point.
+ *
+ * \pre Both \p lhs and \p rhs have to be defined on the same
+ * topology; otherwise this test does not compile.
+ *
+ * \return True if both delta-points have the same coordinates,
+ * otherwise false.
+ *
+ * \relates mln::Dpoint
+ */
template <typename Dl, typename Dr>
bool operator<(const Dpoint<Dl>& lhs, const Dpoint<Dr>& rhs);
+
+ /*! \brief Print a delta-point \p p into the output stream \p ostr.
+ *
+ * \param[in,out] ostr An output stream.
+ * \param[in] dp A delta-point.
+ *
+ * \return The modified output stream \p ostr.
+ *
+ * \relates mln::Dpoint
+ */
template <typename D>
std::ostream& operator<<(std::ostream& ostr, const Dpoint<D>& dp);
@@ -50,11 +114,11 @@
}
template <typename D>
- D operator-(const Dpoint<D>& dp)
+ D operator-(const Dpoint<D>& rhs)
{
D tmp;
for (unsigned i = 0; i < D::dim; ++i)
- tmp[i] = - exact(dp)[i];
+ tmp[i] = - exact(rhs)[i];
return tmp;
}
Index: mln/core/window2d.hh
--- mln/core/window2d.hh (revision 994)
+++ mln/core/window2d.hh (working copy)
@@ -1,6 +1,12 @@
#ifndef MLN_CORE_WINDOW2D_HH
# define MLN_CORE_WINDOW2D_HH
+/*! \file mln/core/window2d.hh
+ *
+ * \brief This file defines the mln::window2d alias and its creation
+ * routine.
+ */
+
# include <cmath>
# include <mln/core/window.hh>
# include <mln/core/dpoint2d.hh>
@@ -9,8 +15,20 @@
namespace mln
{
+ /*! \brief Type alias for a window with arbitrary shape, defined on
+ * the 2D square grid with integer coordinates.
+ */
typedef window_<dpoint2d> window2d;
+
+ /*! \brief Create a 2D window with arbitrary shape.
+ *
+ * \param[in] values Array of Booleans.
+ *
+ * \pre The array size, \c M, has to be a square of an odd integer.
+ *
+ * \return A window2d.
+ */
template <unsigned M>
window2d mk_window2d(const bool (&values)[M]);
Index: mln/core/dpoint.hh
--- mln/core/dpoint.hh (revision 994)
+++ mln/core/dpoint.hh (working copy)
@@ -1,6 +1,11 @@
#ifndef MLN_CORE_DPOINT_HH
# define MLN_CORE_DPOINT_HH
+/*! \file mln/core/dpoint.hh
+ *
+ * \brief This file defines a generic delta-point class.
+ */
+
# include <mln/core/concept/dpoint.hh>
# include <mln/core/internal/coord_impl.hh>
@@ -12,19 +17,51 @@
template <unsigned n, typename C> struct point_;
+ /*! \brief Generic delta-point class.
+ *
+ * Parameters are \c n the dimension of the space and \c C the
+ * coordinate type in this space.
+ */
template <unsigned n, typename C>
struct dpoint_ : public Dpoint< dpoint_<n,C> >,
public internal::mutable_coord_impl_< n, C, dpoint_<n,C> >
{
+ /*! \var dim
+ * \brief Dimension of the space.
+ * \invariant dim > 0
+ */
enum { dim = n };
- typedef C coord;
+
+ /*! \brief Point associated type.
+ */
typedef point_<n,C> point;
+ /*! Coordinate associated type.
+ */
+ typedef C coord;
+
+ /*! \brief Read-only access to the \p i-th coordinate value.
+ * \param[in] i The coordinate index.
+ * \pre \p i < \c dim
+ */
C operator[](unsigned i) const;
+
+ /*! \brief Read-write access to the \p i-th coordinate value.
+ * \param[in] i The coordinate index.
+ * \pre \p i < \c dim
+ */
C& operator[](unsigned i);
+ /*! \brief Constructor without argument.
+ */
dpoint_();
+
+ /*! \brief Constructor; all coordinates are set to the value \p c.
+ */
dpoint_(C c);
+
+ /*! \brief Set all coordinates to the value \p c.
+ */
void set_all(C c);
protected:
Index: mln/core/ops.hh
--- mln/core/ops.hh (revision 994)
+++ mln/core/ops.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_OPS_HH
/*! \file mln/core/ops.hh
- * Default definitions of some operators.
+ * \brief Definitions of some operators.
*/
# include <mln/core/concept/object.hh>
@@ -12,7 +12,9 @@
namespace mln
{
- /*! The "not equal to" operator is here defined for every milena
+ /*! \brief General definition of the "not equal to" operator.
+ *
+ * The "not equal to" operator is here defined for every milena
* objects. It relies on the definition of the "equal to" operator.
* It returns "not (lhs = rhs)".
*
@@ -22,7 +24,10 @@
template <typename O1, typename O2>
bool operator!=(const Object<O1>& lhs, const Object<O2>& rhs);
- /*! The "greater than" operator is here defined for every milena
+
+ /*! \brief General definition of the "greater than" operator.
+ *
+ * The "greater than" operator is here defined for every milena
* objects. It relies on the definition of the "less than"
* operator. It returns "rhs < lhs".
*
@@ -32,7 +37,11 @@
template <typename O1, typename O2>
bool operator>(const Object<O1>& lhs, const Object<O2>& rhs);
- /*! The "greater than or equal to" operator is here defined for
+
+ /*! \brief General definition of the "greater than or equal to"
+ * operator.
+ *
+ * The "greater than or equal to" operator is here defined for
* every milena objects. It relies on the definition of the "less
* than or equal to" operator. It returns "rhs <= lhs".
*
@@ -42,7 +51,11 @@
template <typename O1, typename O2>
bool operator>=(const Object<O1>& lhs, const Object<O2>& rhs);
- /*! A default version of the "less than or equal to" operator is
+
+ /*! \brief Default definition of the "less than or equal to"
+ * operator.
+ *
+ * A default version of the "less than or equal to" operator is
* defined for every milena objects. It relies on the definition of
* the "less than" operator. It returns "not (rhs < lhs)".
*
Index: mln/core/exact.hh
--- mln/core/exact.hh (revision 994)
+++ mln/core/exact.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_EXACT_HH
/*! \file mln/core/exact.hh
- * This file defines the mln::exact downcast routines.
+ * \brief This file defines the mln::exact downcast routines.
*/
# include <mln/core/concept/object.hh>
@@ -11,12 +11,16 @@
namespace mln
{
- /*! The mln::exact routine downcasts an object towards its exact
- * type.
+ /*! \brief Exact cast routine for mln objects.
*
- * The only argument is an mln::Object. The return follows the
- * nature of the argument (either a pointer or a reference, const or
- * not).
+ * This set of routines can be used to downcast an object towards
+ * its exact type. The only argument, respectively \p ptr or \p
+ * ref, should be an mln::Object.
+ *
+ * \c The parameter E is the exact type of the object.
+ *
+ * \return The return follows the nature of the argument (either a
+ * pointer or a reference, const or not).
*/
/// \{
@@ -36,11 +40,17 @@
- /*! The mln::force_exact is a violent cast routine.
+ /*! \brief Violent exact cast routine.
+ *
+ * This cast is an alternative to the mln::exact cast. It is used
+ * for objects than do not derive from mln::Object.
*
* It preserves the nature (pointer or reference, const or mutable)
* of its argument. The parameter \a E should not have qualifiers.
*
+ * \warning Prefer not to use this cast!
+ *
+ * \see mln::exact
* \todo Move into mln::internal.
*/
/// \{
Index: mln/core/box2d.hh
--- mln/core/box2d.hh (revision 994)
+++ mln/core/box2d.hh (working copy)
@@ -1,6 +1,12 @@
#ifndef MLN_CORE_BOX2D_HH
# define MLN_CORE_BOX2D_HH
+/*! \file mln/core/box2d.hh
+ *
+ * \brief This file defines the mln::box2d alias and construction
+ * routines.
+ */
+
# include <mln/core/box.hh>
# include <mln/core/point2d.hh>
@@ -8,18 +14,51 @@
namespace mln
{
+ /*! \brief Type alias for a box defined on the 2D square grid with
+ * integer coordinates.
+ */
typedef box_<point2d> box2d;
+
+ /*! \brief Create a 2D box.
+ *
+ * \param[in] nrows Number of rows.
+ * \param[in] ncols Number of columns.
+ *
+ * \pre \p nrows != 0 and \p ncols != 0.
+ *
+ * \return A 2D box.
+ *
+ * \relates mln::box2d
+ */
box2d mk_box2d(unsigned nrows, unsigned ncols)
{
+ precondition(nrows != 0 and ncols != 0);
box2d tmp(mk_point2d(0, 0),
mk_point2d(nrows - 1, ncols - 1));
return tmp;
}
+
+ /*! \brief Create a 2D box.
+ *
+ * \overload
+ *
+ * \param[in] min_row Index of the top most row.
+ * \param[in] max_row Index of the botton most row.
+ * \param[in] min_col Index of the left most column.
+ * \param[in] max_col Index of the right most column.
+ *
+ * \pre \p max_row >= \p min_row and \p max_col >= \p min_col.
+ *
+ * \return A 2D box.
+ *
+ * \relates mln::box2d
+ */
box2d mk_box2d(int min_row, int max_row,
int min_col, int max_col)
{
+ precondition(max_row >= min_row and max_col >= min_col);
box2d tmp(mk_point2d(min_row, min_col),
mk_point2d(max_row, max_col));
return tmp;
Index: mln/core/point2d.hh
--- mln/core/point2d.hh (revision 994)
+++ mln/core/point2d.hh (working copy)
@@ -1,14 +1,31 @@
#ifndef MLN_CORE_POINT2D_HH
# define MLN_CORE_POINT2D_HH
+/*! \file mln/core/point2d.hh
+ *
+ * \brief This file defines the mln::point2d alias and its creation
+ * routine.
+ */
+
# include <mln/core/point.hh>
namespace mln
{
+ /*! \brief Type alias for a point defined on the 2D square grid with
+ * integer coordinates.
+ */
typedef point_<2,int> point2d;
+
+ /*! \brief Create a 2D point.
+ *
+ * \param[in] row Index of row.
+ * \param[in] col Index of column.
+ *
+ * \return A point2d.
+ */
point2d mk_point2d(int row, int col)
{
point2d tmp;
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Nicolas Ballas <ballas(a)lrde.epita.fr>
Add benchmark about C++ compilation time.
* sandbox: New.
* sandbox/cxxcompilation: New.
* sandbox/cxxcompilation/compilation_unit.rb: Tools used to create compilation unit file
for benchmark.
* sandbox/cxxcompilation/test.cc: Test file used in benchmark.
* sandbox/cxxcompilation/methods: Describes some existing method which improve compilation
time.
* sandbox/cxxcompilation/vaucanson_bench: Benchmark on Vaucanson method.
compilation_unit.rb | 56 ++++++++++++++++++++
methods | 104 ++++++++++++++++++++++++++++++++++++++
test.cc | 42 +++++++++++++++
vaucanson_bench | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 343 insertions(+)
Index: sandbox/cxxcompilation/compilation_unit.rb
--- sandbox/cxxcompilation/compilation_unit.rb (revision 0)
+++ sandbox/cxxcompilation/compilation_unit.rb (revision 0)
@@ -0,0 +1,56 @@
+#! /usr/bin/ruby
+
+#Create a compilation unit file from a .cc file
+
+#USAGE: ./compilation_unit.rb file.cc
+
+
+class CompilationUnit
+ attr_reader :sourceFileName, :name, :namespaceName
+
+ public
+ def initialize(sourceFileName)
+
+
+ @sourceFileName = sourceFileName
+ @name = sourceFileName.gsub(/.cc\z/, ".unit.cc")
+ @namespaceName = "__instanciator_code"
+
+ if not File.exist?(@name) then
+ self.createCompilationUnitFile
+ end
+ end
+
+ def update
+ createCompilationUnitFile
+ end
+
+ #Create UnitCompilationfile from source
+ def createCompilationUnitFile
+ sourceFile = File.new("#{@sourceFileName}", "r")
+ destinationFile = File.new("#{@name}", "w")
+
+ # Copy usefull include files into cache file.
+ sourceFile.each_line do |line|
+ destinationFile.puts(line) if line =~ /#include/
+ end
+
+ # trash namespace
+ destinationFile.puts("namespace #{@namespaceName} {")
+
+ # puts code line into trash namespace
+ sourceFile.close
+ sourceFile = File.new("#{@sourceFileName}", "r")
+ sourceFile.each_line do |line|
+ destinationFile.puts(line) if not (line =~ /#include/)
+ end
+
+ # end of namespace
+ destinationFile.puts("}")
+
+ sourceFile.close
+ destinationFile.close
+ end
+end
+
+unit = CompilationUnit.new(ARGV[0])
Index: sandbox/cxxcompilation/test.cc
--- sandbox/cxxcompilation/test.cc (revision 0)
+++ sandbox/cxxcompilation/test.cc (revision 0)
@@ -0,0 +1,42 @@
+#include <oln/core/2d/image2d.hh>
+#include <oln/core/3d/image3d.hh>
+#include <oln/core/1d/image1d.hh>
+#include <oln/level/fill.hh>
+
+
+using namespace oln;
+
+int main(void)
+{
+ image1d<char> ima1d1(5);
+ image1d<int> ima1d2(5);
+ image1d<float> ima1d3(5);
+ image1d<double> ima1d4(5);
+
+ level::fill(inplace(ima1d1), 5);
+ level::fill(inplace(ima1d2), 5);
+ level::fill(inplace(ima1d3), 5);
+ level::fill(inplace(ima1d4), 5);
+
+ image2d<char> ima2d1(5, 5);
+ image2d<int> ima2d2(5, 5);
+ image2d<float> ima2d3(5, 5);
+ image2d<double> ima2d4(5, 5);
+
+ level::fill(inplace(ima2d1), 5);
+ level::fill(inplace(ima2d2), 5);
+ level::fill(inplace(ima2d3), 5);
+ level::fill(inplace(ima2d4), 5);
+
+ image3d<char> ima3d1(5, 5, 5);
+ image3d<int> ima3d2(5, 5, 5);
+ image3d<float> ima3d3(5, 5, 5);
+ image3d<double> ima3d4(5, 5, 5);
+
+ level::fill(inplace(ima3d1), 5);
+ level::fill(inplace(ima3d2), 5);
+ level::fill(inplace(ima3d3), 5);
+ level::fill(inplace(ima3d4), 5);
+
+ return 0;
+}
Index: sandbox/cxxcompilation/methods
--- sandbox/cxxcompilation/methods (revision 0)
+++ sandbox/cxxcompilation/methods (revision 0)
@@ -0,0 +1,104 @@
+ -*- Outline -*-
+
+* without optimization flags
+
+** Benchmark
+
+compilation: 2.131
+execution: 18.538
+total: 22.670
+
+
+* O1
+
+** Benchmark
+compilation: 3.616
+execution: 4.893
+total: 8.509
+
+* O2
+** Benchmark
+compilation: 4.610
+execution: 3.781
+total: 8.391
+
+* 03
+compilation: 5.071
+execution: 1.567
+total: 6.638
+
+
+
+
+The next part introduces different method to speed up C++ compilation time.
+
+Test are made with union_find.cc file.
+
+* precompiled header (without optimization option)
+
+** Description
+
+Generate precompiled header (.gch) which can parsed in a faster way by g++.
+
+
+How to automize header precompilation, just make a precompilation of usefull header ?
+
+** Benchmark
+
+compilation: 3.733
+execution: 18.119
+total: 21.852
+
+* ccache (without optimization option)
+
+** Description
+
+"ccache is a compiler cache. It acts as a caching pre-processor to C/C++ compilers, using the -E compiler switch and a hash to detect when a compilation can be satisfied from cache. This often results in a 5 to 10 times speedup in common compilations." http://cache.samba.org
+
+** Benchmark
+
+* Vacauson Way (without optimization option)
+
+** Description
+
+cf: http://www.lrde.epita.fr/cgi-bin/twiki/view/Know/SpeedUpCxxCompilation
+
+
+*** total recompilation protocol of source.cc:
+--> (1) compile source.cc to "ref".o (cache used for function addresse reference)
+--> (2) source.cc -> source.o with -DINTERFACE_ONLY (real program)
+--> (3) links source.o to "ref".o
+
+*** Protocole:
+--> do (1)
+--> do (2) and (3) as long as there is no linkage error, else redo (1)
+
+
+*** Problems:
+
+You must recompile the cache when you use an new algorithm/data type in your program.
+--> solution: ask developper to write usefull algorithm/data types/includes at the start of the programm and uses template instantiation
+
+
+Automatization??
+--> how deals with several files
+--> how deals with missing .hh files
+--> differenciate link error from other error
+
+***Others things:
+
+wrapper script or Makefile???
+--> script used by Makefile
+
+** Benchmark
+
+*** first compilation or total recompilation is longer than a normal compilation
+
+you need to compile program two times
+
+
+*** next time when cache recompilation is not needed
+
+compilation: 0.200
+execution: 17.875
+toto: 18.075
Index: sandbox/cxxcompilation/vaucanson_bench
--- sandbox/cxxcompilation/vaucanson_bench (revision 0)
+++ sandbox/cxxcompilation/vaucanson_bench (revision 0)
@@ -0,0 +1,141 @@
+ -*- Outline -*-
+
+* Summary:
+
+ This files present c++ compilation benchmark with Vaucanson method.
+
+* Vaucanson method:
+
+** Files used:
+*** source.cc
+client code
+
+*** source.unit.cc
+This files contains instantiations of templated data and algorithms used by the client code.
+
+A Compilation unit copies #include directives used by source.cc
+Furthermore, it copies client source code into a trash name's (in order to instantiated templates).
+
+But other method exists to create compilation unit(cf .hcc).
+
+
+** Compilation process:
+
+*** total recompilation
+
+--> (1) compile source.unit.cc to an object file (source.unit.o) (cache used to find function address reference).
+
+--> (2) compile source.cc to source.o with -DINTERFACE_ONLY (or INCLUDE_ONLY, we want to compile just the interface the objects).
+
+--> (3) link source.o with source.unit.o
+
+*** Protocol:
+--> do (1)
+--> do (2) and (3) as long as there are no linkage errors, else redo (1)
+
+
+
+
+* Benchmark:
+
+** With Olena:
+
+compile command:
+g++ -W -Wall -Werror -ansi -pedantic -Ipath/metalic -Ipath/olena -Ipath/extended
+
+dimension of image used for test: 512 * 512.
+Note: We can add optimization flag to speed up execution time.
+
+
+*******************************************************************************
+** File: oln/morpho/Rd/union_find.cc
+
+*** normal compilation:
+compilation time: 4.110
+execution time: 42.893
+total time: 47.003
+
+*** With Vaucanson method:
+
+**** total recompilation:
+
+compilation time: 6.749
+--> (1) : 4.062
+--> (2) : 2.524
+--> (3) : 0.163
+
+execution time: 42.058
+total time: 48.807
+
+~= 2 second slower than a normal compilation
+
+**** Usual recompilation
+
+compilation time: 2.702
+--> (2) : 2.542
+--> (3) : 0.160
+
+execution time:42.060
+total time: 44.762
+
+*******************************************************************************
+** oln/morpho/Rd/queue_based.cc
+
+*** normal compilation:
+compilation time: 4.296
+execution time: 35.836
+total time: 40.132
+
+*** With Vaucanson method:
+
+**** total recompilation:
+
+compilation time: 7.187
+--> (1) : 4.378
+--> (2) : 2.636
+--> (3) : 0.173
+
+execution time: 35.836
+total time: 43.023
+
+**** Usual recompilation
+
+compilation time: 2.809
+--> (2) : 2.636
+--> (3) : 0.173
+
+*******************************************************************************
+** test.cc
+
+(declare and fill 12 differents image types)
+
+*** normal compilation:
+compilation time: 25.585
+execution time: 0.006
+total time: 25.596
+
+*** With Vaucanson method:
+
+**** total recompilation:
+
+compilation time: 45.087
+--> (1) : 25.378
+--> (2) : 19.318
+--> (3) : 0.391
+
+execution time: 0.006
+total time: 45.093
+
+**** Usual recompilation
+
+compilation time: 19.664
+--> (2) : 19.259
+--> (3) : 0.405
+
+** with morpher
+
+FIXME
+
+*** With Milena
+
+FIXME
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Add some documentation.
* doc/Doxyfile.in: Try to properly handle some macros.
* mln/core/macros.hh,
* mln/core/concept/genpoint.hh,
* mln/core/concept/point_set.hh,
* mln/core/concept/psite.hh,
* mln/core/concept/object.hh,
* mln/core/concept/window.hh,
* mln/core/concept/box.hh,
* mln/core/concept/point.hh,
* mlc/equal.hh,
* mlc/same_point.hh,
* mln/core/concept/iterator.hh: Add some documentation.
* mln/core/concept/doc/image.hh: New.
* mln/core/concept/doc/genpoint.hh: Update.
* mln/core/concept/doc/piter.hh: New.
* mln/core/concept/doc/point_set.hh: New.
* mln/core/concept/doc/object.hh: New.
* mln/core/concept/doc/neighborhood.hh: New.
* mln/core/concept/doc/window.hh: New.
* mln/core/concept/doc/box.hh: New.
* mln/core/concept/doc/iterator.hh: New.
* mln/core/concept/doc/dpoint.hh: New.
* mln/core/contract.hh: New.
* mlc/same_coord.hh: New.
doc/Doxyfile.in | 10 +-
mlc/equal.hh | 6 -
mlc/same_coord.hh | 24 ++++++
mlc/same_point.hh | 10 +-
mln/core/concept/box.hh | 17 +++-
mln/core/concept/doc/box.hh | 54 ++++++++++++++
mln/core/concept/doc/dpoint.hh | 25 ++++++
mln/core/concept/doc/genpoint.hh | 44 ++++++++++-
mln/core/concept/doc/image.hh | 54 ++++++++++++++
mln/core/concept/doc/iterator.hh | 42 +++++++++++
mln/core/concept/doc/neighborhood.hh | 24 ++++++
mln/core/concept/doc/object.hh | 30 ++++++++
mln/core/concept/doc/piter.hh | 29 +++++++
mln/core/concept/doc/point_set.hh | 55 ++++++++++++++
mln/core/concept/doc/window.hh | 51 +++++++++++++
mln/core/concept/genpoint.hh | 130 +++++++++++++++++++++++++++++++----
mln/core/concept/iterator.hh | 22 +++++
mln/core/concept/object.hh | 2
mln/core/concept/point.hh | 41 +++++++++--
mln/core/concept/point_set.hh | 9 ++
mln/core/concept/psite.hh | 6 -
mln/core/concept/window.hh | 9 ++
mln/core/contract.hh | 20 +++++
mln/core/macros.hh | 9 ++
24 files changed, 681 insertions(+), 42 deletions(-)
Index: doc/Doxyfile.in
--- doc/Doxyfile.in (revision 992)
+++ doc/Doxyfile.in (working copy)
@@ -1007,13 +1007,13 @@
# compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES.
-MACRO_EXPANSION = NO
+MACRO_EXPANSION = YES
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the
# PREDEFINED and EXPAND_AS_DEFINED tags.
-EXPAND_ONLY_PREDEF = NO
+EXPAND_ONLY_PREDEF = YES
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
@@ -1049,7 +1049,11 @@
# sources will be used. Use the PREDEFINED tag if you want to use a
# different macro definition.
-EXPAND_AS_DEFINED =
+EXPAND_AS_DEFINED = \
+ mln_point \
+ mln_dpoint \
+ mln_coord
+
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
Index: mln/core/macros.hh
--- mln/core/macros.hh (revision 992)
+++ mln/core/macros.hh (working copy)
@@ -5,11 +5,20 @@
* This file defines the set of milena macros.
*/
+/*! \def mln_point(T)
+ */
# define mln_point(T) typename T::point
+
+/*! \def mln_dpoint(T)
+ */
# define mln_dpoint(T) typename T::dpoint
+
# define mln_psite(T) typename T::psite
# define mln_pset(T) typename T::pset
# define mln_box(T) typename T::box
+
+/*! \def mln_coord(T)
+ */
# define mln_coord(T) typename T::coord
# define mln_piter(T) typename T::piter
Index: mln/core/concept/genpoint.hh
--- mln/core/concept/genpoint.hh (revision 992)
+++ mln/core/concept/genpoint.hh (working copy)
@@ -2,33 +2,40 @@
# define MLN_CORE_CONCEPT_GENPOINT_HH
/*! \file mln/core/concept/genpoint.hh
- * This file defines the concept of mln::GenPoint.
+ * \brief This file defines the concept of mln::GenPoint.
*/
+# include <mlc/equal.hh>
+# include <mlc/same_point.hh>
+# include <mlc/same_coord.hh>
# include <mln/core/concept/object.hh>
# include <mln/core/macros.hh>
-# include <mlc/equal.hh>
-# include <mlc/same_point.hh>
+# include <mln/core/contract.hh>
namespace mln
{
- /*! Base class for implementation classes that are points or that
+ // FIXME: \class GenPoint genpoint.hh "mln/core/concept/doc/genpoint.hh"
+
+ /*! \brief Base class for implementation classes that are points or that
* have the behavior of points.
*
- * "GenPoint" is "General Point" for short.
+ * "GenPoint" is "Generalized Point" for short.
*
- * This class does not derive from mln::Object; it is for use as a
- * parallel hierarchy.
+ * \warning This class does \em not derive from mln::Object; it is
+ * for use as a parallel hierarchy.
*
- * \relates mln::doc::GenPoint
+ * \see mln::doc::GenPoint for a complete documentation of this
+ * class contents.
*/
template <typename E>
struct GenPoint // stand-alone class!
{
/*
+ enum { dim };
+
typedef point;
typedef dpoint;
typedef coord;
@@ -47,22 +54,112 @@
- /*! \relates mln::GenPoint
+ /*! \brief Equality comparison between a couple of generalized point \p lhs
+ * and \p rhs.
+ *
+ * @param[in] lhs A first generalized point.
+ * @param[in] rhs A second generalized point.
+ *
+ * \pre Both \p lhs and \p rhs have to be defined on the same
+ * topology; otherwise this test does not compile.
+ *
+ * \return True if both generalized points have the same
+ * coordinates, otherwise false.
+ *
+ * \relates mln::GenPoint
*/
template <typename Pl, typename Pr>
bool operator=(const GenPoint<Pl>& lhs, const GenPoint<Pr>& rhs);
+
+ /*! \brief Ordering "less than" comparison between a couple of generalized
+ * point \p lhs and \p rhs.
+ *
+ * @param[in] lhs A first generalized point.
+ * @param[in] rhs A second generalized point.
+ *
+ * This test is based on a lexicographical ordering over coordinates.
+ *
+ * \warning In the general case this ordering relationship is \em
+ * not bound to the way of browsing a domain with a forward point
+ * iterator.
+ *
+ * \pre Both \p lhs and \p rhs have to be defined on the same
+ * topology; otherwise this test does not compile.
+ *
+ * \return True if \p lhs is before \p rhs in the sense of the
+ * coordinates lexicographic comparison, otherwise false.
+ *
+ * \relates mln::GenPoint
+ */
template <typename Pl, typename Pr>
bool operator<(const GenPoint<Pl>& lhs, const GenPoint<Pr>& rhs);
+
+ /*! \brief Difference between a couple of generalized point \p lhs and \p
+ * rhs.
+ *
+ * @param[in] lhs A first generalized point.
+ * @param[in] rhs A second generalized point.
+ *
+ * \warning There is no type promotion in milena so the client
+ * has to make sure that both points are defined with the same
+ * type of coordinates.
+ *
+ * \pre Both \p lhs and \p rhs have to be defined on the same
+ * topology and with the same type of coordinates; otherwise this
+ * test does not compile.
+ *
+ * \post The result, \p dp, is such as \p lhs = \p rhs + \p dp.
+ *
+ * \return A delta-point.
+ *
+ * \see mln::Dpoint
+ * \relates mln::GenPoint
+ */
template <typename Pl, typename Pr>
- typename Pl::dpoint
+ mln_dpoint(Pl)
operator-(const GenPoint<Pl>& lhs, const GenPoint<Pr>& rhs);
+
+ /*! \brief Add a delta-point \p rhs to a generalized point \p lhs.
+ *
+ * @param[in] lhs A generalized point.
+ * @param[in] rhs A delta-point.
+ *
+ * The type of \p rhs has to be exactly the delta-point type
+ * associated with the type of \p lhs.
+ *
+ * \return A new point (temporary object).
+ *
+ * \see mln::Dpoint
+ * \relates mln::GenPoint
+ *
+ * \todo Introduce the notion of "generalized dpoint" and
+ * add the more general extra operator+(GenPoint, GenDpoint).
+ */
template <typename P>
- typename P::point
- operator+(const GenPoint<P>& lhs, const typename P::dpoint& rhs);
+ mln_point(P)
+ operator+(const GenPoint<P>& lhs, const mln_dpoint(P)& rhs);
+
+ /*! \brief Print a generalized point \p p into the output stream \p
+ * ostr.
+ *
+ * @param[in,out] ostr An output stream.
+ * @param[in] p A generalized point.
+ *
+ * The type of \p rhs has to be exactly the delta-point type
+ * associated with the type of \p lhs.
+ *
+ * \return The modified output stream.
+ *
+ * \see mln::Dpoint
+ * \relates mln::GenPoint
+ *
+ * \todo Introduce the notion of "generalized dpoint" and
+ * add the more general extra operator+(GenPoint, GenDpoint).
+ */
template <typename P>
std::ostream& operator<<(std::ostream& ostr, const GenPoint<P>& p);
@@ -72,6 +169,8 @@
template <typename E>
GenPoint<E>::GenPoint()
{
+ const int dim = E::dim;
+ invariant(dim > 0);
typedef mln_point(E) point;
typedef mln_dpoint(E) dpoint;
typedef mln_coord(E) coord;
@@ -84,6 +183,7 @@
template <typename Pl, typename Pr>
bool operator=(const GenPoint<Pl>& lhs, const GenPoint<Pr>& rhs)
{
+ // FIXME: mlc::same_grid<Pl, Pr>::check();
const Pl& lhs_ = force_exact<Pl>(lhs);
const Pr& rhs_ = force_exact<Pr>(rhs);
mlc::same_point<Pl, Pr>::check();
@@ -96,7 +196,7 @@
template <typename Pl, typename Pr>
bool operator<(const GenPoint<Pl>& lhs, const GenPoint<Pr>& rhs)
{
- mlc::same_point<Pl, Pr>::check();
+ // FIXME: mlc::same_grid<Pl, Pr>::check();
const Pl& lhs_ = force_exact<Pl>(lhs);
const Pr& rhs_ = force_exact<Pr>(rhs);
for (unsigned i = 0; i < Pl::dim; ++i)
@@ -113,11 +213,15 @@
mln_dpoint(Pl)
operator-(const GenPoint<Pl>& lhs, const GenPoint<Pr>& rhs)
{
+ mlc::equal<mln_dpoint(Pl), mln_dpoint(Pr)>::check();
+ // FIXME: mlc::same_grid<Pl, Pr>::check();
+ mlc::same_coord<Pl, Pr>::check();
const Pl& lhs_ = force_exact<Pl>(lhs);
const Pr& rhs_ = force_exact<Pr>(rhs);
mln_dpoint(Pl) tmp;
for (unsigned i = 0; i < Pl::dim; ++i)
tmp[i] = lhs_[i] - rhs_[i];
+ assert(rhs + tmp = lhs);
return tmp;
}
Index: mln/core/concept/point_set.hh
--- mln/core/concept/point_set.hh (revision 992)
+++ mln/core/concept/point_set.hh (working copy)
@@ -1,6 +1,10 @@
#ifndef MLN_CORE_CONCEPT_POINT_SET_HH
# define MLN_CORE_CONCEPT_POINT_SET_HH
+/*! \file mln/core/concept/point_set.hh
+ * \brief This file defines the concept of mln::Point_Set.
+ */
+
# include <mln/core/concept/point.hh>
# include <mln/core/concept/piter.hh>
@@ -8,6 +12,11 @@
namespace mln
{
+ /*! \brief Base class for implementation classes of point sets.
+ *
+ * \see mln::doc::Point_Set for a complete documentation of this
+ * class contents.
+ */
template <typename E>
struct Point_Set : public Object<E>
{
Index: mln/core/concept/psite.hh
--- mln/core/concept/psite.hh (revision 992)
+++ mln/core/concept/psite.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_PSITE_HH
/*! \file mln/core/concept/psite.hh
- * This file defines the concept of mln::Psite.
+ * \brief This file defines the concept of mln::Psite.
*/
# include <mln/core/concept/genpoint.hh>
@@ -11,8 +11,8 @@
namespace mln
{
- /*! Base class for implementation classes of the notion of "point
- * site".
+ /*! \brief Base class for implementation classes of the notion of
+ * "point site".
*
* A point site ("psite" for short) is an object that allows an
* efficient access to data associated with a point. A point site
Index: mln/core/concept/object.hh
--- mln/core/concept/object.hh (revision 992)
+++ mln/core/concept/object.hh (working copy)
@@ -2,7 +2,7 @@
# define MLN_CORE_CONCEPT_OBJECT_HH
/*! \file mln/core/concept/object.hh
- * This file contains the top milena class.
+ * \brief This file contains the top milena class.
*/
# include <cassert>
Index: mln/core/concept/doc/image.hh
--- mln/core/concept/doc/image.hh (revision 0)
+++ mln/core/concept/doc/image.hh (revision 0)
@@ -0,0 +1,54 @@
+/*! \file mln/core/concept/doc/image.hh
+ * This file documents the concept of mln::Image.
+ */
+
+namespace mln
+{
+
+ namespace doc
+ {
+
+ /*! Documentation class for mln::Image.
+ * \see mln::Image
+ */
+ template <typename E>
+ struct Image : public Object<E>
+ {
+ // to be provided in concrete image classes:
+
+ typedef void value;
+ typedef void rvalue;
+ typedef void lvalue;
+
+ bool has_data() const;
+
+ bool owns_(const psite& p) const; // default is like "has(p)"
+ const pset& domain() const;
+
+ rvalue operator()(const psite& p) const;
+ lvalue operator()(const psite& p);
+
+ template <typename T>
+ struct change_value
+ {
+ typedef ret;
+ };
+
+
+ // provided by internal::image_base_:
+
+ typedef void pset;
+ typedef void point;
+ typedef void psite;
+
+ typedef void piter;
+ typedef void fwd_piter;
+ typedef void bkd_piter;
+
+ bool has(const psite& p) const;
+ const box_<point>& bbox() const;
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/doc/genpoint.hh
--- mln/core/concept/doc/genpoint.hh (revision 992)
+++ mln/core/concept/doc/genpoint.hh (working copy)
@@ -1,5 +1,5 @@
-/*! \file mln/core/concept/genpoint.doc.hh
- * This file documents the concept of mln::GenPoint.
+/*! \file mln/core/concept/doc/genpoint.hh
+ * \brief This file documents the concept of mln::GenPoint.
*/
namespace mln
@@ -8,18 +8,54 @@
namespace doc
{
+ /*! \brief Documentation class for mln::GenPoint.
+ * \see mln::GenPoint
+ */
template <typename E>
struct GenPoint
{
- typedef void point; ///< Associated type of point.
+ /*! \var dim
+ * \brief Dimension of the space.
+ * \invariant dim > 0
+ */
+ enum { dim };
+
+ /*! \brief Point associated type.
+ * \invariant This type has to derive from mln::Point.
+ */
+ typedef void point;
+ /*! \brief Dpoint associated type.
+ * \invariant This type has to derive from mln::Dpoint.
+ */
typedef void dpoint;
+
+ /*! Coordinate associated type.
+ */
typedef void coord;
+
+
+ // FIXME:
// typedef void topo;
+ // operator point() const;
- operator point() const;
+ /*! \brief Give a hook to the point address.
+ *
+ * This method allows for iterators to refer to a point.
+ *
+ * \return A point address.
+ */
const point* pointer() const;
+
+ /*! \brief Read-only access to the \p i-th coordinate value.
+ *
+ * @param[in] i The coordinate index.
+ *
+ * \pre \p i < \c dim
+ *
+ * \return The value of the \p i-th coordinate.
+ */
coord operator[](unsigned i) const;
};
Index: mln/core/concept/doc/piter.hh
--- mln/core/concept/doc/piter.hh (revision 0)
+++ mln/core/concept/doc/piter.hh (revision 0)
@@ -0,0 +1,29 @@
+/*! \file mln/core/concept/doc/piter.hh
+ * \brief This file documents the concept of mln::Piter.
+ */
+
+namespace mln
+{
+
+ namespace doc
+ {
+
+ /*! \brief Documentation class for mln::Piter.
+ * \see mln::Piter
+ */
+ template <typename E>
+ struct Piter : public Iterator<E>,
+ public GenPoint<E>
+ {
+ // FIXME: HERE
+ typedef void psite;
+ typedef void point;
+
+ operator psite() const;
+ operator point() const;
+ const point* pointer() const;
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/doc/point_set.hh
--- mln/core/concept/doc/point_set.hh (revision 0)
+++ mln/core/concept/doc/point_set.hh (revision 0)
@@ -0,0 +1,55 @@
+/*! \file mln/core/concept/doc/point_set.hh
+ * \brief This file documents the concept of mln::Point_Set.
+ */
+
+namespace mln
+{
+
+ namespace doc
+ {
+
+ /*! \brief Documentation class for mln::Point_Set.
+ * \see mln::Point_Set
+ */
+ template <typename E>
+ struct Point_Set : public Object<E>
+ {
+ /*! \brief Point associated type.
+ */
+ typedef void point;
+
+ /*! \brief Psite associated type.
+ */
+ typedef void psite;
+
+ /*! \brief Piter associated type.
+ */
+ typedef void piter;
+
+ /*! \brief Forward Piter associated type.
+ */
+ typedef void fwd_piter;
+
+ /*! \brief Backward Piter associated type.
+ */
+ typedef void bkd_piter;
+
+ /*! \brief Test if the \p p belongs to this point set.
+ *
+ * @param[in] p A point site.
+ * \return True if \p p is an element of the point set.
+ */
+ bool has(const psite& p) const;
+
+ /*! \brief Give the bounding box of this point set.
+ */
+ const box_<point>& bbox() const;
+
+ /*! \brief Give the number of points of this point set.
+ */
+ std::size_t npoints() const;
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/doc/object.hh
--- mln/core/concept/doc/object.hh (revision 0)
+++ mln/core/concept/doc/object.hh (revision 0)
@@ -0,0 +1,30 @@
+/*! \file mln/core/concept/doc/object.hh
+ * \brief This file documents the concept of mln::Object.
+ */
+
+namespace mln
+{
+ /*! \namespace mln::doc
+ * \brief The namespace mln::doc is only for documentation purpose.
+ *
+ * Since concepts are not yet part of the C++ Standard, they are not
+ * explicitly expressed in code. Their documentation is handled by
+ * their respective ghost class, located in this namespace.
+ *
+ * \warning The ghost classes located in mln::doc should not be used
+ * by the client.
+ */
+ namespace doc
+ {
+
+ /*! \brief Documentation class for mln::Object.
+ * \see mln::Object
+ */
+ template <typename E>
+ struct Object
+ {
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/doc/neighborhood.hh
--- mln/core/concept/doc/neighborhood.hh (revision 0)
+++ mln/core/concept/doc/neighborhood.hh (revision 0)
@@ -0,0 +1,24 @@
+/*! \file mln/core/concept/doc/neighborhood.hh
+ * This file documents the concept of mln::Neighborhood.
+ */
+
+namespace mln
+{
+
+ namespace doc
+ {
+
+ /*! Documentation class for mln::Neighborhood.
+ * \see mln::Neighborhood
+ */
+ template <typename E>
+ struct Neighborhood : public Object<E>
+ {
+ typedef void niter;
+ typedef void fwd_niter;
+ typedef void bkd_niter;
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/doc/window.hh
--- mln/core/concept/doc/window.hh (revision 0)
+++ mln/core/concept/doc/window.hh (revision 0)
@@ -0,0 +1,51 @@
+/*! \file mln/core/concept/doc/window.hh
+ * \brief This file documents the concept of mln::Window.
+ */
+
+namespace mln
+{
+
+ namespace doc
+ {
+
+ /*! \brief Documentation class for mln::Window.
+ * \see mln::Window
+ */
+ template <typename E>
+ struct Window : public Object<E>
+ {
+ /*! \brief Piter type associated to this window to browse its
+ * points.
+ */
+ typedef void qiter;
+
+ /*! \brief Piter type associated to this window to browse its
+ * points in a forward way.
+ */
+ typedef void fwd_qiter;
+
+ /*! \brief Piter type associated to this window to browse its
+ * points in a backward way.
+ */
+ typedef void bkd_qiter;
+
+ /*! \brief Test if the window is empty.
+ *
+ * A window of null size is empty.
+ */
+ bool is_empty() const;
+
+ /*! \brief Test if the window is centered.
+ *
+ * A window is centered is the origin belongs to the window.
+ */
+ bool is_centered() const;
+
+ /*! \brief Test if the window is symmetric.
+ */
+ bool is_symmetric() const;
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/doc/box.hh
--- mln/core/concept/doc/box.hh (revision 0)
+++ mln/core/concept/doc/box.hh (revision 0)
@@ -0,0 +1,54 @@
+/*! \file mln/core/concept/doc/box.hh
+ * This file documents the concept of mln::Box.
+ */
+
+namespace mln
+{
+
+ namespace doc
+ {
+
+ /*! Documentation class for mln::Box.
+ * \see mln::Box
+ */
+ template <typename E>
+ struct Box : public Point_Set<E>
+ {
+ /*! \fn const point& pmin() const
+ *
+ * Return the minimum point w.r.t. the ordering between points.
+ *
+ * In 2D this minimum is the top left point of the box.
+ */
+ const point& pmin() const;
+
+ /*! \fn const point& pmax() const
+ *
+ * Return the maximum point w.r.t. the ordering between points.
+ *
+ * In 2D this maximum is the bottom right point of the box.
+ */
+ const point& pmax() const;
+
+ /*! \fn const E& bbox() const
+ *
+ * Return the bounding box of this point set, so that is itself.
+ * This method is declared by the mln::Point_Set concept.
+ *
+ * \warning This method is final for all box classes.
+ */
+ const E& bbox() const;
+
+ /*! \fn std::size_t npoints() const
+ *
+ * Return the number of points of this box. This method is
+ * declared by the mln::Point_Set concept.
+ *
+ * \warning This method is final for all box classes.
+ */
+ std::size_t npoints() const;
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/doc/iterator.hh
--- mln/core/concept/doc/iterator.hh (revision 0)
+++ mln/core/concept/doc/iterator.hh (revision 0)
@@ -0,0 +1,42 @@
+/*! \file mln/core/concept/doc/iterator.hh
+ * This file documents the concept of mln::Iterator.
+ */
+
+
+namespace mln
+{
+
+ namespace doc
+ {
+
+ /*! Documentation class for mln::Iterator.
+ * \see mln::Iterator
+ */
+ template <typename E>
+ struct Iterator : public Object<E>
+ {
+ /*! Returns true if the iterator is valid, that is, designates
+ * an element.
+ */
+ bool is_valid() const;
+
+ /*! Invalidate the iterator.
+ */
+ void invalidate();
+
+ /*! Start an iteration, that is, make the iterator designate the
+ * first element if it exists.
+ */
+ void start();
+
+ /*! Make the iterator designate the next element.
+ */
+ void next_();
+
+ protected:
+ Iterator();
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/doc/dpoint.hh
--- mln/core/concept/doc/dpoint.hh (revision 0)
+++ mln/core/concept/doc/dpoint.hh (revision 0)
@@ -0,0 +1,25 @@
+/*! \file mln/core/concept/doc/dpoint.hh
+ * This file documents the concept of mln::Dpoint.
+ */
+
+namespace mln
+{
+
+ namespace doc
+ {
+
+ /*! Documentation class for mln::Dpoint.
+ * \see mln::Dpoint
+ */
+ template <typename E>
+ struct Dpoint : public Object<E>
+ {
+ typedef point;
+ typedef coord;
+ enum { dim };
+ coord operator[](unsigned i) const;
+ };
+
+ } // end of namespace mln::doc
+
+} // end of namespace mln
Index: mln/core/concept/window.hh
--- mln/core/concept/window.hh (revision 992)
+++ mln/core/concept/window.hh (working copy)
@@ -1,12 +1,21 @@
#ifndef MLN_CORE_CONCEPT_WINDOW_HH
# define MLN_CORE_CONCEPT_WINDOW_HH
+/*! \file mln/core/concept/window.hh
+ * \brief This file defines the concept of mln::Window.
+ */
+
# include <mln/core/concept/object.hh>
namespace mln
{
+ /*! \brief Base class for implementation classes that are windows.
+ *
+ * \see mln::doc::Window for a complete documentation of this class
+ * contents.
+ */
template <typename E>
struct Window : public Object<E>
{
Index: mln/core/concept/box.hh
--- mln/core/concept/box.hh (revision 992)
+++ mln/core/concept/box.hh (working copy)
@@ -1,12 +1,24 @@
#ifndef MLN_CORE_CONCEPT_BOX_HH
# define MLN_CORE_CONCEPT_BOX_HH
+/*! \file mln/core/concept/box.hh
+ * \brief This file defines the concept of mln::Box.
+ */
+
# include <mln/core/concept/point_set.hh>
namespace mln
{
+ /*! \brief Base class for implementation classes of boxes.
+ *
+ * Boxes are particular point sets useful to bound any set of
+ * points.
+ *
+ * \see mln::doc::Box for a complete documentation of this class
+ * contents.
+ */
template <typename E>
struct Box : public Point_Set<E>
{
@@ -15,9 +27,8 @@
const point& pmax() const;
*/
- // final
- const E& bbox() const;
- std::size_t npoints() const;
+ const E& bbox() const; //! final; \see mln::doc::Box::bbox
+ std::size_t npoints() const; //! final; \see mln::doc::Box::npoints
protected:
Box();
Index: mln/core/concept/point.hh
--- mln/core/concept/point.hh (revision 992)
+++ mln/core/concept/point.hh (working copy)
@@ -1,8 +1,8 @@
#ifndef MLN_CORE_CONCEPT_POINT_HH
# define MLN_CORE_CONCEPT_POINT_HH
-/*! \file mln/core/exact.hh
- * This file defines the concept of mln::Point.
+/*! \file mln/core/concept/point.hh
+ * \brief This file defines the concept of mln::Point.
*/
# include <mln/core/concept/psite.hh>
@@ -11,15 +11,19 @@
namespace mln
{
- /*! Base class for implementation of point.
+ /*! \brief Base class for implementation of point classes.
*
- * A point is
+ * A point is a vector in a space.
*/
template <typename P>
struct Point : public Psite<P>
{
- // final
+ /*! \brief The associated point type is itself.
+ */
typedef P point;
+
+ /*! \brief The pointer is this point address.
+ */
const P* pointer() const;
protected:
@@ -27,9 +31,36 @@
};
+ /*! \brief Add a delta-point \p rhs to a point \p lhs.
+ *
+ * @param[in,out] lhs The targeted point.
+ * @param[in] rhs A delta-point.
+ *
+ * \pre The type of \p rhs has to be the Dpoint type associated with
+ * the type of \p lhs; otherwise this test does not compile.
+ *
+ * \return A reference to the point \p lhs once translated by \p
+ * rhs.
+ *
+ * \relates mln::Point
+ */
template <typename P>
P& operator+=(Point<P>& lhs, const mln_dpoint(P)& rhs);
+
+ /*! \brief Remove a delta-point \p rhs to a point \p lhs.
+ *
+ * @param[in,out] lhs The targeted point.
+ * @param[in] rhs A delta-point.
+ *
+ * \pre The type of \p rhs has to be the Dpoint type associated with
+ * the type of \p lhs; otherwise this test does not compile.
+ *
+ * \return A reference to the point \p lhs once translated by - \p
+ * rhs.
+ *
+ * \relates mln::Point
+ */
template <typename P>
P& operator-=(Point<P>& lhs, const mln_dpoint(P)& rhs);
Index: mln/core/concept/iterator.hh
--- mln/core/concept/iterator.hh (revision 992)
+++ mln/core/concept/iterator.hh (working copy)
@@ -1,15 +1,25 @@
#ifndef MLN_CORE_CONCEPT_ITERATOR_HH
# define MLN_CORE_CONCEPT_ITERATOR_HH
-# include <mln/core/concept/object.hh>
+/*! \file mln/core/concept/iterator.hh
+ * \brief This file defines the concept of mln::Iterator.
+ */
+# include <mln/core/concept/object.hh>
+/*! \brief Loop to browse all the elements targetted by the iterator
+ * \p x.
+ */
# define for_all(x) for(x.start(); x.is_valid(); x.next())
namespace mln
{
-
+ /*! \brief Base class for implementation classes that are iterators.
+ *
+ * \see mln::doc::Iterator for a complete documentation of this
+ * class contents.
+ */
template <typename E>
struct Iterator : public Object<E>
{
@@ -20,6 +30,14 @@
void next_();
*/
+ /*! \brief Go to the next element.
+ *
+ * \warning This is a final method; iterator classes should not
+ * re-defined this method. The actual "next" operation has to be
+ * defined through the \em next_ method.
+ *
+ * \pre The iterator is valid.
+ */
void next(); // final
protected:
Index: mln/core/contract.hh
--- mln/core/contract.hh (revision 0)
+++ mln/core/contract.hh (revision 0)
@@ -0,0 +1,20 @@
+#ifndef MLN_CORE_CONTRACT_HH
+# define MLN_CORE_CONTRACT_HH
+
+/*! \file mln/core/contract.hh
+ * This file defines the set of contracts.
+ */
+
+# include <cassert>
+
+
+# define mln_assertion(expr) assert(expr)
+
+# define mln_invariant(expr) assert(expr)
+# define mln_precondition(expr) assert(expr)
+# define mln_postcondition(expr) assert(expr)
+
+# define mln_implies(lexpr, repxr) assert(not (rexpr) or (lexpr))
+
+
+#endif // ! MLN_CORE_CONTRACT_HH
Index: mlc/equal.hh
--- mlc/equal.hh (revision 992)
+++ mlc/equal.hh (working copy)
@@ -1,5 +1,5 @@
-#ifndef MLN_MLC_EQUAL_HH
-# define MLN_MLC_EQUAL_HH
+#ifndef MLC_EQUAL_HH
+# define MLC_EQUAL_HH
namespace mln
@@ -25,4 +25,4 @@
} // end of namespace mln
-#endif // ! MLN_MLC_EQUAL_HH
+#endif // ! MLC_EQUAL_HH
Index: mlc/same_coord.hh
--- mlc/same_coord.hh (revision 0)
+++ mlc/same_coord.hh (revision 0)
@@ -0,0 +1,24 @@
+#ifndef MLC_SAME_COORD_HH
+# define MLC_SAME_COORD_HH
+
+# include <mlc/equal.hh>
+# include <mln/core/macros.hh>
+
+
+namespace mln
+{
+
+ namespace mlc
+ {
+
+ template <typename T1, typename T2>
+ struct same_coord : mlc::equal<mln_coord(T1), mln_coord(T2)>
+ {
+ };
+
+ } // end of namespace mln::mlc
+
+} // end of namespace mln
+
+
+#endif // ! MLC_SAME_COORD_HH
Index: mlc/same_point.hh
--- mlc/same_point.hh (revision 992)
+++ mlc/same_point.hh (working copy)
@@ -1,8 +1,8 @@
-#ifndef MLN_MLC_SAME_POINT_HH
-# define MLN_MLC_SAME_POINT_HH
+#ifndef MLC_SAME_POINT_HH
+# define MLC_SAME_POINT_HH
# include <mlc/equal.hh>
-# include <core/macros.hh>
+# include <mln/core/macros.hh>
namespace mln
@@ -12,7 +12,7 @@
{
template <typename T1, typename T2>
- struct same_point : mlc::equal<mln_point(T2), mln_point(T2)>
+ struct same_point : mlc::equal<mln_point(T1), mln_point(T2)>
{
};
@@ -21,4 +21,4 @@
} // end of namespace mln
-#endif // ! MLN_MLC_SAME_POINT_HH
+#endif // ! MLC_SAME_POINT_HH
1
0