
https://svn.lrde.epita.fr/svn/oln/trunk/static Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> Automate the compilation of mini-oln. * samples/mini-oln/mini-oln.cc: Remove compilation usage in comment. (oln::Iterator::is_valid, oln::Image::has) (oln::Image2d::nrows_get, oln::Image2d::ncols_get) (oln::Image3d::nrows_get, oln::Image3d::ncols_get) (oln::Image3d::nslis_get, oln::image_base::has): Add missing return keywords. (oln::image_with_nbh::nbh): Disable method. * Makefile.am (SUBDIRS): Add samples. * samples/mini-oln/concept-c++/mini-oln.cc: Likewise. * samples/Makefile.am, * samples/mini-oln/Makefile.am, * samples/mini-oln/concept-c++/Makefile.am: New. Makefile.am | 2 +- samples/Makefile.am | 3 +++ samples/mini-oln/Makefile.am | 25 +++++++++++++++++++++++++ samples/mini-oln/concept-c++/Makefile.am | 21 +++++++++++++++++++++ samples/mini-oln/concept-c++/mini-oln.cc | 27 ++++++++++++--------------- samples/mini-oln/mini-oln.cc | 27 ++++++++++++--------------- 6 files changed, 74 insertions(+), 31 deletions(-) Index: samples/mini-oln/concept-c++/mini-oln.cc --- samples/mini-oln/concept-c++/mini-oln.cc (revision 732) +++ samples/mini-oln/concept-c++/mini-oln.cc (working copy) @@ -27,12 +27,7 @@ /* \file samples/mini-oln/mini-oln.cc \brief A proof of concept of Static using a mini-version of Olena, using - concepts from C++0x. - - Compile with: - - conceptg++ -I../../../../{metalic,static,extended,olena} mini-oln.cc -*/ + concepts from C++0x. */ #include <vector> #include <iostream> @@ -191,7 +186,7 @@ bool is_valid() const { - this->exact().is_valid(); + return this->exact().is_valid(); }; // auto @@ -237,7 +232,7 @@ bool has(const point_t& p) const { - this->exact().has(p); + return this->exact().has(p); } }; } @@ -270,12 +265,12 @@ int nrows_get() const { - this->exact().nrows_get(); + return this->exact().nrows_get(); } int ncols_get() const { - this->exact().ncols_get(); + return this->exact().ncols_get(); } }; } @@ -308,17 +303,17 @@ int nrows_get() const { - this->exact().nrows_get(); + return this->exact().nrows_get(); } int ncols_get() const { - this->exact().ncols_get(); + return this->exact().ncols_get(); } int nslis_get() const { - this->exact().nslis_get(); + return this->exact().nslis_get(); } }; } @@ -353,10 +348,12 @@ typedef oln_type_of_(image_with_nbh, niter) niter_t; typedef oln_type_of_(image_with_nbh, nbh) nbh_t; + // FIXME: Implement. +#if 0 nbh_t nbh() const { - // FIXME. } +#endif }; } @@ -442,7 +439,7 @@ bool has(const point_t& p) const { - this->exact().has(p); + return this->exact().has(p); } }; } Index: samples/mini-oln/concept-c++/Makefile.am --- samples/mini-oln/concept-c++/Makefile.am (revision 0) +++ samples/mini-oln/concept-c++/Makefile.am (revision 0) @@ -0,0 +1,21 @@ +## Process this file through Automake to create Makefile.in -*- Makefile -*- + +AM_CPPFLAGS = -I$(top_srcdir)/static -I$(top_srcdir)/metalic + +# FIXME: Add +# +# AM_CXXFLAGS = $(CXXFLAGS_STRICT) $(CXXFLAGS_DEBUG) +# +# when oln.m4 is available in the distribution, instead of using the +# set-by-hand TESTS_CXXFLAGS. +TESTS_CXXFLAGS = @TESTS_CXXFLAGS@ +AM_CXXFLAGS = $(TESTS_CXXFLAGS) + +# Hacky. +CXX = @CONCEPTCXX@ + +check_PROGRAMS = mini-oln + +mini_oln_SOURCES = mini-oln.cc + +TESTS = $(check_PROGRAMS) Index: samples/mini-oln/mini-oln.cc --- samples/mini-oln/mini-oln.cc (revision 732) +++ samples/mini-oln/mini-oln.cc (working copy) @@ -26,12 +26,7 @@ // Public License. /* \file samples/mini-oln/mini-oln.cc - \brief A proof of concept of Static using a mini-version of Olena. - - Compile with: - - g++ -I../../../{metalic,static,extended,olena} mini-oln.cc -*/ + \brief A proof of concept of Static using a mini-version of Olena. */ #include <vector> @@ -117,7 +112,7 @@ bool is_valid() const { - this->exact().is_valid(); + return this->exact().is_valid(); }; // auto @@ -163,7 +158,7 @@ bool has(const point_t& p) const { - this->exact().has(p); + return this->exact().has(p); } }; } @@ -196,12 +191,12 @@ int nrows_get() const { - this->exact().nrows_get(); + return this->exact().nrows_get(); } int ncols_get() const { - this->exact().ncols_get(); + return this->exact().ncols_get(); } }; } @@ -234,17 +229,17 @@ int nrows_get() const { - this->exact().nrows_get(); + return this->exact().nrows_get(); } int ncols_get() const { - this->exact().ncols_get(); + return this->exact().ncols_get(); } int nslis_get() const { - this->exact().nslis_get(); + return this->exact().nslis_get(); } }; } @@ -279,10 +274,12 @@ typedef oln_type_of_(image_with_nbh, niter) niter_t; typedef oln_type_of_(image_with_nbh, nbh) nbh_t; + // FIXME: Implement. +#if 0 nbh_t nbh() const { - // FIXME. } +#endif }; } @@ -359,7 +356,7 @@ bool has(const point_t& p) const { - this->exact().has(p); + return this->exact().has(p); } }; } Index: samples/mini-oln/Makefile.am --- samples/mini-oln/Makefile.am (revision 0) +++ samples/mini-oln/Makefile.am (revision 0) @@ -0,0 +1,25 @@ +## Process this file through Automake to create Makefile.in -*- Makefile -*- + +SUBDIRS = . concept-c++ + + +AM_CPPFLAGS = -I$(top_srcdir)/static -I$(top_srcdir)/metalic + +# FIXME: Add +# +# AM_CXXFLAGS = $(CXXFLAGS_STRICT) $(CXXFLAGS_DEBUG) +# +# when oln.m4 is available in the distribution, instead of using the +# set-by-hand TESTS_CXXFLAGS. +TESTS_CXXFLAGS = @TESTS_CXXFLAGS@ +AM_CXXFLAGS = $(TESTS_CXXFLAGS) + + +check_PROGRAMS = mini-oln + +mini_oln_SOURCES = mini-oln.cc + +TESTS = $(check_PROGRAMS) + + +EXTRA_DIST = README Index: samples/Makefile.am --- samples/Makefile.am (revision 0) +++ samples/Makefile.am (revision 0) @@ -0,0 +1,3 @@ +## Process this file through Automake to create Makefile.in -*- Makefile -*- + +SUBDIRS = mini-oln Index: Makefile.am --- Makefile.am (revision 732) +++ Makefile.am (working copy) @@ -1,3 +1,3 @@ ## Process this file through Automake to create Makefile.in -*- Makefile -*- -SUBDIRS = stc tests +SUBDIRS = stc tests samples