740: Add slides to stc doc and update stc doc tiny.

2007-02-15 Thierry GERAUD <theo@tegucigalpa.lrde.epita.fr> Add some slides that present the SCOOP 2 paradigm. * doc/latex/paradigm/slides.tex: New. * doc/latex/paradigm/figures: New. * doc/latex/paradigm/figures/zoomin.fig: New. * doc/latex/paradigm/figures/vt2.fig: New. * doc/latex/paradigm/figures/harder0x.fig: New. * doc/latex/paradigm/figures/simplescoop1.fig: New. * doc/latex/paradigm/figures/concepts.fig: New. * doc/latex/paradigm/figures/alt.fig: New. * doc/latex/paradigm/figures/simplegp.fig: New. * doc/latex/paradigm/figures/evolution.fig: New. * doc/latex/paradigm/figures/simpledeco.fig: New. * doc/latex/paradigm/figures/simpleoo.fig: New. * doc/latex/paradigm/figures/glance.fig: New. * doc/latex/paradigm/figures/getset.fig: New. * doc/latex/paradigm/figures/simple0x.fig: New. * doc/latex/paradigm/figures/simpleoovt.fig: New. * doc/latex/paradigm/figures/corn.fig: New. * doc/latex/paradigm/figures/simplevt.fig: New. * doc/latex/paradigm/figures/selectors.fig: New. * doc/latex/paradigm/figures/scoop1a.fig: New. * doc/latex/paradigm/figures/harddeco.fig: New. * doc/latex/paradigm/figures/design.fig: New. * doc/latex/paradigm/figures/vt1.fig: New. * doc/latex/paradigm/wewant.tex: New. * doc/latex/paradigm/myhyperref.sty: New. * doc/latex/paradigm/atour.tex: New. * doc/latex/paradigm/numberslides.sty: New. * doc/latex/paradigm/newalg.sty: New. * doc/latex/paradigm/Makefile: New. * doc/latex/paradigm/sequel.tex: New. Update the tiny examples. * doc/tiny/local/scoop.hh (true_, false_): Turn from bexpr_ to static Boolean values. (stc_equip_namespace): Remove the namespace arg. (tag, delegatee_type): Rename as... (behavior, delegatee): ...these. (any): New in scooped namespaced. (top): Remove category so it can be "not found" by default. (concept_): Remove; just use "any" instead. (impl): Split some parts into... (get_impl, set_impl): ...these new classes. (stc_is, stc_is_not): New macros. (stc_Header, stc_End): New macros. * doc/tiny/a_la_scoop_1/main.cc: Add commentary. * doc/tiny/a_la_scoop_1/main.cc: Add commentary. * doc/tiny/a_la_scoop_2/main.cc: Update. * doc/tiny/a_la_scoop_2/desugar.cc: Update. * doc/tiny/a_la_scoop_1_plus/main.cc: Update. * doc/tiny/more_scoop_2/identity.hh: Update. * doc/tiny/more_scoop_2/main.cc: Update. * doc/tiny/local/scoop.hh: Update. * doc/tiny/local/undefs.hh: Update. Move some code into independent files. * doc/tiny/more_scoop_2/reverse_iterator.hh: New. * doc/tiny/more_scoop_2/concepts.hh: New. * stc/properties.hh (std::is_a): New helper. (stc_super, stc_pseudosuper, stc_typeof): Simplify the definitions of these macros, using their ``underscored'' version. (stc_typeof_in_namespace, stc_typeof_in_namespace_): New macro. * tests/properties.cc: Typos in comments. Index: doc/tiny/a_la_scoop_1/main.cc =================================================================== --- doc/tiny/a_la_scoop_1/main.cc (révision 739) +++ doc/tiny/a_la_scoop_1/main.cc (copie de travail) @@ -77,7 +77,7 @@ template <typename T> class array_iterator; template <typename T> - struct vtypes< current > : vtypes< super > + struct vtypes< current > : vtypes< super > // inheritance like in the paper about SCOOP { typedef T value; }; Index: doc/tiny/a_la_scoop_2/main.cc =================================================================== --- doc/tiny/a_la_scoop_2/main.cc (révision 739) +++ doc/tiny/a_la_scoop_2/main.cc (copie de travail) @@ -34,13 +34,12 @@ #include "../local/scoop.hh" -stc_equip_namespace(abc); - - - namespace abc { + stc_equip_namespace; + + // List of associated types. stc_decl_associated_type(value); @@ -48,8 +47,8 @@ // Iterator template <typename Exact> - struct Iterator : public concept_<Exact>, - public automatic::impl<Iterator, Exact> + struct Iterator : public any<Exact>, + public automatic::get_impl<Iterator, Exact> { stc_typename(value); void next() { this->exact().impl_next(); } Index: doc/tiny/a_la_scoop_2/desugar.cc =================================================================== --- doc/tiny/a_la_scoop_2/desugar.cc (révision 739) +++ doc/tiny/a_la_scoop_2/desugar.cc (copie de travail) @@ -34,13 +34,13 @@ #include "../local/scoop.hh" -stc_equip_namespace(abc); - namespace abc { + stc_equip_namespace; + // List of associated types. stc_decl_associated_type(value); @@ -48,8 +48,8 @@ // Iterator template <typename Exact> - struct Iterator : public concept_<Exact>, - public automatic::impl<Iterator, Exact> + struct Iterator : public any<Exact>, + public automatic::get_impl<Iterator, Exact> { stc_typename(value); void next() { this->exact().impl_next(); } @@ -65,9 +65,10 @@ template <typename T> struct vtypes< array_iterator<T> > { - typedef top< array_iterator<T> > super_type; + typedef array_iterator<T> current; + typedef top< current > super_type; + typedef stc::is<Iterator> category; - typedef T value; }; @@ -75,7 +76,8 @@ class array_iterator : public top< array_iterator<T> > { public: - typedef top< array_iterator<T> > super; + typedef array_iterator<T> current; + typedef top< current > super; stc_using(value); void impl_next() { i_ = i_ + 1; } Index: doc/tiny/a_la_scoop_1_plus/main.cc =================================================================== --- doc/tiny/a_la_scoop_1_plus/main.cc (révision 739) +++ doc/tiny/a_la_scoop_1_plus/main.cc (copie de travail) @@ -34,21 +34,23 @@ #include "../local/scoop.hh" -stc_equip_namespace(abc); namespace abc { + stc_equip_namespace; + + // List of associated types. stc_decl_associated_type(value); // Iterator -# define super stc::any<Exact> - // ----------------- +# define super any<Exact> + // ------------ // ^ // | # define current Iterator<Exact> @@ -64,7 +66,7 @@ stc_End; template <typename Exact> - struct Iterator : public stc::any<Exact> + struct Iterator : public super { stc_typename(value); void next() { this->exact().impl_next(); } Index: doc/tiny/more_scoop_2/reverse_iterator.hh =================================================================== --- doc/tiny/more_scoop_2/reverse_iterator.hh (révision 0) +++ doc/tiny/more_scoop_2/reverse_iterator.hh (révision 0) @@ -0,0 +1,97 @@ +// 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 STC_DOC_TINY_MORE_SCOOP_2_REVERSE_ITERATOR_HH + +/* \file doc/tiny/more_scoop_2/reverse_iterator.hh + + \brief Specific definitions for reverse applying on iterators. */ + + +namespace abc +{ + + template <typename T> + struct single_vtype < reverse<T>, typedef_::forward > + { + typedef stc_prop(T, backward) ret; + }; + + + template <typename T> + struct single_vtype < reverse<T>, typedef_::backward > + { + typedef stc_prop(T, forward) ret; + }; + + + + namespace automatic + { + + // default: behavior::reverse is behavior::identity + + template <template <class> class abstraction, typename Exact> + struct set_impl< abstraction, behavior::reverse, Exact > : public impl< abstraction, behavior::identity, Exact > + { + }; + + + // Forward_Iterator + + template <typename Exact> + struct set_impl< Forward_Iterator, behavior::reverse, Exact > : public virtual any<Exact> + { + void impl_next() { this->exact().delegatee_.prev(); } + }; + + + // Backward_Iterator + + template <typename Exact> + struct set_impl< Backward_Iterator, behavior::reverse, Exact > : public virtual any<Exact> + { + void impl_prev() { this->exact().delegatee_.next(); } + }; + + + } // end of namespace abc::automatic + + + + template <typename I> + reverse<I> make_reverse(Iterator<I>& iter) + { + reverse<I> tmp(iter.exact()); + return tmp; + } + + +} // end of namespace abc + + +#endif // ! STC_DOC_TINY_MORE_SCOOP_2_REVERSE_ITERATOR_HH Index: doc/tiny/more_scoop_2/identity.hh =================================================================== --- doc/tiny/more_scoop_2/identity.hh (révision 739) +++ doc/tiny/more_scoop_2/identity.hh (copie de travail) @@ -1,7 +1,47 @@ +// 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 STC_DOC_TINY_MORE_SCOOP_2_IDENTITY_HH + +/* \file doc/tiny/more_scoop_2/identity.hh + + \brief Identity behavior for iterators. */ + + namespace abc { + + // Behavior tag. + + namespace behavior { struct identity; } + + + namespace automatic { @@ -9,35 +49,91 @@ // Iterator template <typename Exact> - struct impl< Iterator, Exact, tag::identity > : public virtual stc::any<Exact> + struct set_impl< Iterator, behavior::identity, Exact > : public virtual any<Exact> { - stc_typename(value); - - bool impl_is_valid() const { return this->exact().delegatee().is_valid(); } - void impl_set(const value& v) { this->exact().delegatee().set(v); } + void impl_init() { this->exact().delegatee_.init(); } + bool impl_is_valid() const { return this->exact().delegatee_.is_valid(); } }; + // Forward_Iterator template <typename Exact> - struct impl< Forward_Iterator, Exact, tag::identity > : public virtual stc::any<Exact> + struct set_impl< Forward_Iterator, behavior::identity, Exact > : public virtual any<Exact> { - void impl_next() { this->exact().delegatee().next(); } + void impl_next() { this->exact().delegatee_.next(); } }; + // Backward_Iterator + + template <typename Exact> + struct set_impl< Backward_Iterator, behavior::identity, Exact > : public virtual any<Exact> + { + void impl_prev() { this->exact().delegatee_.prev(); } + }; + + // Bidirectional_Iterator template <typename Exact> - struct impl< Bidirectional_Iterator, Exact, tag::identity > : public virtual stc::any<Exact> + struct set_impl< Bidirectional_Iterator, behavior::identity, Exact > : public virtual any<Exact> { - void impl_prev() { this->exact().delegatee().impl_prev(); } }; + + // Read_Iterator + + template <typename Exact> + struct set_impl< Read_Iterator, behavior::identity, Exact > : public virtual any<Exact> + { + stc_typename(value); + const value& impl_get_value() const { return this->exact().delegatee_.get_value(); } + }; + + + // Read_Only_Iterator + + template <typename Exact> + struct set_impl< Read_Only_Iterator, behavior::identity, Exact > : public virtual any<Exact> + { + }; + + + // Write_Iterator + + template <typename Exact> + struct set_impl< Write_Iterator, behavior::identity, Exact > : public virtual any<Exact> + { + stc_typename(value); + void impl_set_value(const value& v) { this->exact().delegatee_.set_value(v); } + }; + + + // Write_Only_Iterator + + template <typename Exact> + struct set_impl< Write_Only_Iterator, behavior::identity, Exact > : public virtual any<Exact> + { + }; + + + // Read_Write_Iterator + + template <typename Exact> + struct set_impl< Read_Write_Iterator, behavior::identity, Exact > : public virtual any<Exact> + { + }; + + + + } // end of namespace abc::automatic } // end of namespace abc + +#endif // ! STC_DOC_TINY_MORE_SCOOP_2_IDENTITY_HH Index: doc/tiny/more_scoop_2/main.cc =================================================================== --- doc/tiny/more_scoop_2/main.cc (révision 739) +++ doc/tiny/more_scoop_2/main.cc (copie de travail) @@ -32,20 +32,22 @@ #include <iostream> #include "../local/scoop.hh" +#include "concepts.hh" -stc_equip_namespace(abc); - - namespace abc { + stc_equip_namespace; + + // List of associated types. stc_decl_associated_type(value); - stc_decl_associated_type(reference); stc_decl_associated_type(forward); stc_decl_associated_type(backward); + stc_decl_associated_type(read); + stc_decl_associated_type(write); @@ -55,38 +57,118 @@ // Iterator template <typename Exact> - struct Iterator : public concept_<Exact>, - public automatic::impl<Iterator, Exact> + struct Iterator : public virtual any<Exact>, + public automatic::get_impl<Iterator, Exact> { stc_typename(value); + void init() { return this->exact().impl_init(); } bool is_valid() const { return this->exact().impl_is_valid(); } - void set(const value& v) { this->exact().impl_set(v); } }; + // Forward_Iterator template <typename Exact> - struct Forward_Iterator : public Iterator<Exact>, - public automatic::impl<Forward_Iterator, Exact> + struct Forward_Iterator : public virtual Iterator<Exact>, + public automatic::get_impl<Forward_Iterator, Exact> { void next() { this->exact().impl_next(); } }; + // Backward_Iterator + + template <typename Exact> + struct Backward_Iterator : public virtual Iterator<Exact>, + public automatic::get_impl<Backward_Iterator, Exact> + { + void prev() { this->exact().impl_prev(); } + }; + + // Bidirectional_Iterator template <typename Exact> struct Bidirectional_Iterator : public Forward_Iterator<Exact>, - public automatic::impl<Bidirectional_Iterator, Exact> + public Backward_Iterator<Exact>, + public automatic::get_impl<Bidirectional_Iterator, Exact> { - void prev() { this->exact().impl_prev(); } }; + // Read_Iterator + template <typename Exact> + struct Read_Iterator : public virtual Iterator<Exact>, + public automatic::get_impl<Read_Iterator, Exact> + { + typedef Iterator<Exact> super; + stc_using(value); + // FIXME: read below + const value& get_value() const { return this->exact().impl_get_value(); } + }; + + + // Read_Only_Iterator + + template <typename Exact> + struct Read_Only_Iterator : public Read_Iterator<Exact>, + public automatic::get_impl<Read_Only_Iterator, Exact> + { + }; + + + // Write_Iterator + + template <typename Exact> + struct Write_Iterator : public virtual Iterator<Exact>, + public automatic::get_impl<Write_Iterator, Exact> + { + typedef Iterator<Exact> super; + stc_using(value); + void set_value(const value& v) { return this->exact().impl_set_value(v); } + }; + + + // Write_Only_Iterator + + template <typename Exact> + struct Write_Only_Iterator : public Write_Iterator<Exact>, + public automatic::get_impl<Write_Only_Iterator, Exact> + { + }; + + + // Read_Write_Iterator + + template <typename Exact> + struct Read_Write_Iterator : public Read_Iterator<Exact>, + public Write_Iterator<Exact>, + public automatic::get_impl<Read_Write_Iterator, Exact> + { + }; + + + + + + // FIXME: pick a solution: + // + // typedef Iterator<Exact> super; + // stc_using(value); + // + // stc_super_is(Iterator); + // stc_using(value); + // + // stc_super_using(Iterator, value); + // + // stc_using_from(value, Iterator); + + + // - - - - - - - - - - - - - - - - - - - - FIXME: plug @@ -98,21 +180,71 @@ typedef selector<Iterator, 1> Iterator_browsing; template <typename E> - struct case_< Iterator_browsing, E, 1 > : where_< mlc::and_< stc_prop(forward), stc_prop(backward) > > + struct case_< Iterator_browsing, E, 1 > : where_< mlc::and_< stc_is(forward), + stc_is(backward) > > { typedef Bidirectional_Iterator<E> ret; }; template <typename E> - struct case_< Iterator_browsing, E, 2 > : where_< stc_prop(forward) > + struct case_< Iterator_browsing, E, 2 > : where_< stc_is(forward) > { typedef Forward_Iterator<E> ret; }; + template <typename E> + struct case_< Iterator_browsing, E, 3 > : where_< stc_is(backward) > + { + typedef Backward_Iterator<E> ret; + }; + + + // selector 2 is about Iterator accessibility (readability / writability) + + typedef selector<Iterator, 2> Iterator_accessibility; + + template <typename E> + struct case_< Iterator_accessibility, E, 1 > : where_< mlc::and_< stc_is(read), + stc_is(write) > > + { + typedef Read_Write_Iterator<E> ret; + }; + + template <typename E> + struct case_< Iterator_accessibility, E, 2 > : where_< mlc::and_< stc_is(read), + stc_is_not(write) > > + { + typedef Read_Only_Iterator<E> ret; + }; + + template <typename E> + struct case_< Iterator_accessibility, E, 3 > : where_< mlc::and_< stc_is(write), + stc_is_not(read) > > + { + typedef Write_Only_Iterator<E> ret; + }; + + } // end of internal +} // end of namespace abc + + + + + +# include "identity.hh" + + + + + + +namespace abc +{ + // - - - - - - - - - - - - - - - - - - - - classes @@ -132,11 +264,8 @@ stc_Header; - - typedef stc::is<Iterator> category; - typedef stc::abstract value; - typedef stc::final< stc_deferred(value) & > reference; - + typedef stc::final< stc::is<Iterator> > category; + typedef stc::abstract value; stc_End; @@ -144,13 +273,7 @@ class iterator_base : public super { public: - - stc_lookup(value); - - // a base class can factor some code! - // for instance: - const value& get() const { return v_; } - + stc_using(value); protected: iterator_base() {} value v_; @@ -176,9 +299,7 @@ stc_Header; - - typedef stc::abstract delegatee_type; - + typedef stc::abstract delegatee; stc_End; @@ -186,15 +307,10 @@ class lightweight_iterator : public super { public: - - stc_lookup(delegatee_type); - - const delegatee_type& delegatee() const { return delegatee_; } - delegatee_type& delegatee() { return delegatee_; } - + stc_lookup(delegatee); + delegatee& delegatee_; protected: - lightweight_iterator(delegatee_type& d) : delegatee_(d) {} - delegatee_type& delegatee_; + lightweight_iterator(delegatee& d) : delegatee_(d) {} }; @@ -203,7 +319,6 @@ - // array_iterator<T> @@ -221,11 +336,9 @@ stc_Header; - - typedef T value; - typedef stc::true_ forward; - typedef stc::true_ backward; - + typedef T value; + typedef stc::true_ forward; + typedef stc::true_ write; stc_End; @@ -235,12 +348,15 @@ public: stc_using(value); + + void impl_init() { i_ = 0; } void impl_next() { i_ = i_ + 1; } bool impl_is_valid() const { return i_ >= 0 and i_ < n_; } - void impl_set(const value& v) { this->v_ = v; } - void impl_prev() { i_ = i_ - 1; } + void impl_set_value(const value& v) { this->v_ = v; } - array_iterator(int n) : i_(0), n_(n) {} + array_iterator(int n) : n_(n) {} + int& index() { return i_; } + int index() const { return i_; } protected: int i_, n_; }; @@ -251,151 +367,143 @@ + // hello_iterator +# define current hello_iterator<I> + // ------------------- +# define super lightweight_iterator< current > +# define templ template <typename I> +# define classname hello_iterator - // algo - template <typename I> - void algo(Iterator<I>& iter, typename I::value val) - { - std::cout << "Iterator" << std::endl; - if (iter.is_valid()) - { - iter.set(val); - } - } + stc_Header; + typedef I delegatee; + typedef behavior::identity behavior; + stc_End; - template <typename I> - void algo(Forward_Iterator<I>& iter, typename I::value val) - { - std::cout << "Forward_Iterator" << std::endl; - while (iter.is_valid()) - { - std::cout << '.'; - iter.set(val); - iter.next(); - } - std::cout << std::endl; - } template <typename I> - void algo(Bidirectional_Iterator<I>& iter, typename I::value val) + class hello_iterator : public super { - std::cout << "Bidirectional_Iterator" << std::endl; - while (iter.is_valid()) - { - std::cout << '.'; - iter.set(val); - iter.next(); - } - std::cout << std::endl; - } + public: + void impl_init() + { + std::cout << "hello!" << std::endl; + super::impl_init(); + } -} // abc + hello_iterator(Iterator<I>& it) + : super(it.exact()) + { + } + }; +# include "../local/undefs.hh" -namespace abc -{ - namespace tag - { - struct identity; + // Behavior tag for reverse<T>. - } // abc::tag + namespace behavior { struct reverse; } -} // abc -#include "identity.hh" +# define current reverse<T> + // ------------ +# define templ template <typename T> +# define classname reverse +# define super top< current > -namespace abc -{ + stc_Header; + typedef T delegatee; + typedef behavior::reverse behavior; + stc_End; + template <typename T> + class reverse : public super + { + public: + T& delegatee_; + reverse(T& d) : delegatee_(d) {} // ctor + }; - // skippy +# include "../local/undefs.hh" + -# define current skippy<I> - // ------------------------- +} // abc -# define templ template <typename I> -# define classname skippy -# define super lightweight_iterator< current > - stc_Header; - typedef I delegatee_type; - typedef tag::identity tag; +// when reverse applies to an iterator: - stc_End; +# include "reverse_iterator.hh" - template <typename I> - class skippy : public super - { - public: - skippy(Iterator<I>& it, unsigned skip) - : - super(it.exact()), - skip_(skip) - { - } - void impl_next() - { - for (unsigned i = 0; i <= skip_; ++i) - this->delegatee().next(); - } +// test routines - void impl_prev() - { - for (unsigned i = 0; i <= skip_; ++i) - this->delegatee().prev(); - } - protected: - unsigned skip_; - }; +template <typename I> +void init(abc::Iterator<I>& iter) +{ + iter.init(); +} +template <typename I> +void echo(const abc::Forward_Iterator<I>& iter) +{ + std::cout << "Forward Iterator" << std::endl; +} -# include "../local/undefs.hh" +template <typename I> +void echo(const abc::Backward_Iterator<I>& iter) +{ + std::cout << "Backward Iterator" << std::endl; +} - template <typename I> - skippy<I> skip(Iterator<I>& it, unsigned s) - { - skippy<I> tmp(it, s); - return tmp; - } +int main() +{ + typedef abc::array_iterator<int> iterator_t; + { + // hello -} // abc + typedef abc::hello_iterator<iterator_t> iterator2_t; + iterator_t i(7); + i.index() = 51; + iterator2_t j(i); + init(j); + std::cout << i.index() << std::endl; + } + { + // reverse -int main() -{ - typedef abc::array_iterator<int> iterator_t; - int val = 51; + typedef abc::reverse<iterator_t> iterator2_t; - { - iterator_t i(8); - abc::algo(i, val); + iterator_t i(7); + echo(i); + iterator2_t j = abc::make_reverse(i); + echo(j); + + i.init(); + std::cout << i.index() << std::endl; + + j.prev(); + std::cout << i.index() << std::endl; } - { - iterator_t i(8); - abc::skippy<iterator_t> ii = skip(i, 1u); - abc::algo(ii, val); - } + } Index: doc/tiny/more_scoop_2/concepts.hh =================================================================== --- doc/tiny/more_scoop_2/concepts.hh (révision 0) +++ doc/tiny/more_scoop_2/concepts.hh (révision 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 STC_DOC_TINY_MORE_SCOOP_2_CONCEPTS_HH + +/* \file doc/tiny/more_scoop_2/concepts.hh + + \brief Forward declaration of concepts. */ + + +namespace abc +{ + + template <typename Exact> struct Iterator; + + template <typename Exact> struct Forward_Iterator; + template <typename Exact> struct Backward_Iterator; + template <typename Exact> struct Bidirectional_Iterator; + + template <typename Exact> struct Read_Iterator; + template <typename Exact> struct Read_Only_Iterator; + template <typename Exact> struct Write_Iterator; + template <typename Exact> struct Write_Only_Iterator; + template <typename Exact> struct Read_Write_Iterator; + +} // end of namespace abc + + +#endif // ! STC_DOC_TINY_MORE_SCOOP_2_CONCEPTS_HH Index: doc/tiny/local/scoop.hh =================================================================== --- doc/tiny/local/scoop.hh (révision 739) +++ doc/tiny/local/scoop.hh (copie de travail) @@ -62,8 +62,8 @@ template < template <class> class > struct is; - typedef mlc::bexpr_<true> true_; - typedef mlc::bexpr_<false> false_; + typedef mlc::true_ true_; + typedef mlc::false_ false_; } // end of namespace stc @@ -76,15 +76,31 @@ +// Access to associated type +# define stc_type_(From, Type) vtype<From, typedef_::Type>::ret +# define stc_type(From, Type) typename stc_type_(From, Type) -# define stc_equip_namespace(SCOOPED_NAMESPACE) \ +// below the more tolerant version is used, namely stc_deferred, +// yet it sometimes can be replaced by "stc_find_type(E, Name)" +# define stc_find_type_(From, Type) find_vtype<From, typedef_::Type>::ret +# define stc_find_type(From, Type) typename stc_find_type_(From, Type) + +// Boolean expression counterpart of stc_find_type +# define stc_is_found(Type) mlc::is_found_< stc_deferred(Type) > +# define stc_is_not_found(Type) mlc::is_not_found_< stc_deferred(Type) > + + + + +# define stc_equip_namespace \ \ \ -namespace SCOOPED_NAMESPACE \ -{ \ + mlc_decl_typedef(exact_type); \ \ - mlc_decl_typedef(delegatee_type); \ + mlc_decl_typedef(category); \ + mlc_decl_typedef(behavior); \ + mlc_decl_typedef(delegatee); \ \ \ template <typename from_type> \ @@ -117,7 +133,7 @@ \ template < typename from, \ typename target > \ - struct vtype_not_found; \ + struct vtype_not_defined; \ \ \ template < typename curr, \ @@ -146,7 +162,7 @@ struct no_delegatee_declared_; \ \ \ - } /* end of namespace SCOOPED_NAMESPACE::ERROR */ \ + } /* end of namespace ERROR */ \ \ \ \ @@ -236,10 +252,10 @@ template <typename from, typename target> \ struct get_stm \ { \ - typedef SCOOPED_NAMESPACE::vtypes<from> decl1; \ + typedef vtypes<from> decl1; \ typedef typename target::template from_<decl1>::ret res1; \ \ - typedef SCOOPED_NAMESPACE::single_vtype<from, target> decl2; \ + typedef single_vtype<from, target> decl2; \ typedef typename decl2::ret ret2; \ \ typedef typename helper_get_stm<res1, ret2>::ret ret; \ @@ -309,7 +325,7 @@ template <typename curr, typename target> \ struct check_delegatee_inherited \ : mlc::assert_< mlc::is_found_< typename first_stm<curr, \ - typedef_::delegatee_type>::ret::second_elt >, \ + typedef_::delegatee>::ret::second_elt >, \ ERROR::no_delegatee_declared_ > \ { \ }; \ @@ -626,8 +642,8 @@ * \ * delegator_find(from, target) \ * { \ - * precondition(target != delegatee_type); \ - * delegatee = superior_find(from, delegatee_type); \ + * precondition(target != delegatee); \ + * delegatee = superior_find(from, delegatee); \ * if (delegatee == mlc::not_found) \ * return mlc::not_found; \ * else \ @@ -651,7 +667,7 @@ template <typename from, typename target> \ struct delegator_find \ { \ - typedef typename superior_find<from, typedef_::delegatee_type>::ret delegatee; \ + typedef typename superior_find<from, typedef_::delegatee>::ret delegatee; \ typedef typename helper_delegator_find<from, target, delegatee>::ret ret; \ }; \ \ @@ -711,17 +727,17 @@ * \ * find(from, target) \ * { \ - * if (target == delegatee_type) \ - * return superior_find(from, delegatee_type); \ + * if (target == delegatee) \ + * return superior_find(from, delegatee); \ * else \ * return helper_find(from, target); \ * } \ */ \ \ template <typename from> \ - struct find <from, /* if target == */ typedef_::delegatee_type > \ + struct find <from, /* if target == */ typedef_::delegatee > \ { \ - typedef typename superior_find<from, typedef_::delegatee_type>::ret ret; \ + typedef typename superior_find<from, typedef_::delegatee>::ret ret; \ }; \ \ template <typename from, typename target> \ @@ -735,7 +751,7 @@ }; \ \ \ - } /* end of SCOOPED_NAMESPACE::internal */ \ + } /* end of internal */ \ \ \ /* \ @@ -762,7 +778,8 @@ struct vtype \ { \ typedef typename find_vtype<from, target>::ret res; \ - struct check_ : mlc::assert_< mlc::is_found_<res> > \ + struct check_ : mlc::assert_< mlc::is_found_<res>, \ + ERROR::vtype_not_defined<from, target> > \ { \ typedef res ret; \ }; \ @@ -773,11 +790,35 @@ \ mlc_case_equipment_for_namespace(internal); \ \ - mlc_decl_typedef(tag); \ - mlc_decl_typedef(category); \ - mlc_decl_typedef(exact_type); \ \ \ + \ + /* any */ \ + \ + template <typename E> \ + struct any; \ + \ + template <typename E> \ + struct vtypes< any<E> > \ + { \ + typedef mlc::none super_type; \ + typedef stc::final<E> exact_type; \ + }; \ + \ + \ + template <typename E> \ + struct any : public stc::any<E> \ + { \ + typedef E exact_type; \ + using stc::any<E>::exact; \ + \ + protected: \ + any() {} \ + }; \ + \ + \ + \ + \ namespace internal \ { \ \ @@ -806,7 +847,7 @@ \ template < template <class> class abstraction, \ typename E > \ - struct next_plug_node < abstraction, E, 1, mlc::false_ > \ + struct next_plug_node < abstraction, E, 1, mlc::false_ > \ : public abstraction<E> \ { \ protected: next_plug_node() {} \ @@ -872,16 +913,18 @@ }; \ \ template <typename E> \ - struct top < mlc::not_found, E > \ + struct top < mlc::none, E > : public any<E> \ { \ protected: top() {} \ }; \ \ + template <typename E> \ + struct top < mlc::not_found, E >; /* FIXME: Error msg here */ \ \ + \ } /* end of namespace internal */ \ \ \ - \ /* top class */ \ \ template <typename E> struct top; \ @@ -889,9 +932,8 @@ template <typename E> \ struct vtypes< top<E> > \ { \ - typedef mlc::none super_type; \ - typedef stc::abstract category; \ - typedef stc::final<E> exact_type; \ + typedef any<E> super_type; \ + /* default is "no category" */ \ }; \ \ template <typename E> \ @@ -903,169 +945,92 @@ \ \ \ - /* stc::any vtypes in equipped namespace; code required for SCOOP 1 */ \ - \ - template <typename E> \ - struct vtypes< stc::any<E> > \ + namespace automatic \ { \ - typedef mlc::none super_type; \ - typedef stc::final<E> exact_type; \ - }; \ \ + /* \ + * set_impl \ + */ \ \ + template < template <class> class abstraction, typename behavior, typename E > \ + struct set_impl \ + /* to be defined by the client */ ; \ \ - /* concept class */ \ \ - template <typename E> \ - struct concept_ : public virtual stc::any<E> \ - { \ - protected: \ - concept_() {} \ - }; \ \ + /* \ + * impl \ + */ \ \ - namespace automatic \ - { \ + template < template <class> class abstraction, typename behavior, typename E > \ + struct impl : public set_impl< abstraction, behavior, E > \ + { /* fetch */ }; \ \ - template < template <class> class abstraction, typename E, typename tag = void > \ - struct impl \ - /* undefined */ ; \ - \ template < template <class> class abstraction, typename E > \ - struct impl< abstraction, E, mlc::not_found > \ + struct impl< abstraction, /* behavior is */ mlc::not_found, E > \ { /* nothing */ }; \ \ template < template <class> class abstraction, typename E > \ - struct impl< abstraction, E, void > : impl< abstraction, E, stc_find_type(E, tag) > \ - { /* fetch impl w.r.t. tag */ }; \ + struct impl< abstraction, mlc::none /* behavior */, E > \ + { /* nothing */ }; \ \ - } /* end of namespace automatic */ \ \ \ + /* \ + * get_impl \ + */ \ \ -} /* end of SCOOPED_NAMESPACE */ \ + template < template <class> class abstraction, typename E > \ + struct get_impl : impl< abstraction, stc_find_type(E, behavior), E > \ + { /* depends upon behavior */ }; \ \ \ -struct e_n_d__w_i_t_h___s_e_m_i_c_o_l_o_n; + } /* end of namespace automatic */ \ + \ + \ +struct e_n_d__w_i_t_h___s_e_m_i_c_o_l_o_n -/* - -// -------------------------------------------- -// O L D B U N C H O F M A C R O S -// -------------------------------------------- - - - -# define stc_find_vtype_(Namespace, From, Target) \ - Namespace::find_vtype<From, Namespace::typedef_::Target##_type>::ret - -# define stc_find_vtype(Namespace, From, Target) \ - typename stc_find_vtype_(Namespace, From, Target) - - - -# define stc_deferred_vtype_(Namespace, From, Target) \ - Namespace::deferred_vtype<From, Namespace::typedef_::Target##_type>::ret - -# define stc_deferred_vtype(Namespace, From, Target) \ - typename stc_deferred_vtype_(Namespace, From, Target) - - - -# define stc_vtype_(Namespace, From, Target) \ - Namespace::vtype<From, Namespace::typedef_::Target##_type>::ret - -# define stc_vtype(Namespace, From, Target) \ - typename stc_vtype_(Namespace, From, Target) - - - -# define stc_find_deduce_vtype_(Namespace, From, Target1, Target2) \ - Namespace::find_vtype< Namespace::find_vtype<From, \ - Namespace::typedef_::Target1##_type>::ret, \ - Namespace::typedef_::Target2##_type>::ret - -# define stc_find_deduce_vtype(Namespace, From, Target1, Target2) \ - typename \ - Namespace::find_vtype< typename \ - Namespace::find_vtype<From, \ - Namespace::typedef_::Target1##_type>::ret, \ - Namespace::typedef_::Target2##_type>::ret - - - -# define stc_deduce_deferred_vtype(Namespace, From, Target1, Target2) \ - typename \ - Namespace::deferred_vtype< typename \ - Namespace::deferred_vtype<From, \ - Namespace::typedef_::Target1##_type>::ret, \ - Namespace::typedef_::Target2##_type>::ret \ - - - -# define stc_deduce_vtype_(Namespace, From, Target1, Target2) \ - Namespace::vtype< Namespace::vtype<From, \ - Namespace::typedef_::Target1##_type>::ret, \ - Namespace::typedef_::Target2##_type>::ret - -# define stc_deduce_vtype(Namespace, From, Target1, Target2) \ - typename \ - Namespace::vtype< typename \ - Namespace::vtype<From, \ - Namespace::typedef_::Target1##_type>::ret, \ - Namespace::typedef_::Target2##_type>::ret - - -// # define stc_vtype_is_found_(Namespace, From, Target) -// mlc::is_found_< Namespace::find_vtype<From, Namespace::typedef_::Target##_type>::ret > - - -// ---------------------------------------------------------- -// E N D O F O L D B U N C H O F M A C R O S -// ---------------------------------------------------------- - -*/ - - - - -# define stc_type_(From, Type) vtype<From, typedef_::Type>::ret -# define stc_type(From, Type) typename stc_type_(From, Type) - -# define stc_find_type(From, Type) typename find_vtype<From, typedef_::Type>::ret - - // For concepts. # define stc_typename(Type) typedef stc_type(Exact, Type) Type # define stc_using(Type) typedef typename super::Type Type -# define stc_deferred(Type) \ - typename deferred_vtype< typename deferred_vtype< current, \ - typedef_::exact_type >::ret, \ - typedef_::Type >::ret - - // For impl classes. +# define stc_deferred(Type) typename deferred_vtype<Exact, typedef_::Type >::ret # define stc_lookup(Type) typedef typename vtype< stc_type(current, exact_type), typedef_::Type>::ret Type -// typedef stc_type(current, Type) Type -# define stc_prop(Name) stc_find_type(E, Name) +// the macro below was called stc_prop which was ambiguous +// (that lets us think that it is true_ or false_) but the +// result is a mlc::bexpr_! +// so it has been renamed as stc_is +# define stc_is(Type) mlc::eq_< stc_find_type(E, Type), stc::true_ > +// likewise: +# define stc_is_not(Type) \ + mlc::or_< mlc::eq_< stc_find_type(E, Type), \ + mlc::not_found >, \ + mlc::eq_< stc_find_type(E, Type), \ + stc::false_ > > + +# define stc_prop(From, Type) typename mlc::eq_< stc_find_type(From, Type), stc::true_ >::eval + + + + // sugar: -# define stc_Header \ - \ -templ class classname ; /* fwd decl */ \ - \ -templ struct vtypes< current > /* vtypes */ \ -{ \ - typedef super super_type \ +# define stc_Header \ + \ +templ class classname ; /* fwd decl */ \ + \ +templ struct vtypes< current > /* vtypes */ \ +{ \ + typedef super super_type Index: doc/tiny/local/undefs.hh =================================================================== --- doc/tiny/local/undefs.hh (révision 739) +++ doc/tiny/local/undefs.hh (copie de travail) @@ -35,3 +35,5 @@ #undef super #undef templ #undef classname + +// FIXME: Replace templ by 'paramlist'? Index: doc/latex/paradigm/slides.tex =================================================================== --- doc/latex/paradigm/slides.tex (révision 0) +++ doc/latex/paradigm/slides.tex (révision 0) @@ -0,0 +1,401 @@ +\documentclass{beamer} + + \mode<article> % only for the article version + { + \usepackage{fullpage} + \usepackage{hyperref} + } + + + \mode<presentation> + { + \setbeamertemplate{background canvas}[vertical shading][bottom=red!10,top=blue!10] + \usetheme{Warsaw} + \usefonttheme[onlysmall]{structurebold} + } + +%\setbeamercolor{math text}{fg=green!50!black} +%\setbeamercolor{normal text in math text}{parent=math text} + +\usepackage{numberslides} + +\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade} +\usepackage{amsmath,amssymb} +\usepackage[english]{babel} +\usepackage[latin1]{inputenc} +\usepackage{colortbl} + +%\usepackage{lmodern} +%\usepackage[T1]{fontenc} +%\usepackage{times} + +\usepackage{multicol} + +\usepackage{graphicx} +\graphicspath{{figures/}} + +\usepackage{xspace} +\usepackage{ulem} +\usepackage{url} + +\usepackage{listings} +\lstloadlanguages{[ISO]C++} +\lstset{language=[ISO]C++, + texcl=true, + columns=fullflexible, + basicstyle={\scriptsize\sffamily}, % normal footnote small scriptsize tiny + commentstyle=\itshape, + showstringspaces=false, + numberstyle=\tiny, + morekeywords={where, auto, concept, concept_map, axiom, late_check}, + morecomment=[s]{/*}{*/} +} + +%------------------------------- +% newalg + +\usepackage{newalg} + +% layout +\newcommand{\tab}{\hspace*{5mm}} +\newcommand{\comment}[1]{\texttt{// #1}} +\newcommand{\change}[1]{\comment{change:~#1}} +\newcommand{\invariant}{\textbf{invariant}~} +\newcommand{\invariants}{\textbf{invariants:}~} + +% macros +\newcommand{\escapemath}[1]{\ensuremath{\mbox{#1}}} +\newcommand{\mktype}[1]{\escapemath{\textbf{\textit{#1}}}} +\newcommand{\mkkw}[1]{\escapemath{\textbf{~#1~}}} + +% types +\newcommand{\tbool}{\mktype{bool}} +\newcommand{\tint}{\mktype{integer}} +\newcommand{\tunsigned}{\mktype{unsigned}} + +% kw +\newcommand{\OR}{\mkkw{or}} +\newcommand{\AND}{\mkkw{and}} +\newcommand{\NOT}{\mkkw{not}} +\newcommand{\TO}{\mkkw{to}} + +% colors +\definecolor{darkyellow}{rgb}{0.5,0.5,0.1} +\definecolor{darkgreen}{rgb}{0.1,0.7,0.1} +\definecolor{mediumgreen}{rgb}{0.6,0.3,0.1} +\definecolor{mediumblue}{rgb}{0.2,0.4,0.6} +\definecolor{mediumpink}{rgb}{0.6,0.1,0.6} +\definecolor{darkpink}{rgb}{0.3,0.0,0.3} +\definecolor{darkgray}{rgb}{0.4,0.4,0.4} + +% colored tokens +\newcommand{\blueIterator}{\color{blue}{Iterator}} +\newcommand{\blueArrayIterator}{\color{blue}{array\_iterator}} +\newcommand{\greenI}{\color{darkgreen}{I}} + +% other tokens +\newcommand{\bfarrayiteratorT}{\textbf{array\_iterator$<$T$>$}\xspace} +\newcommand{\bfhelloiteratorI}{\textbf{hello\_iterator$<$I$>$}\xspace} +\newcommand{\bfhelloiterator}{\textbf{hello\_iterator}\xspace} +\newcommand{\bfForwardIterator}{\textit{\textbf{Forward\_Iterator}}\xspace} +\newcommand{\bfWriteOnlyIterator}{\textit{\textbf{Write\_Only\_Iterator}}\xspace} +\newcommand{\bfBackwardIterator}{\textit{\textbf{Backward\_Iterator}}\xspace} +\newcommand{\bfIterator}{\textit{\textbf{Iterator}}\xspace} +\newcommand{\bfinit}{\textbf{init}\xspace} +\newcommand{\bfisvalid}{\textbf{is\_valid}\xspace} +\newcommand{\bfnext}{\textbf{next}\xspace} +\newcommand{\bfprev}{\textbf{prev}\xspace} +\newcommand{\bfI}{\textbf{I}\xspace} +\newcommand{\bfreverseI}{\textbf{reverse$<$I$>$}\xspace} +\newcommand{\bfreverseT}{\textbf{reverse$<$T$>$}\xspace} +\newcommand{\bfreversearrayiteratorT}{\textbf{reverse$<$~\bfarrayiteratorT~$>$}\xspace} +\newcommand{\bfreverse}{\textbf{reverse}\xspace} +\newcommand{\bffT}{\textbf{f$<$T$>$}\xspace} +\newcommand{\bff}{\textbf{f}\xspace} +\newcommand{\bfT}{\textbf{T}\xspace} +\newcommand{\bftop}{\textbf{top}\xspace} + + + +% end of newalg +%------------------------------- + + +\newcommand{\bplus}{\textbf{+}\xspace} +\newcommand{\bminus}{\textbf{\LARGE{-}}\xspace} + + +\newcommand{\scoop}{\textsc{scoop}\xspace} + + + +\setbeamercovered{dynamic} + + +\title[Static Programming in C++]{Static Programming in C++} + +\author[T. G\'eraud and R. Levillain]{Thierry G\'eraud and Roland Levillain} + +\institute[LRDE]{EPITA Research and Development Laboratory (LRDE)} + +\date[LRDE February 2006]{LRDE February 2006} + +\subject{} + +%\pgfdeclaremask{lrde}{lrde-logo-mask} +%\pgfdeclareimage[mask=lrde,width=0.6cm]{lrde-logo}{lrde} +%\pgfdeclareimage[width=0.6cm]{lrde-logo}{lrde} + +%\logo{\vbox{\hbox to 1cm{\hfil\pgfuseimage{lrde-logo}}}} +\logo{} + + + + +%\includeonly{} + + + + +\begin{document} + +\frame{\titlepage} + +\section<presentation>*{Outline} + +\begin{frame} + \frametitle{Outline} +{\scriptsize + \tableofcontents[part=1,pausesections] +} +\end{frame} + +\AtBeginSubsection[] +{ + \begin{frame}<beamer> + \frametitle{Outline} +{\scriptsize + \tableofcontents[current,currentsubsection] +} + \end{frame} +} + +\part<presentation>{Main Talk} + + + +%============================================================ +\section*{Introduction} + +%........................................................................ +\begin{frame} + \frametitle{Context of our work} + +FIXME: olena... + +\end{frame} + + + + +%============================================================ +\include{atour} + + +%============================================================ +\include{wewant} + + +%============================================================ +\include{sequel} + + + + +%------------------------------------------------------------ +\subsection{At a Glance} + + +%........................................................................ +\begin{frame} + \frametitle{Recap} + +\hspace*{-8mm} +\includegraphics[scale=.51]{glance} + +\smallskip + +{\scriptsize +with \scoop we are able to design an OO hierarchy to provide the user with implementation classes +(that allows for factoring code, the use of statically resolved virtual types and delegation being \textit{very} convenient) +} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Zoom In} +\begin{multicols}{2} +% +\includegraphics[scale=.51]{zoomin} +% +\columnbreak +% +\begin{itemize} + \scriptsize +\item when creating an implementation class (C), the programmer does + \textit{not} draw an explicit link towards + \begin{itemize} \scriptsize + \item abstractions ($A_i$) + \item and default implementation classes (impl$< \!\! A_i \!\! >$) + \end{itemize} + \smallskip + % +\item the pink frame can be understood as an \textit{equipment} that allows for + \begin{itemize} \scriptsize + \item relating implementation classes with abstractions + \item fetching default implementations for generic function types + \end{itemize} +\end{itemize} +% +\end{multicols} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{\textit{A posteriori} Justification (1/3)} + + {\scriptsize{ Let us consider to move a \scoop~2 design towards a + more ``common'' generic programming design. We then remove the + contents of abstract classes (and rename methods): + }} + + \begin{center} + \includegraphics[scale=.41]{alt} + \end{center} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{\textit{A posteriori} Justification (2/3)} + + + The intermediate hierarchy of empty classes is kept since it is: + + \begin{center} + \textit{the} mechanism to fetch default implementations + \end{center} + + consequently the design structure has not significantly + changed. + + \bigskip\bigskip + + Unfortunately making these classes empty implies renaming methods + (removing the ``impl\_'' suffix), so + + \begin{center} + we are \textit{no more} featuring the classical OO dispatch + \end{center} + + and that is a great loss. + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{\textit{A posteriori} Justification (3/3)} + + + The role of abstract classes in \scoop~2 is manyfold: + \medskip + % + \begin{itemize} + \item they expose their interface, i.e., (abstract) methods and types\\ + ~~~ {\scriptsize $\leadsto$ ~ and they provide code with \textit{named} abstractions } + \smallskip + % + \item they statically ``resolve'' their interface \\ + ~~~ {\scriptsize $\leadsto$ ~ thanks to {\color{mediumblue}{stc\_typename}} and {\color{darkgray}{this-$>$exact().impl\_}} } + \smallskip + % + \item they are part of the default implementation fetching mechanism \\ + ~~~ {\scriptsize $\leadsto$ ~ and we need this mechanism to have generic function types } + \smallskip + \end{itemize} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Evolving Towards C++-0x} + + {\scriptsize{ the \scoop abstract classes, re-named as + \textbf{I$_i$}, are now the ``interface classes'' (they provide + the proper interfaces for implementation classes) }} + +\vspace*{-2mm} + \begin{center} + \includegraphics[scale=.41]{evolution} + \end{center} + +\vspace*{-3mm} +{\scriptsize{ + the implementation class \textbf{C} is statically plugged into \textbf{I$_1$} so \textbf{C} models the concept \textbf{A$_1$} +}} + +\end{frame} + + +%============================================================ +\section*{Conclusion} + +%........................................................................ +\begin{frame} + \frametitle{Conclusion} + +FIXME + +\end{frame} + + +%........................................................................ +\begin{frame} + \frametitle{References} + +FIXME + +\end{frame} + + + + + +%######################################################'' + + +\end{document} + +%%% Local Variables: +%%% mode: latex +%%% eval: (ispell-change-dictionary "american") +%%% TeX-master: t + +% LocalWords: OOP namespace stc basicstyle mediumpink classname templ const +% LocalWords: abc mediumblue impl escapechar darkyellow discriminants prev +% LocalWords: vtypes Desugared Index: doc/latex/paradigm/figures/zoomin.fig =================================================================== --- doc/latex/paradigm/figures/zoomin.fig (révision 0) +++ doc/latex/paradigm/figures/zoomin.fig (révision 0) @@ -0,0 +1,139 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 9208 3645 9463 3875 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9208 3645 9463 3645 9463 3875 9208 3875 9208 3645 +4 0 0 50 -1 1 12 0.0000 4 135 120 9273 3830 A\001 +-6 +6 8848 4300 9103 4530 +6 8873 4345 9083 4480 +4 0 0 49 -1 1 8 0.0000 4 90 75 9008 4480 1\001 +4 0 0 49 -1 1 12 0.0000 4 135 120 8873 4480 A\001 +-6 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 8848 4300 9103 4300 9103 4530 8848 4530 8848 4300 +-6 +6 9568 4300 9823 4530 +6 9593 4345 9803 4480 +4 0 0 49 -1 1 12 0.0000 4 135 120 9593 4480 A\001 +4 0 0 49 -1 1 8 0.0000 4 90 75 9728 4480 2\001 +-6 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9568 4300 9823 4300 9823 4530 9568 4530 9568 4300 +-6 +6 8830 6289 9653 6649 +6 9053 6289 9653 6449 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9053 6289 9653 6289 9653 6449 9053 6449 9053 6289 +4 0 0 49 -1 0 8 0.0000 4 105 555 9078 6414 selector, i\001 +-6 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 8830 6379 9338 6379 9338 6649 8830 6649 8830 6379 +4 0 0 50 -1 0 12 0.0000 4 120 450 8875 6584 case_\001 +-6 +6 7095 7157 9525 8627 +6 7470 7802 8190 8207 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7830 7802 7785 7892 7875 7892 7830 7802 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 7830 8027 8190 8027 8190 8207 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 4 + 7830 7892 7830 8027 7470 8027 7470 8207 +-6 +6 7245 8207 7695 8432 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7245 8207 7695 8207 7695 8432 7245 8432 7245 8207 +4 0 0 50 -1 0 12 0.0000 4 135 135 7425 8387 C\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7605 7532 8055 7532 8055 7802 7605 7802 7605 7532 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 7830 7172 7110 8612 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7110 8612 8595 8612 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7849 7172 8550 8612 +4 0 0 50 -1 0 12 0.0000 4 180 1290 8235 7757 implementation\001 +4 0 0 50 -1 0 12 0.0000 4 180 765 8325 7937 hierarchy\001 +4 0 0 50 -1 1 12 0.0000 4 165 270 7695 7712 top\001 +-6 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7442 5421 7430 5521 7515 5490 7442 5421 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 7830 4140 7110 5580 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7110 5580 8595 5580 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7849 4140 8550 5580 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7965 5175 8415 5175 8415 5400 7965 5400 7965 5175 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7245 5175 7695 5175 7695 5400 7245 5400 7245 5175 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7605 4545 8055 4545 8055 4770 7605 4770 7605 4545 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8871 4080 8063 4650 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8496 4705 7688 5275 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 2 + 9221 4705 8413 5275 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 4 + 8563 4640 8468 4672 8531 4735 8563 4640 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 4 + 8938 4015 8843 4047 8906 4110 8938 4015 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 4 + 9288 4640 9193 4672 9256 4735 9288 4640 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 4 + 7830 4860 7830 4995 7470 4995 7470 5175 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 4 + 7830 4770 7785 4860 7875 4860 7830 4770 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 3 + 7830 4995 8190 4995 8190 5175 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 9213 4410 9663 4410 9663 4635 9213 4635 9213 4410 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 8493 4410 8943 4410 8943 4635 8493 4635 8493 4410 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 8853 3780 9303 3780 9303 4005 8853 4005 8853 3780 +2 1 0 1 12 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7830 6739 7830 7527 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7605 6379 8055 6379 8055 6649 7605 6649 7605 6379 +2 1 1 1 24 7 50 -1 -1 4.000 0 0 7 0 0 2 + 8763 6544 8053 6544 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9306 5747 9776 5747 9776 5907 9306 5907 9306 5747 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7478 5907 9776 5907 9776 6807 7478 6807 7478 5907 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 8823 6544 8733 6499 8823 6544 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 3 + 8823 6544 8733 6589 8823 6544 +2 1 0 1 12 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7830 6649 7785 6739 7875 6739 7830 6649 +2 2 0 3 27 7 52 -1 -1 0.000 0 0 -1 0 0 5 + 6403 3491 9958 3491 9958 6985 6403 6985 6403 3491 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7470 5490 7830 6377 +4 0 0 50 -1 0 12 0.0000 4 135 630 6525 4905 abstract\001 +4 0 0 50 -1 0 12 0.0000 4 135 615 6570 5085 classes:\001 +4 0 0 50 -1 1 8 0.0000 4 90 75 7515 5355 1\001 +4 0 0 50 -1 1 12 0.0000 4 135 120 7785 4725 A\001 +4 0 0 50 -1 1 12 0.0000 4 135 120 8100 5355 A\001 +4 0 0 50 -1 1 12 0.0000 4 135 120 7380 5355 A\001 +4 0 0 50 -1 1 8 0.0000 4 90 75 8235 5355 2\001 +4 0 0 50 -1 0 10 0.0000 4 150 300 8903 3945 impl\001 +4 0 0 50 -1 0 10 0.0000 4 150 300 8543 4575 impl\001 +4 0 0 50 -1 0 10 0.0000 4 150 300 9248 4575 impl\001 +4 0 0 50 -1 1 12 0.0000 4 180 375 7675 6584 plug\001 +4 0 0 50 -1 0 8 0.0000 4 75 495 8160 6484 <<use>>\001 +4 0 0 50 -1 0 8 0.0000 4 90 450 9338 5872 internal\001 +4 0 0 50 -1 0 12 0.0000 4 180 1395 7880 6129 { meta-program }\001 +4 0 12 50 -1 0 10 0.0000 4 150 690 6750 5785 { implicit }\001 Index: doc/latex/paradigm/figures/vt2.fig =================================================================== --- doc/latex/paradigm/figures/vt2.fig (révision 0) +++ doc/latex/paradigm/figures/vt2.fig (révision 0) @@ -0,0 +1,114 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 7110 855 10350 2250 +6 9810 855 10350 1170 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9810 855 10350 855 10350 1170 9810 1170 9810 855 +4 0 0 50 -1 0 12 0.0000 4 135 465 9855 1080 Exact\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7110 1440 10080 1440 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 7110 1035 10080 1035 10080 2250 7110 2250 7110 1035 +4 0 0 50 -1 1 12 0.0000 4 30 135 7200 2115 ...\001 +4 0 15 50 -1 0 12 0.0000 4 180 2460 7200 1665 stc_typename(value) {macro}\001 +4 0 0 50 -1 0 12 0.0000 4 165 1605 7200 1890 set_value(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 8055 1305 Iterator\001 +-6 +6 990 -135 3555 4950 +6 1260 1035 3150 2250 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1260 1440 3150 1440 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 7 0 0 5 + 1305 1485 2385 1485 2385 1710 1305 1710 1305 1485 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 1260 1035 3150 1035 3150 2250 1260 2250 1260 1035 +4 0 0 50 -1 1 12 0.0000 4 30 135 1350 2115 ...\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 1350 1665 value : type\001 +4 0 0 50 -1 1 12 0.0000 4 180 1590 1350 1890 set_value(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 1845 1305 Iterator\001 +-6 +6 1260 3285 3330 4680 +6 3015 3285 3330 3600 +6 3015 3285 3330 3600 +6 3015 3285 3330 3600 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 3015 3285 3330 3285 3330 3600 3015 3600 3015 3285 +4 0 0 50 -1 0 12 0.0000 4 135 120 3105 3510 T\001 +-6 +-6 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1260 3870 3150 3870 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 7 0 0 5 + 1305 3915 2745 3915 2745 4140 1305 4140 1305 3915 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 1260 3465 3150 3465 3150 4680 1260 4680 1260 3465 +4 0 0 50 -1 0 12 0.0000 4 180 1275 1350 4095 value : type = T\001 +4 0 0 50 -1 1 12 0.0000 4 30 135 1350 4545 ...\001 +4 0 0 50 -1 0 12 0.0000 4 165 1605 1350 4320 set_value(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 1620 3735 array_iterator\001 +-6 +2 1 2 1 6 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 990 2655 3555 2655 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 990 180 3555 180 3555 4950 990 4950 990 180 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3555 180 3555 -135 2835 -135 2835 180 +4 0 0 50 -1 0 12 0.0000 4 135 510 2925 90 before\001 +-6 +6 9405 3285 9720 3600 +6 9405 3285 9720 3600 +6 9405 3285 9720 3600 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9405 3285 9720 3285 9720 3600 9405 3600 9405 3285 +4 0 0 50 -1 0 12 0.0000 4 135 120 9495 3510 T\001 +-6 +-6 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4095 1440 6525 1440 +2 1 2 1 6 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 3825 2655 10575 2655 +2 1 1 2 15 7 50 -1 -1 6.000 0 0 -1 1 0 4 + 1 1 3.00 60.00 120.00 + 7020 1620 6885 1620 6660 4050 5625 4050 +2 1 1 2 15 7 50 -1 -1 6.000 0 0 7 1 0 4 + 1 1 3.00 60.00 120.00 + 9495 4005 10305 4005 10305 1620 9765 1620 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3825 180 10575 180 10575 4950 3825 4950 3825 180 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 10575 180 10575 -135 9855 -135 9855 180 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4095 3870 6525 3870 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7110 3870 9540 3870 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 7110 3465 9540 3465 9540 4680 7110 4680 7110 3465 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 + 4095 3465 6525 3465 6525 4455 4095 4455 4095 3465 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5 + 4095 1035 6525 1035 6525 1980 4095 1980 4095 1035 +4 0 21 50 -1 0 12 0.0000 4 180 2130 4185 1665 value : type = stc::abstract\001 +4 0 0 50 -1 0 12 0.0000 4 165 1410 4500 1305 vtypes< current >\001 +4 0 0 50 -1 0 12 0.0000 4 180 2790 4095 585 current = Iterator<Exact> {macro}\001 +4 0 0 50 -1 0 12 0.0000 4 180 2910 4050 3015 current = array_iterator<T> {macro}\001 +4 0 0 50 -1 0 12 0.0000 4 180 2715 7065 3015 super = Iterator<current> {macro}\001 +4 0 0 50 -1 0 12 0.0000 4 180 2370 7065 585 super = Any<Exact> {macro}\001 +4 0 0 50 -1 0 12 0.0000 4 135 360 10035 90 after\001 +4 0 21 50 -1 0 12 0.0000 4 180 1275 4185 4095 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 1410 4500 3735 vtypes< current >\001 +4 0 0 50 -1 1 12 0.0000 4 30 135 7200 4545 ...\001 +4 0 0 50 -1 0 12 0.0000 4 180 2085 7200 4320 impl_set_value(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 7740 3735 array_iterator\001 +4 0 15 50 -1 0 12 0.0000 4 180 2115 7200 4095 stc_using(value) {macro}\001 +4 0 0 50 -1 1 12 0.0000 4 30 135 4230 4320 ...\001 +4 0 0 50 -1 1 12 0.0000 4 30 135 4230 1845 ...\001 Index: doc/latex/paradigm/figures/harder0x.fig =================================================================== --- doc/latex/paradigm/figures/harder0x.fig (révision 0) +++ doc/latex/paradigm/figures/harder0x.fig (révision 0) @@ -0,0 +1,131 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 2430 1080 4185 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 1665 4185 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 1080 4185 1080 4185 2475 2430 2475 2430 1080 +4 0 0 50 -1 0 12 0.0000 4 165 1305 2520 2340 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 2520 2115 init()\001 +4 0 0 50 -1 0 12 0.0000 4 180 960 2520 1890 value : type\001 +4 0 0 50 -1 0 12 0.0000 4 135 585 2970 1530 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 2790 1305 << concept >>\001 +-6 +6 1170 3735 2925 4680 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1170 4320 2925 4320 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 1170 3735 2925 3735 2925 4680 1170 4680 1170 3735 +4 0 0 50 -1 0 12 0.0000 4 180 480 1260 4545 prev()\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 1530 3960 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1500 1305 4185 Backward_Iterator\001 +-6 +6 3735 3735 5490 4680 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3735 4320 5490 4320 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3735 3735 5490 3735 5490 4680 3735 4680 3735 3735 +4 0 0 50 -1 0 12 0.0000 4 165 480 3825 4545 next()\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 4095 3960 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1350 3915 4185 Forward_Iterator\001 +-6 +6 6570 1125 12060 5175 +6 9045 1125 10800 1710 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 9045 1125 10800 1125 10800 1710 9045 1710 9045 1125 +4 0 0 50 -1 0 12 0.0000 4 135 585 9585 1575 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 9405 1350 << concept >>\001 +-6 +6 9765 1710 9945 2430 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 9765 1890 9855 1710 9945 1890 9765 1890 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9855 1890 9855 2430 +-6 +6 7425 3915 8100 4590 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7909 3979 8100 3915 8036 4106 7909 3979 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7973 4042 7432 4583 +-6 +6 6570 4590 8325 5175 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 6570 4590 8325 4590 8325 5175 6570 5175 6570 4590 +4 0 0 50 -1 0 10 0.0000 4 135 825 6930 4815 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 180 1650 6660 5040 Write_Only_Iterator\001 +-6 +6 10170 3915 10845 4590 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 10654 3979 10845 3915 10781 4106 10654 3979 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 10718 4042 10177 4583 +-6 +6 9090 3915 9765 4590 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 9281 3979 9090 3915 9154 4106 9281 3979 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9217 4042 9758 4583 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7740 3555 9495 3555 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 7740 2970 9495 2970 9495 3915 7740 3915 7740 2970 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 10305 3555 12060 3555 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 10305 2970 12060 2970 12060 3915 10305 3915 10305 2970 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8595 2970 8595 2430 11160 2430 11160 2970 +2 1 1 1 0 7 50 -1 -1 6.000 0 0 -1 0 0 2 + 10080 2205 8325 2205 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 9090 4590 10845 4590 10845 5175 9090 5175 9090 4590 +4 0 0 50 -1 0 10 0.0000 4 135 825 8100 3195 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 180 1530 10395 3780 get_value() : value\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 10665 3195 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1605 7830 3780 set_value(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 165 1140 7965 3420 Write_Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1110 10575 3420 Read_Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 105 660 10080 1935 <<refine>>\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 9450 4815 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1665 9180 5040 Read_Write_Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1290 6975 2250 { accessibility }\001 +-6 +6 5175 5850 7110 6480 +6 6795 5850 7110 6165 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 6795 5850 7110 5850 7110 6165 6795 6165 6795 5850 +4 0 0 50 -1 0 12 0.0000 4 135 120 6885 6075 T\001 +-6 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5175 6030 6930 6030 6930 6480 5175 6480 5175 6030 +4 0 0 50 -1 0 12 0.0000 4 180 1095 5490 6300 array_iterator\001 +-6 +6 5985 5175 6840 6030 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6758 5392 6821 5201 6630 5265 6758 5392 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 6694 5329 5985 6030 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 2655 3285 2475 3375 2655 3195 2655 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3285 2655 3285 3195 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2025 3735 2025 3195 4590 3195 4590 3735 +2 1 1 1 0 7 50 -1 -1 6.000 0 0 -1 0 0 2 + 3510 2970 1755 2970 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4672 4897 4609 4706 4800 4770 4672 4897 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 4736 4834 5940 6030 +4 0 0 50 -1 0 12 0.0000 4 180 1020 630 3015 { browsing }\001 +4 0 0 50 -1 0 10 0.0000 4 105 660 3510 2700 <<refine>>\001 +4 0 0 50 -1 0 10 0.0000 4 105 690 5580 5580 <<model>>\001 Index: doc/latex/paradigm/figures/simplescoop1.fig =================================================================== --- doc/latex/paradigm/figures/simplescoop1.fig (révision 0) +++ doc/latex/paradigm/figures/simplescoop1.fig (révision 0) @@ -0,0 +1,46 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 7560 3240 7875 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 7560 3240 7875 3240 7875 3555 7560 3555 7560 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 7650 3465 T\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 6525 1845 45 45 6525 1845 6480 1845 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5805 1665 7560 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5805 1260 7560 1260 7560 2475 5805 2475 5805 1260 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 8055 1710 10350 1710 10350 1845 10485 1845 10350 1710 10485 1845 + 10485 1980 8055 1980 8055 1710 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 6570 1845 8055 1845 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6525 2655 6615 2475 6705 2655 6525 2655 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 6615 2655 6615 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5670 3825 7695 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5670 3420 7695 3420 7695 4635 5670 4635 5670 3420 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 7425 1080 7740 1080 7740 1395 7425 1395 7425 1080 +4 0 0 50 -1 1 12 0.0000 4 135 630 6345 1530 Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 5895 2340 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 5895 2115 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 5895 1890 init()\001 +4 0 0 50 -1 0 12 0.0000 4 180 2010 8145 1890 this->exact().impl_init();\001 +4 0 0 50 -1 0 10 0.0000 4 150 2415 6795 2880 << bind >> < I -> array_iterator<T> >\001 +4 0 0 50 -1 0 12 0.0000 4 180 960 5760 4275 impl_next()\001 +4 0 0 50 -1 0 12 0.0000 4 180 1785 5760 4500 impl_is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 180 885 5760 4050 impl_init()\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 6120 3690 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 135 60 7560 1305 I\001 Index: doc/latex/paradigm/figures/concepts.fig =================================================================== --- doc/latex/paradigm/figures/concepts.fig (révision 0) +++ doc/latex/paradigm/figures/concepts.fig (révision 0) @@ -0,0 +1,38 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 4050 3240 4365 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 4050 3240 4365 3240 4365 3555 4050 3555 4050 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 4140 3465 T\001 +-6 +6 2520 3915 3825 4545 +4 0 0 50 -1 0 12 0.0000 4 165 480 2520 4275 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 2520 4500 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 2520 4050 init()\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 1665 4185 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 1080 4185 1080 4185 2475 2430 2475 2430 1080 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 3825 4185 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 3420 4185 3420 4185 4635 2430 4635 2430 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 2655 3285 2475 3375 2655 3195 2655 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 3285 2655 3285 3420 +4 0 0 50 -1 0 12 0.0000 4 180 1095 2745 3690 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 2520 2340 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 2520 2115 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 2520 1890 init()\001 +4 0 0 50 -1 0 12 0.0000 4 135 585 2970 1530 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 2790 1305 << concept >>\001 +4 0 0 50 -1 0 10 0.0000 4 150 690 3375 2880 { implicit }\001 Index: doc/latex/paradigm/figures/alt.fig =================================================================== --- doc/latex/paradigm/figures/alt.fig (révision 0) +++ doc/latex/paradigm/figures/alt.fig (révision 0) @@ -0,0 +1,105 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 1485 2700 5130 6930 +6 2835 4725 4770 5085 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2835 4725 4770 4725 4770 5085 2835 5085 2835 4725 +4 0 0 50 -1 0 12 0.0000 4 180 1605 3060 4950 { plug mechanism }\001 +-6 +6 3285 4050 5040 4455 +4 0 0 50 -1 0 12 0.0000 4 180 1290 3285 4185 { also the "fetch\001 +4 0 0 50 -1 0 12 0.0000 4 180 1545 3465 4410 impl" mechanism }\001 +-6 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 2970 3060 2250 4500 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 2250 4500 3735 4500 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 2989 3060 3690 4500 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3861 3265 3150 3780 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 4 + 3928 3200 3833 3232 3896 3295 3928 3200 +2 2 0 3 27 7 52 -1 -1 0.000 0 0 -1 0 0 5 + 1543 2745 5085 2745 5085 5220 1543 5220 1543 2745 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2970 4275 2925 4365 3015 4365 2970 4275 +2 1 1 1 24 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 2970 4365 2970 5805 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 2970 5462 2250 6902 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 2250 6902 3735 6902 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 2989 5462 3690 6902 +4 0 0 50 -1 1 18 0.0000 4 135 225 2880 4095 m\001 +4 0 0 50 -1 0 14 0.0000 4 225 750 4050 3105 impl_m\001 +4 0 0 50 -1 0 12 0.0000 4 180 840 4140 3375 { default }\001 +4 0 0 50 -1 2 14 0.0000 4 150 735 1665 4185 classes:\001 +4 0 0 50 -1 2 14 0.0000 4 150 825 1665 3960 abstract\001 +4 0 0 50 -1 0 14 0.0000 4 225 750 2610 6480 impl_m\001 +4 0 0 50 -1 0 12 0.0000 4 180 1080 2745 6750 { definition }\001 +-6 +6 1350 2205 5310 7110 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1350 2520 5310 2520 5310 7110 1350 7110 1350 2520 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5310 2520 5310 2205 4635 2205 4635 2520 +4 0 0 50 -1 0 12 0.0000 4 135 510 4725 2430 before\001 +-6 +6 6660 2205 10620 7110 +6 6840 2700 10485 6930 +6 8190 4725 10125 5085 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8190 4725 10125 4725 10125 5085 8190 5085 8190 4725 +4 0 0 50 -1 0 12 0.0000 4 180 1605 8415 4950 { plug mechanism }\001 +-6 +6 8640 4050 10395 4455 +4 0 0 50 -1 0 12 0.0000 4 180 1530 8640 4185 { just for the "fetch\001 +4 0 0 50 -1 0 12 0.0000 4 180 1545 8820 4410 impl" mechanism }\001 +-6 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 8325 3060 7605 4500 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7605 4500 9090 4500 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 8344 3060 9045 4500 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 2 + 9216 3265 8505 3780 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 7 0 0 4 + 9283 3200 9188 3232 9251 3295 9283 3200 +2 1 0 1 24 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8325 4275 8280 4365 8370 4365 8325 4275 +2 1 1 1 24 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 8325 4365 8325 5760 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 8325 5462 7605 6902 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7605 6902 9090 6902 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 8344 5462 9045 6902 +2 2 0 3 27 7 52 -1 -1 0.000 0 0 -1 0 0 5 + 6885 2745 10453 2745 10453 5220 6885 5220 6885 2745 +4 0 0 50 -1 0 12 0.0000 4 180 840 9495 3375 { default }\001 +4 0 0 50 -1 0 14 0.0000 4 105 195 9405 3105 m\001 +4 0 0 50 -1 2 14 0.0000 4 195 630 6975 3960 empty\001 +4 0 0 50 -1 2 14 0.0000 4 150 735 6975 4185 classes:\001 +4 0 0 50 -1 0 12 0.0000 4 180 1080 8100 6750 { definition }\001 +4 0 0 50 -1 0 14 0.0000 4 105 195 8235 6480 m\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6660 2520 10620 2520 10620 7110 6660 7110 6660 2520 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 10620 2520 10620 2205 9945 2205 9945 2520 +4 0 0 50 -1 0 12 0.0000 4 135 360 10080 2430 after\001 +-6 +2 1 0 2 19 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 150.00 180.00 + 5580 5040 6435 5040 Index: doc/latex/paradigm/figures/simplegp.fig =================================================================== --- doc/latex/paradigm/figures/simplegp.fig (révision 0) +++ doc/latex/paradigm/figures/simplegp.fig (révision 0) @@ -0,0 +1,37 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 7425 3240 7740 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 7425 3240 7740 3240 7740 3555 7425 3555 7425 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 7515 3465 T\001 +-6 +6 5895 3915 7200 4545 +4 0 0 50 -1 0 12 0.0000 4 165 480 5895 4275 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 5895 4500 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 5895 4050 init()\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5805 1665 7560 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5805 1080 7560 1080 7560 2475 5805 2475 5805 1080 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5805 3825 7560 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5805 3420 7560 3420 7560 4635 5805 4635 5805 3420 +2 1 1 1 0 7 50 -1 -1 5.000 0 0 -1 1 0 2 + 0 0 1.00 150.00 180.00 + 6615 3420 6615 2475 +4 0 0 50 -1 0 10 0.0000 4 105 1275 5985 1305 << documentation >>\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 6120 3690 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 5895 2340 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 5895 2115 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 5895 1890 init()\001 +4 0 0 50 -1 0 12 0.0000 4 135 585 6345 1530 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 105 885 6705 2925 << conform >>\001 Index: doc/latex/paradigm/figures/evolution.fig =================================================================== --- doc/latex/paradigm/figures/evolution.fig (révision 0) +++ doc/latex/paradigm/figures/evolution.fig (révision 0) @@ -0,0 +1,110 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 7470 4770 8190 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7830 4770 7785 4860 7875 4860 7830 4770 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 7830 4995 8190 4995 8190 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 4 + 7830 4860 7830 4995 7470 4995 7470 5175 +-6 +6 7065 5895 8640 7425 +6 7065 5895 8640 7425 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 7830 5940 7110 7380 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7110 7380 8595 7380 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7849 5940 8550 7380 +-6 +6 7605 6300 8055 6570 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7605 6300 8055 6300 8055 6570 7605 6570 7605 6300 +4 0 0 50 -1 1 12 0.0000 4 165 270 7695 6480 top\001 +-6 +6 7470 6570 8190 6975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7830 6570 7785 6660 7875 6660 7830 6570 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 7830 6795 8190 6795 8190 6975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 4 + 7830 6660 7830 6795 7470 6795 7470 6975 +-6 +6 7245 6975 7695 7200 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7245 6975 7695 6975 7695 7200 7245 7200 7245 6975 +4 0 0 50 -1 0 12 0.0000 4 135 135 7425 7155 C\001 +-6 +-6 +6 3735 2565 6030 4500 +6 3735 2970 6030 4500 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5040 3645 4995 3735 5085 3735 5040 3645 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5175 4050 5625 4050 5625 4275 5175 4275 5175 4050 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 5040 3015 4320 4455 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 4320 4455 5805 4455 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 5059 3015 5760 4455 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4455 4050 4905 4050 4905 4275 4455 4275 4455 4050 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4815 3420 5265 3420 5265 3645 4815 3645 4815 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 5040 3870 5400 3870 5400 4050 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 4 + 5040 3735 5040 3870 4680 3870 4680 4050 +4 0 0 50 -1 0 12 0.0000 4 135 135 5310 4230 A\001 +4 0 0 50 -1 0 8 0.0000 4 90 75 5445 4230 2\001 +4 0 0 50 -1 0 8 0.0000 4 90 75 4725 4230 1\001 +4 0 0 50 -1 0 12 0.0000 4 135 135 4590 4230 A\001 +4 0 0 50 -1 0 12 0.0000 4 135 135 4995 3600 A\001 +4 0 0 50 -1 0 10 0.0000 4 105 720 5310 3780 << refine >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 780 3735 3780 concepts:\001 +-6 +4 0 0 50 -1 2 16 0.0000 4 195 1335 4275 2790 C++-0x GP\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7965 5175 8415 5175 8415 5400 7965 5400 7965 5175 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7245 5175 7695 5175 7695 5400 7245 5400 7245 5175 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7605 4545 8055 4545 8055 4770 7605 4770 7605 4545 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7442 5421 7430 5521 7515 5490 7442 5421 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7470 5490 7830 6300 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3600 2430 9675 2430 9675 7650 3600 7650 3600 2430 +2 1 0 3 6 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7110 5580 8595 5580 +2 1 0 3 6 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7849 4140 8550 5580 +2 1 0 3 6 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7830 4140 7110 5580 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4680 4275 4635 4365 4725 4365 4680 4275 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 4 + 4680 4365 4680 4590 7335 6660 7335 6975 +4 0 0 50 -1 2 16 0.0000 4 195 975 7380 3915 SCOOP\001 +4 0 0 50 -1 1 12 0.0000 4 135 60 7785 4725 I\001 +4 0 0 50 -1 0 10 0.0000 4 105 780 8100 4905 << inherit >>\001 +4 0 0 50 -1 1 12 0.0000 4 135 60 8100 5355 I\001 +4 0 0 50 -1 0 12 0.0000 4 180 1290 8235 6525 implementation\001 +4 0 0 50 -1 0 12 0.0000 4 180 765 8325 6705 hierarchy\001 +4 0 0 50 -1 1 12 0.0000 4 135 60 7380 5355 I\001 +4 0 0 50 -1 1 8 0.0000 4 90 75 7470 5355 1\001 +4 0 0 50 -1 1 8 0.0000 4 90 75 8190 5355 2\001 +4 0 12 50 -1 0 10 0.0000 4 150 690 6840 5895 { implicit }\001 +4 0 12 50 -1 0 10 0.0000 4 150 690 5400 5895 { implicit }\001 +4 0 0 50 -1 0 12 0.0000 4 135 615 6480 5085 classes:\001 +4 0 0 50 -1 0 12 0.0000 4 135 705 6345 4905 interface\001 Index: doc/latex/paradigm/figures/simpledeco.fig =================================================================== --- doc/latex/paradigm/figures/simpledeco.fig (révision 0) +++ doc/latex/paradigm/figures/simpledeco.fig (révision 0) @@ -0,0 +1,110 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 2745 3555 3060 3870 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 2745 3555 3060 3555 3060 3870 2745 3870 2745 3555 +4 0 0 50 -1 0 12 0.0000 4 135 120 2835 3780 T\001 +-6 +6 5850 4545 6885 4860 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 8 + 6885 4680 6750 4680 6750 4545 6885 4680 6885 4860 5850 4860 + 5850 4545 6750 4545 +4 0 0 50 -1 0 12 0.0000 4 165 795 5940 4770 iter.next()\001 +-6 +6 1125 3735 2880 4950 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1125 4140 2880 4140 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 1125 3735 2880 3735 2880 4950 1125 4950 1125 3735 +4 0 0 50 -1 0 12 0.0000 4 165 405 1215 4365 init()\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 1215 4590 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 1215 4815 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 1440 4005 array_iterator\001 +-6 +6 4365 4140 6885 4455 +6 5850 4140 6885 4455 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 8 + 6885 4275 6750 4275 6750 4140 6885 4275 6885 4455 5850 4455 + 5850 4140 6750 4140 +4 0 0 50 -1 0 12 0.0000 4 165 720 5940 4365 iter.init()\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 4410 4320 45 45 4410 4320 4410 4365 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 150.00 + 4455 4320 5850 4320 +-6 +6 4500 4950 4680 5670 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4500 5130 4590 4950 4680 5130 4500 5130 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4590 5130 4590 5670 +-6 +6 3735 5670 7200 6885 +6 5805 6075 7200 6615 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 8 + 7200 6210 7065 6210 7065 6075 7200 6210 7200 6615 5805 6615 + 5805 6075 7065 6075 +4 0 0 50 -1 0 12 0.0000 4 180 1080 5895 6300 print("hello")\001 +4 0 0 50 -1 0 12 0.0000 4 180 885 5895 6525 super.init()\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 4365 6255 45 45 4365 6255 4365 6300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3735 6075 5490 6075 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3735 5670 5490 5670 5490 6885 3735 6885 3735 5670 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 150.00 + 4410 6255 5805 6255 +4 0 0 50 -1 0 12 0.0000 4 165 405 3825 6300 init()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1110 4050 5940 hello_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1350 3780 6705 { and that's all! }\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 4410 4545 45 45 4410 4545 4410 4590 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 5310 4770 45 45 5310 4770 5310 4815 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5130 3735 5220 3645 5130 3555 5040 3645 5130 3735 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3 + 0 0 1.00 90.00 150.00 + 5130 3555 5130 1665 4230 1665 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 150.00 + 4455 4545 5850 4680 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3735 4140 5490 4140 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 150.00 + 5353 4789 5850 5085 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 8 + 7785 5085 7650 5085 7650 4950 7785 5085 7785 5265 5850 5265 + 5850 4950 7650 4950 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3735 3735 5490 3735 5490 4950 3735 4950 3735 3735 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2475 1890 4230 1890 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2475 1485 4230 1485 4230 2700 2475 2700 2475 1485 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 2880 3285 2700 3375 2880 3195 2880 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3285 2880 3285 3285 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2025 3735 2025 3285 4590 3285 4590 3735 +4 0 0 50 -1 1 12 0.0000 4 165 1575 3870 4005 Iterator_Decorator\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 3825 4365 init()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 3825 4815 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 3825 4590 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1620 5940 5175 return iter.is_valid()\001 +4 0 0 50 -1 0 12 0.0000 4 180 2205 5850 3645 { default is "no decoration"\001 +4 0 0 50 -1 0 12 0.0000 4 180 2160 5850 3870 i.e., "identity" behavior }\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 3015 1755 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 2565 2340 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 2565 2565 is_valid() : bool\001 +4 0 0 50 -1 1 12 0.0000 4 180 405 2565 2115 init()\001 +4 0 0 50 -1 0 12 0.0000 4 135 270 4500 1575 iter\001 Index: doc/latex/paradigm/figures/simpleoo.fig =================================================================== --- doc/latex/paradigm/figures/simpleoo.fig (révision 0) +++ doc/latex/paradigm/figures/simpleoo.fig (révision 0) @@ -0,0 +1,44 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 5805 1260 7740 4635 +6 7425 3240 7740 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 7425 3240 7740 3240 7740 3555 7425 3555 7425 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 7515 3465 T\001 +-6 +6 6525 2475 6705 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6525 2655 6615 2475 6705 2655 6525 2655 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6615 2655 6615 3420 +-6 +6 5805 3420 7560 4635 +6 5895 3915 7200 4545 +4 0 0 50 -1 0 12 0.0000 4 165 480 5895 4275 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 5895 4500 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 5895 4050 init()\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5805 3825 7560 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5805 3420 7560 3420 7560 4635 5805 4635 5805 3420 +4 0 0 50 -1 0 12 0.0000 4 180 1095 6120 3690 array_iterator\001 +-6 +6 5805 1260 7560 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5805 1665 7560 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5805 1260 7560 1260 7560 2475 5805 2475 5805 1260 +4 0 0 50 -1 1 12 0.0000 4 135 630 6345 1530 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 405 5895 1890 init()\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 5895 2115 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 5895 2340 is_valid() : bool\001 +-6 +-6 Index: doc/latex/paradigm/figures/glance.fig =================================================================== --- doc/latex/paradigm/figures/glance.fig (révision 0) +++ doc/latex/paradigm/figures/glance.fig (révision 0) @@ -0,0 +1,180 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 -1125 3510 585 6705 +6 -1035 4815 495 5175 +4 0 0 50 -1 0 12 0.0000 4 180 1320 -1035 4950 { abstractions in\001 +4 0 0 50 -1 0 12 0.0000 4 180 1365 -900 5130 documentation }\001 +-6 +6 -450 5985 0 6210 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + -450 5985 0 5985 0 6210 -450 6210 -450 5985 +4 0 0 50 -1 0 12 0.0000 4 135 135 -270 6165 C\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + -1125 3510 585 3510 585 6705 -1125 6705 -1125 3510 +4 0 0 50 -1 2 16 0.0000 4 195 975 -720 3915 C++ GP\001 +-6 +6 720 3510 3465 6705 +6 1980 4545 2430 4770 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1980 4545 2430 4545 2430 4770 1980 4770 1980 4545 +4 0 0 50 -1 1 12 0.0000 4 135 120 2160 4725 A\001 +-6 +6 1620 5175 2070 5400 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1620 5175 2070 5175 2070 5400 1620 5400 1620 5175 +4 0 0 50 -1 1 12 0.0000 4 135 120 1755 5355 A\001 +4 0 0 50 -1 1 8 0.0000 4 90 75 1890 5355 1\001 +-6 +6 1620 5985 2070 6210 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1620 5985 2070 5985 2070 6210 1620 6210 1620 5985 +4 0 0 50 -1 0 12 0.0000 4 135 135 1800 6165 C\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2205 4860 2205 4995 1845 4995 1845 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2205 4770 2160 4860 2250 4860 2205 4770 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 2205 4995 2565 4995 2565 5175 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2340 5175 2790 5175 2790 5400 2340 5400 2340 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1845 5400 1800 5490 1890 5490 1845 5400 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1845 5490 1845 5985 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 2205 4140 1125 6345 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 1125 6345 3330 6345 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 2224 4140 3330 6345 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 720 3510 3465 3510 3465 6705 720 6705 720 3510 +4 0 0 50 -1 0 12 0.0000 4 135 630 855 4860 abstract\001 +4 0 0 50 -1 0 12 0.0000 4 135 615 900 5040 classes:\001 +4 0 0 50 -1 0 10 0.0000 4 105 780 2475 4905 << inherit >>\001 +4 0 0 50 -1 1 12 0.0000 4 135 120 2475 5355 A\001 +4 0 0 50 -1 1 8 0.0000 4 90 75 2610 5355 2\001 +4 0 19 50 -1 0 10 0.0000 4 150 675 1890 5850 { explicit }\001 +4 0 0 50 -1 2 16 0.0000 4 195 1200 1485 3915 C++ OOP\001 +-6 +6 3600 3510 6255 6705 +6 3735 4095 6030 6210 +6 4455 5985 4905 6210 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4455 5985 4905 5985 4905 6210 4455 6210 4455 5985 +4 0 0 50 -1 0 12 0.0000 4 135 135 4635 6165 C\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5040 4770 4995 4860 5085 4860 5040 4770 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5175 5175 5625 5175 5625 5400 5175 5400 5175 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4680 5400 4635 5490 4725 5490 4680 5400 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 4680 5490 4680 5985 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 5040 4140 4320 5580 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 4320 5580 5805 5580 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 5059 4140 5760 5580 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4455 5175 4905 5175 4905 5400 4455 5400 4455 5175 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4815 4545 5265 4545 5265 4770 4815 4770 4815 4545 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 5040 4995 5400 4995 5400 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 4 + 5040 4860 5040 4995 4680 4995 4680 5175 +4 0 0 50 -1 0 12 0.0000 4 135 135 5310 5355 A\001 +4 0 0 50 -1 0 8 0.0000 4 90 75 5445 5355 2\001 +4 0 0 50 -1 0 8 0.0000 4 90 75 4725 5355 1\001 +4 0 0 50 -1 0 12 0.0000 4 135 135 4590 5355 A\001 +4 0 0 50 -1 0 12 0.0000 4 135 135 4995 4725 A\001 +4 0 0 50 -1 0 10 0.0000 4 105 720 5310 4905 << refine >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 780 3735 4905 concepts:\001 +4 0 12 50 -1 0 10 0.0000 4 150 690 4725 5850 { implicit }\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3600 3510 6255 3510 6255 6705 3600 6705 3600 3510 +4 0 0 50 -1 2 16 0.0000 4 195 1335 4275 3915 C++-0x GP\001 +-6 +6 6390 3510 9675 7695 +6 7065 4095 8640 5625 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 7830 4140 7110 5580 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7110 5580 8595 5580 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7849 4140 8550 5580 +-6 +6 7470 4770 8190 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7830 4770 7785 4860 7875 4860 7830 4770 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 7830 4995 8190 4995 8190 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 4 + 7830 4860 7830 4995 7470 4995 7470 5175 +-6 +6 7065 5895 8640 7425 +6 7065 5895 8640 7425 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 -1 0 0 2 + 7830 5940 7110 7380 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7110 7380 8595 7380 +2 1 0 3 31 -1 51 -1 -1 0.000 0 0 7 0 0 2 + 7849 5940 8550 7380 +-6 +6 7605 6300 8055 6570 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7605 6300 8055 6300 8055 6570 7605 6570 7605 6300 +4 0 0 50 -1 1 12 0.0000 4 165 270 7695 6480 top\001 +-6 +6 7470 6570 8190 6975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7830 6570 7785 6660 7875 6660 7830 6570 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 + 7830 6795 8190 6795 8190 6975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 4 + 7830 6660 7830 6795 7470 6795 7470 6975 +-6 +6 7245 6975 7695 7200 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7245 6975 7695 6975 7695 7200 7245 7200 7245 6975 +4 0 0 50 -1 0 12 0.0000 4 135 135 7425 7155 C\001 +-6 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7965 5175 8415 5175 8415 5400 7965 5400 7965 5175 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7245 5175 7695 5175 7695 5400 7245 5400 7245 5175 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7605 4545 8055 4545 8055 4770 7605 4770 7605 4545 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7442 5421 7430 5521 7515 5490 7442 5421 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6390 3510 9675 3510 9675 7695 6390 7695 6390 3510 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7470 5490 7830 6300 +4 0 0 50 -1 2 16 0.0000 4 195 975 7380 3915 SCOOP\001 +4 0 0 50 -1 1 8 0.0000 4 90 75 7515 5355 1\001 +4 0 0 50 -1 1 12 0.0000 4 135 120 7785 4725 A\001 +4 0 0 50 -1 0 10 0.0000 4 105 780 8100 4905 << inherit >>\001 +4 0 0 50 -1 0 12 0.0000 4 135 630 6525 4905 abstract\001 +4 0 0 50 -1 1 12 0.0000 4 135 120 8100 5355 A\001 +4 0 0 50 -1 1 12 0.0000 4 135 120 7380 5355 A\001 +4 0 0 50 -1 1 8 0.0000 4 90 75 8235 5355 2\001 +4 0 0 50 -1 0 12 0.0000 4 135 615 6570 5085 classes:\001 +4 0 12 50 -1 0 10 0.0000 4 150 690 6840 5985 { implicit }\001 +4 0 0 50 -1 0 12 0.0000 4 180 1290 8235 6525 implementation\001 +4 0 0 50 -1 0 12 0.0000 4 180 765 8325 6705 hierarchy\001 +-6 Index: doc/latex/paradigm/figures/getset.fig =================================================================== --- doc/latex/paradigm/figures/getset.fig (révision 0) +++ doc/latex/paradigm/figures/getset.fig (révision 0) @@ -0,0 +1,103 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 2430 3510 4185 4455 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 4095 4185 4095 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 3510 4185 3510 4185 4455 2430 4455 2430 3510 +4 0 0 50 -1 0 12 0.0000 4 165 480 2520 4320 next()\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 2790 3735 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1350 2610 3960 Forward_Iterator\001 +-6 +6 2430 5310 4365 5940 +6 4050 5310 4365 5625 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 4050 5310 4365 5310 4365 5625 4050 5625 4050 5310 +4 0 0 50 -1 0 12 0.0000 4 135 120 4140 5535 T\001 +-6 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 5490 4185 5490 4185 5940 2430 5940 2430 5490 +4 0 0 50 -1 0 12 0.0000 4 180 1095 2745 5760 array_iterator\001 +-6 +6 3195 2160 3375 3510 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 2340 3285 2160 3375 2340 3195 2340 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3285 2340 3285 3510 +-6 +6 8820 2070 12960 4005 +6 10080 2880 10260 3600 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 10080 3060 10170 2880 10260 3060 10080 3060 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 10170 3060 10170 3600 +-6 +6 10980 3420 12105 3735 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 10980 3420 12105 3420 12105 3735 10980 3735 10980 3420 +4 0 0 50 -1 0 12 0.0000 4 135 945 11070 3645 Abstraction\001 +-6 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 8858 3615 11558 3615 11558 4005 8858 4005 8858 3615 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 8858 2265 11558 2265 11558 2847 8858 2847 8858 2265 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 10980 2070 12960 2070 12960 2385 10980 2385 10980 2070 +4 0 0 50 -1 0 10 0.0000 4 150 1350 9503 2490 << implementation >>\001 +4 0 0 50 -1 0 12 0.0000 4 180 705 9833 2715 set_impl\001 +4 0 0 50 -1 0 12 0.0000 4 180 735 9833 3870 get_impl\001 +4 0 0 50 -1 0 12 0.0000 4 165 1785 11070 2295 Abstraction, Behavior\001 +-6 +6 4185 2610 7290 3915 +6 4185 2610 7290 3915 +6 4185 3330 4725 3915 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4530 3435 4721 3371 4658 3562 4530 3435 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4590 3510 4185 3915 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4560 2997 7260 2997 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 4560 2610 7260 2610 7260 3357 4560 3357 4560 2610 +4 0 0 50 -1 0 12 0.0000 4 180 960 4650 3222 impl_next()\001 +4 0 0 50 -1 0 12 0.0000 4 180 2385 4785 2862 get_impl< Forward_Iterator >\001 +-6 +-6 +6 4185 -405 7290 1170 +6 4185 578 4725 1163 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4530 683 4721 619 4658 810 4530 683 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4590 758 4185 1163 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4560 -29 7260 -29 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 4560 -405 7260 -405 7260 605 4560 605 4560 -405 +4 0 0 50 -1 0 12 0.0000 4 180 885 4650 196 impl_init()\001 +4 0 0 50 -1 0 12 0.0000 4 180 1620 5220 -164 get_impl< Iterator >\001 +4 0 0 50 -1 0 12 0.0000 4 180 1785 4657 442 impl_is_valid() : bool\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 4635 3285 4455 3375 4635 3195 4635 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 3285 4635 3285 5490 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 1350 4185 1350 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 765 4185 765 4185 2160 2430 2160 2430 765 +4 0 0 50 -1 0 12 0.0000 4 165 1305 2520 2025 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 2520 1800 init()\001 +4 0 0 50 -1 0 12 0.0000 4 135 585 2970 1215 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 2790 990 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 180 960 2520 1575 value : type\001 +4 0 0 50 -1 0 10 0.0000 4 105 690 2295 4860 <<model>>\001 +4 0 0 50 -1 0 10 0.0000 4 105 660 2295 2565 <<refine>>\001 Index: doc/latex/paradigm/figures/simple0x.fig =================================================================== --- doc/latex/paradigm/figures/simple0x.fig (révision 0) +++ doc/latex/paradigm/figures/simple0x.fig (révision 0) @@ -0,0 +1,38 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 4050 3240 4365 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 4050 3240 4365 3240 4365 3555 4050 3555 4050 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 4140 3465 T\001 +-6 +6 2520 3915 3825 4545 +4 0 0 50 -1 0 12 0.0000 4 165 480 2520 4275 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 2520 4500 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 2520 4050 init()\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 1665 4185 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 1080 4185 1080 4185 2475 2430 2475 2430 1080 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 3825 4185 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 3420 4185 3420 4185 4635 2430 4635 2430 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 2655 3285 2475 3375 2655 3195 2655 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 3285 2655 3285 3420 +4 0 0 50 -1 0 12 0.0000 4 180 1095 2745 3690 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 2520 2340 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 2520 2115 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 2520 1890 init()\001 +4 0 0 50 -1 0 12 0.0000 4 135 585 2970 1530 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 2790 1305 << concept >>\001 +4 0 0 50 -1 0 10 0.0000 4 150 690 3375 2880 { implicit }\001 Index: doc/latex/paradigm/figures/simpleoovt.fig =================================================================== --- doc/latex/paradigm/figures/simpleoovt.fig (révision 0) +++ doc/latex/paradigm/figures/simpleoovt.fig (révision 0) @@ -0,0 +1,45 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 3465 2475 3645 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3465 2655 3555 2475 3645 2655 3465 2655 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3555 2655 3555 3420 +-6 +6 4950 4095 7155 4365 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 4950 4095 7020 4095 7020 4230 7155 4230 7020 4095 7155 4230 + 7155 4365 4950 4365 4950 4095 +4 0 0 50 -1 0 12 0.0000 4 165 1815 5040 4275 this->v_ = *(value*)v;\001 +-6 +6 4410 3240 4725 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 4410 3240 4725 3240 4725 3555 4410 3555 4410 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 4500 3465 T\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 4410 4230 45 45 4410 4230 4455 4230 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4455 4230 4950 4230 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2565 1665 4545 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2565 1260 4545 1260 4545 2475 2565 2475 2565 1260 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2565 3825 4545 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2565 3420 4545 3420 4545 4635 2565 4635 2565 3420 +4 0 0 50 -1 1 12 0.0000 4 30 135 2655 2340 ...\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 3195 1530 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 1605 2655 2115 set_value(v : void*)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 2655 4050 value : type = T\001 +4 0 0 50 -1 1 12 0.0000 4 30 135 2655 4500 ...\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 3015 3690 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1635 2655 4275 set_value(v : void*)\001 Index: doc/latex/paradigm/figures/corn.fig =================================================================== --- doc/latex/paradigm/figures/corn.fig (révision 0) +++ doc/latex/paradigm/figures/corn.fig (révision 0) @@ -0,0 +1,101 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 4185 3645 4725 4230 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4530 3750 4721 3686 4658 3877 4530 3750 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4590 3825 4185 4230 +-6 +6 2205 5310 4590 6255 +6 4275 5310 4590 5625 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 4275 5310 4590 5310 4590 5625 4275 5625 4275 5310 +4 0 0 50 -1 0 12 0.0000 4 135 60 4410 5535 I\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2205 5895 4455 5895 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2205 5490 4455 5490 4455 6255 2205 6255 2205 5490 +4 0 0 50 -1 0 12 0.0000 4 180 2070 2295 6120 behavior : type = identity\001 +4 0 0 50 -1 0 12 0.0000 4 165 1110 2835 5760 hello_iterator\001 +-6 +6 4545 3263 7290 3668 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 4560 3263 7260 3263 7260 3668 4560 3668 4560 3263 +4 0 0 50 -1 0 12 0.0000 4 180 2385 4785 3515 get_impl< Forward_Iterator >\001 +-6 +6 5760 2798 5940 3263 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5760 2978 5850 2798 5940 2978 5760 2978 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5850 2978 5850 3263 +-6 +6 4560 2036 8145 2783 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4560 2423 8145 2423 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 4560 2036 8145 2036 8145 2783 4560 2783 4560 2036 +4 0 0 50 -1 0 12 0.0000 4 180 3165 4785 2288 set_impl< Forward_Iterator, behavior >\001 +4 0 0 50 -1 0 12 0.0000 4 180 960 4650 2648 impl_next()\001 +-6 +6 2295 -1005 7260 2235 +6 4185 833 4725 1418 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4530 938 4721 874 4658 1065 4530 938 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4590 1013 4185 1418 +-6 +6 4560 480 7260 855 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 4560 480 7260 480 7260 855 4560 855 4560 480 +4 0 0 50 -1 0 12 0.0000 4 180 1620 5220 721 get_impl< Iterator >\001 +-6 +6 4560 -1005 7260 473 +6 5760 8 5940 473 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5760 188 5850 8 5940 188 5760 188 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5850 188 5850 473 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4560 -629 7260 -629 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 4560 -1005 7260 -1005 7260 5 4560 5 4560 -1005 +4 0 0 50 -1 0 12 0.0000 4 180 885 4650 -404 impl_init()\001 +4 0 0 50 -1 0 12 0.0000 4 180 1785 4657 -158 impl_is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 180 2400 4815 -764 set_impl< Iterator, behavior >\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 1020 4185 1020 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 435 4185 435 4185 1830 2430 1830 2430 435 +4 0 0 50 -1 0 12 0.0000 4 165 1305 2520 1695 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 2520 1470 init()\001 +4 0 0 50 -1 0 12 0.0000 4 135 585 2970 885 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 2790 660 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 180 960 2520 1245 value : type\001 +4 0 0 50 -1 0 10 0.0000 4 105 660 2295 2235 <<refine>>\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 4635 3285 4455 3375 4635 3195 4635 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 3285 4635 3285 5490 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 4095 4185 4095 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 3510 4185 3510 4185 4455 2430 4455 2430 3510 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 2010 3285 1830 3375 2010 3195 2010 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3285 2010 3285 3510 +4 0 0 50 -1 0 10 0.0000 4 105 690 2295 4860 <<model>>\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 2520 4320 next()\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 2790 3735 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1350 2610 3960 Forward_Iterator\001 Index: doc/latex/paradigm/figures/simplevt.fig =================================================================== --- doc/latex/paradigm/figures/simplevt.fig (révision 0) +++ doc/latex/paradigm/figures/simplevt.fig (révision 0) @@ -0,0 +1,46 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 3465 2475 3645 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3465 2655 3555 2475 3645 2655 3465 2655 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3555 2655 3555 3420 +-6 +6 4410 3240 4725 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 4410 3240 4725 3240 4725 3555 4410 3555 4410 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 4500 3465 T\001 +-6 +6 4950 4095 6345 4365 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 4950 4095 6210 4095 6210 4230 6345 4230 6210 4095 6345 4230 + 6345 4365 4950 4365 4950 4095 +4 0 0 50 -1 0 12 0.0000 4 165 1035 5040 4275 this->v_ = v;\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 4410 4230 45 45 4410 4230 4455 4230 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4455 4230 4950 4230 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2565 1665 4545 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2565 1260 4545 1260 4545 2475 2565 2475 2565 1260 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2565 3825 4545 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2565 3420 4545 3420 4545 4635 2565 4635 2565 3420 +4 0 0 50 -1 1 12 0.0000 4 30 135 2655 2340 ...\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 3195 1530 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 1590 2655 2115 set_value(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 2655 4050 value : type = T\001 +4 0 0 50 -1 1 12 0.0000 4 30 135 2655 4500 ...\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 3015 3690 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1605 2655 4275 set_value(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 2655 1890 value : type\001 Index: doc/latex/paradigm/figures/selectors.fig =================================================================== --- doc/latex/paradigm/figures/selectors.fig (révision 0) +++ doc/latex/paradigm/figures/selectors.fig (révision 0) @@ -0,0 +1,133 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 2430 1080 4185 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2430 1665 4185 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2430 1080 4185 1080 4185 2475 2430 2475 2430 1080 +4 0 0 50 -1 0 12 0.0000 4 165 1305 2520 2340 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 2520 2115 init()\001 +4 0 0 50 -1 0 12 0.0000 4 180 960 2520 1890 value : type\001 +4 0 1 50 -1 2 12 0.0000 4 135 675 2970 1530 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 2790 1305 << concept >>\001 +-6 +6 1170 3735 2925 4680 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1170 4320 2925 4320 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 1170 3735 2925 3735 2925 4680 1170 4680 1170 3735 +4 0 0 50 -1 0 12 0.0000 4 180 480 1260 4545 prev()\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 1530 3960 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1500 1305 4185 Backward_Iterator\001 +-6 +6 3735 3735 5490 4680 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3735 4320 5490 4320 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3735 3735 5490 3735 5490 4680 3735 4680 3735 3735 +4 0 0 50 -1 0 12 0.0000 4 165 480 3825 4545 next()\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 4095 3960 << concept >>\001 +4 0 9 50 -1 2 12 0.0000 4 165 1530 3915 4185 Forward_Iterator\001 +-6 +6 6570 1125 12060 5175 +6 9045 1125 10800 1710 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 9045 1125 10800 1125 10800 1710 9045 1710 9045 1125 +4 0 1 50 -1 2 12 0.0000 4 135 675 9585 1575 Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 9405 1350 << concept >>\001 +-6 +6 9765 1710 9945 2430 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 9765 1890 9855 1710 9945 1890 9765 1890 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9855 1890 9855 2430 +-6 +6 7425 3915 8100 4590 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7909 3979 8100 3915 8036 4106 7909 3979 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7973 4042 7432 4583 +-6 +6 6570 4590 8460 5175 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 6570 4590 8325 4590 8325 5175 6570 5175 6570 4590 +4 0 0 50 -1 0 10 0.0000 4 135 825 6930 4815 << concept >>\001 +4 0 9 50 -1 2 12 0.0000 4 180 1800 6660 5040 Write_Only_Iterator\001 +-6 +6 10170 3915 10845 4590 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 10654 3979 10845 3915 10781 4106 10654 3979 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 10718 4042 10177 4583 +-6 +6 9090 3915 9765 4590 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 9281 3979 9090 3915 9154 4106 9281 3979 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9217 4042 9758 4583 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7740 3555 9495 3555 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 7740 2970 9495 2970 9495 3915 7740 3915 7740 2970 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 10305 3555 12060 3555 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 10305 2970 12060 2970 12060 3915 10305 3915 10305 2970 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8595 2970 8595 2430 11160 2430 11160 2970 +2 1 1 1 0 7 50 -1 -1 6.000 0 0 -1 0 0 2 + 10080 2205 8325 2205 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 9090 4590 10845 4590 10845 5175 9090 5175 9090 4590 +4 0 0 50 -1 0 10 0.0000 4 135 825 8100 3195 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 180 1530 10395 3780 get_value() : value\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 10665 3195 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1605 7830 3780 set_value(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 165 1140 7965 3420 Write_Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1110 10575 3420 Read_Iterator\001 +4 0 0 50 -1 0 10 0.0000 4 105 660 10080 1935 <<refine>>\001 +4 0 0 50 -1 0 10 0.0000 4 135 825 9450 4815 << concept >>\001 +4 0 0 50 -1 0 12 0.0000 4 165 1665 9180 5040 Read_Write_Iterator\001 +4 0 21 50 -1 2 14 0.0000 4 195 1485 6840 2250 { accessibility }\001 +-6 +6 5175 5850 7110 6480 +6 6795 5850 7110 6165 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 6795 5850 7110 5850 7110 6165 6795 6165 6795 5850 +4 0 0 50 -1 0 12 0.0000 4 135 120 6885 6075 T\001 +-6 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5175 6030 6930 6030 6930 6480 5175 6480 5175 6030 +4 0 15 50 -1 2 12 0.0000 4 180 1260 5490 6300 array_iterator\001 +-6 +6 5985 5175 6840 6030 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6758 5392 6821 5201 6630 5265 6758 5392 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 6694 5329 5985 6030 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3195 2655 3285 2475 3375 2655 3195 2655 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3285 2655 3285 3195 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2025 3735 2025 3195 4590 3195 4590 3735 +2 1 1 1 0 7 50 -1 -1 6.000 0 0 -1 0 0 2 + 3510 2970 1755 2970 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4672 4897 4609 4706 4800 4770 4672 4897 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 4736 4834 5940 6030 +4 0 0 50 -1 0 10 0.0000 4 105 660 3510 2700 <<refine>>\001 +4 0 22 50 -1 2 14 0.0000 4 195 1245 450 3015 { browsing }\001 +4 0 26 50 -1 2 14 0.0000 4 195 2250 6750 5670 { thanks to selector 2 }\001 +4 0 26 50 -1 2 14 0.0000 4 195 2250 3105 5670 { thanks to selector 1 }\001 +4 0 0 50 -1 2 14 0.0000 4 150 1275 5422 5482 << model >>\001 Index: doc/latex/paradigm/figures/scoop1a.fig =================================================================== --- doc/latex/paradigm/figures/scoop1a.fig (révision 0) +++ doc/latex/paradigm/figures/scoop1a.fig (révision 0) @@ -0,0 +1,484 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 315 180 2250 4095 +6 1935 2385 2250 2700 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 1935 2385 2250 2385 2250 2700 1935 2700 1935 2385 +4 0 0 50 -1 0 12 0.0000 4 135 120 2025 2610 T\001 +-6 +6 1035 1620 1215 2565 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1035 1800 1125 1620 1215 1800 1035 1800 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1125 1800 1125 2565 +-6 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 360 3060 1800 3060 1800 3330 360 3330 360 3060 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 315 2970 2070 2970 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 315 2565 2070 2565 2070 4095 315 4095 315 2565 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 405 495 1935 495 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 450 585 1530 585 1530 855 450 855 450 585 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 405 180 1935 180 1935 1620 405 1620 405 180 +4 0 0 50 -1 0 12 0.0000 4 180 1095 630 2835 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 405 3240 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 405 3510 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 405 3735 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 405 3960 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 810 405 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 495 765 value : type\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 495 1035 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1035 495 1485 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 495 1260 is_valid() : bool\001 +-6 +6 315 11835 12465 17010 +6 3375 13095 6525 16290 +6 3375 15300 6525 16290 +6 6210 15300 6525 15615 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 6210 15300 6525 15300 6525 15615 6210 15615 6210 15300 +4 0 0 50 -1 0 12 0.0000 4 135 120 6300 15525 T\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3375 15885 6345 15885 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3375 15480 6345 15480 6345 16290 3375 16290 3375 15480 +4 0 24 50 -1 2 12 0.0000 4 165 645 3600 15750 vtypes<\001 +4 0 0 50 -1 0 12 0.0000 4 180 1425 4365 15750 array_iterator<T>\001 +4 0 24 50 -1 2 12 0.0000 4 105 105 5940 15750 >\001 +4 0 0 50 -1 0 12 0.0000 4 180 1365 3465 16155 value : type = T\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4680 13995 4770 13815 4860 13995 4680 13995 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3555 13410 6120 13410 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3555 13095 6120 13095 6120 13815 3555 13815 3555 13095 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4770 13995 4770 15480 +4 0 0 50 -1 0 12 0.0000 4 180 1155 3645 13680 value : type =\001 +4 0 12 50 -1 3 12 0.0000 4 135 1020 4950 13680 stc::abstract\001 +4 0 24 50 -1 2 12 0.0000 4 165 645 4050 13320 vtypes<\001 +4 0 24 50 -1 2 12 0.0000 4 105 105 5535 13320 >\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 4815 13320 Iterator\001 +-6 +6 8190 14535 8370 15480 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8190 14715 8280 14535 8370 14715 8190 14715 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8280 14715 8280 15480 +-6 +6 8190 12150 8370 13095 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8190 12330 8280 12150 8370 12330 8190 12330 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8280 12330 8280 13095 +-6 +6 9270 15300 9585 15615 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9270 15300 9585 15300 9585 15615 9270 15615 9270 15300 +4 0 0 50 -1 0 12 0.0000 4 135 120 9360 15525 T\001 +-6 +6 7380 16290 8415 16470 +4 0 24 50 -1 2 12 0.0000 4 180 495 7380 16425 impl_\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 7920 16425 next()\001 +-6 +6 9765 13725 12465 14085 +6 11205 13815 12240 13995 +4 0 24 50 -1 2 12 0.0000 4 180 495 11205 13950 impl_\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 11745 13950 next()\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 9765 13725 12330 13725 12330 13860 12465 13860 12330 13725 12465 13860 + 12465 14085 9765 14085 9765 13725 +4 0 12 50 -1 3 12 0.0000 4 165 1215 9855 13950 this -> exact() .\001 +-6 +6 315 13095 2250 17010 +6 1935 15300 2250 15615 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 1935 15300 2250 15300 2250 15615 1935 15615 1935 15300 +4 0 0 50 -1 0 12 0.0000 4 135 120 2025 15525 T\001 +-6 +6 1035 14535 1215 15480 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1035 14715 1125 14535 1215 14715 1035 14715 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1125 14715 1125 15480 +-6 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 360 15975 1800 15975 1800 16245 360 16245 360 15975 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 315 15885 2070 15885 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 315 15480 2070 15480 2070 17010 315 17010 315 15480 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 405 13410 1935 13410 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 450 13500 1530 13500 1530 13770 450 13770 450 13500 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 405 13095 1935 13095 1935 14535 405 14535 405 13095 +4 0 0 50 -1 0 12 0.0000 4 180 1095 630 15750 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 405 16155 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 405 16425 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 405 16650 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 405 16875 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 810 13320 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 495 13680 value : type\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 495 13950 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1035 495 14400 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 495 14175 is_valid() : bool\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 8100 13905 45 45 8100 13905 8055 13905 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 180.00 + 1575 13635 3465 13635 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 180.00 + 1845 16110 3285 16110 +2 1 0 2 24 7 50 -1 -1 0.000 0 0 7 1 0 4 + 0 0 2.00 120.00 180.00 + 11430 14130 11430 15165 10215 16380 8505 16380 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7380 13410 9315 13410 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7380 13095 9315 13095 9315 14535 7380 14535 7380 13095 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7380 11835 9315 11835 9315 12150 7380 12150 7380 11835 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 8145 13905 9765 13905 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7290 15885 9405 15885 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 7290 15480 9405 15480 9405 17010 7290 17010 7290 15480 +4 0 0 50 -1 0 12 0.0000 4 165 1050 7470 14400 set(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 7470 14175 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 7470 13950 next()\001 +4 0 12 50 -1 3 12 0.0000 4 180 1695 7470 13680 stc_typename(value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 8010 13320 Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 7605 15750 array_iterator\001 +4 0 12 50 -1 3 12 0.0000 4 180 1350 7380 16155 stc_using(value)\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 7920 16650 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 7920 16875 set(v : value)\001 +4 0 24 50 -1 2 12 0.0000 4 180 495 7380 16650 impl_\001 +4 0 24 50 -1 2 12 0.0000 4 180 495 7380 16875 impl_\001 +4 0 12 50 -1 3 12 0.0000 4 180 330 8145 12060 Any\001 +-6 +6 14895 7020 19890 13050 +6 16515 11430 16830 11745 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 16515 11430 16830 11430 16830 11745 16515 11745 16515 11430 +4 0 0 50 -1 0 12 0.0000 4 135 120 16605 11655 T\001 +-6 +6 16470 8865 17055 9180 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 16470 8865 17055 8865 17055 9180 16470 9180 16470 8865 +4 0 0 50 -1 0 12 0.0000 4 135 465 16515 9090 Exact\001 +-6 +6 15750 8100 15930 9045 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 15840 8280 15840 9045 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 15750 8280 15840 8100 15930 8280 15750 8280 +-6 +6 14895 7020 19890 8100 +6 16605 7605 19890 7965 +6 17325 7605 19890 7965 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 17325 7605 19755 7605 19755 7740 19890 7740 19755 7605 19890 7740 + 19890 7965 17325 7965 17325 7605 +4 0 0 50 -1 0 12 0.0000 4 165 2220 17415 7830 return *(Exact*)(void*)this\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 16650 7785 45 45 16650 7785 16605 7785 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 16695 7785 17325 7785 +-6 +6 16650 7020 17235 7335 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 16650 7020 17235 7020 17235 7335 16650 7335 16650 7020 +4 0 0 50 -1 0 12 0.0000 4 135 465 16695 7245 Exact\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 14895 7560 16920 7560 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 14895 7200 16920 7200 16920 8100 14895 8100 14895 7200 +4 0 0 50 -1 0 12 0.0000 4 165 1470 14985 7830 + exact() : Exact&\001 +4 0 0 50 -1 0 12 0.0000 4 30 135 14985 7965 ...\001 +4 0 0 50 -1 1 12 0.0000 4 180 315 15660 7425 Any\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 15930 9810 45 45 15930 9810 15885 9810 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 15705 10845 15705 11610 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 14895 12015 16650 12015 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 14895 11610 16650 11610 16650 13050 14895 13050 14895 11610 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 15615 10845 15705 10665 15795 10845 15615 10845 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 15975 9810 17100 9810 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 17100 9675 19350 9675 19350 9810 19485 9810 19350 9675 19485 9810 + 19485 10035 17100 10035 17100 9675 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 15030 9360 16740 9360 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 15030 9045 16740 9045 16740 10665 15030 10665 15030 9045 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 17145 9720 18315 9720 18315 9990 17145 9990 17145 9720 +4 0 0 50 -1 0 12 0.0000 4 180 1275 14985 12240 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 180 960 14985 12465 impl_next()\001 +4 0 0 50 -1 0 12 0.0000 4 180 1785 14985 12690 impl_is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 180 1530 14985 12915 impl_set(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 15210 11880 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 2070 17190 9900 this->exact(). impl_next()\001 +4 0 4 50 -1 1 14 0.0000 4 225 1575 17145 9585 manual dispatch\001 +4 0 0 50 -1 0 12 0.0000 4 180 1110 15120 9630 + value : type\001 +4 0 0 50 -1 0 12 0.0000 4 165 630 15120 9855 + next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1455 15120 10080 + is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1200 15120 10305 + set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 195 900 15120 10530 # Iterator()\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 15525 9270 Iterator\001 +4 0 4 50 -1 1 14 0.0000 4 165 900 17460 7515 downcast\001 +-6 +6 9270 9270 9585 9585 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9270 9270 9585 9270 9585 9585 9270 9585 9270 9270 +4 0 0 50 -1 0 12 0.0000 4 135 120 9360 9495 T\001 +-6 +6 315 7065 2250 10980 +6 1935 9270 2250 9585 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 1935 9270 2250 9270 2250 9585 1935 9585 1935 9270 +4 0 0 50 -1 0 12 0.0000 4 135 120 2025 9495 T\001 +-6 +6 1035 8505 1215 9450 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1035 8685 1125 8505 1215 8685 1035 8685 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1125 8685 1125 9450 +-6 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 360 9945 1800 9945 1800 10215 360 10215 360 9945 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 315 9855 2070 9855 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 315 9450 2070 9450 2070 10980 315 10980 315 9450 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 405 7380 1935 7380 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 450 7470 1530 7470 1530 7740 450 7740 450 7470 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 405 7065 1935 7065 1935 8505 405 8505 405 7065 +4 0 0 50 -1 0 12 0.0000 4 180 1095 630 9720 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 405 10125 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 405 10395 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 405 10620 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 405 10845 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 810 7290 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 495 7650 value : type\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 495 7920 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1035 495 8370 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 495 8145 is_valid() : bool\001 +-6 +6 6210 9270 6525 9585 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 6210 9270 6525 9270 6525 9585 6210 9585 6210 9270 +4 0 0 50 -1 0 12 0.0000 4 135 120 6300 9495 T\001 +-6 +6 12105 2385 12420 2700 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 12105 2385 12420 2385 12420 2700 12105 2700 12105 2385 +4 0 0 50 -1 0 12 0.0000 4 135 120 12195 2610 T\001 +-6 +6 3150 180 5085 4095 +6 4770 2385 5085 2700 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 4770 2385 5085 2385 5085 2700 4770 2700 4770 2385 +4 0 0 50 -1 0 12 0.0000 4 135 120 4860 2610 T\001 +-6 +6 3870 1620 4050 2565 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3870 1800 3960 1620 4050 1800 3870 1800 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3960 1800 3960 2565 +-6 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3195 3060 4635 3060 4635 3330 3195 3330 3195 3060 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3150 2970 4905 2970 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3150 2565 4905 2565 4905 4095 3150 4095 3150 2565 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3240 495 4770 495 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3285 585 4365 585 4365 855 3285 855 3285 585 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3240 180 4770 180 4770 1620 3240 1620 3240 180 +4 0 0 50 -1 0 12 0.0000 4 180 1095 3465 2835 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 3240 3240 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 3240 3510 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 3240 3735 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 3240 3960 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 3645 405 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 3330 765 value : type\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 3330 1035 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1035 3330 1485 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 3330 1260 is_valid() : bool\001 +-6 +6 9045 2385 9360 2700 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9045 2385 9360 2385 9360 2700 9045 2700 9045 2385 +4 0 0 50 -1 0 12 0.0000 4 135 120 9135 2610 T\001 +-6 +6 8235 8505 8415 9450 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8235 8685 8325 8505 8415 8685 8235 8685 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8325 8685 8325 9450 +-6 +6 11070 1620 11250 2565 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 11070 1800 11160 1620 11250 1800 11070 1800 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 11160 1800 11160 2565 +-6 +6 10125 180 12240 1620 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 10125 495 12240 495 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10125 180 12240 180 12240 1620 10125 1620 10125 180 +4 0 12 50 -1 3 12 0.0000 4 180 1695 10215 765 stc_typename(value)\001 +4 0 25 50 -1 1 12 0.0000 4 180 465 10215 1035 next()\001 +4 0 25 50 -1 1 12 0.0000 4 180 1305 10215 1260 is_valid() : bool\001 +4 0 25 50 -1 1 12 0.0000 4 180 1035 10215 1485 set(v : value)\001 +4 0 25 50 -1 1 12 0.0000 4 135 630 10845 405 Iterator\001 +-6 +6 7965 7830 9765 7920 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 8010 7875 45 45 8010 7875 7965 7875 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 8055 7875 9765 7875 +-6 +6 9765 7785 12465 8145 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 9765 7785 12330 7785 12330 7920 12465 7920 12330 7785 12465 7920 + 12465 8145 9765 8145 9765 7785 +4 0 12 50 -1 3 12 0.0000 4 165 1215 9855 8010 this -> exact() .\001 +4 0 0 50 -1 2 12 0.0000 4 180 1035 11205 8010 impl_next();\001 +-6 +6 9765 7335 14310 7695 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 9765 7335 14175 7335 14175 7470 14310 7470 14175 7335 14310 7470 + 14310 7695 9765 7695 9765 7335 +4 0 12 50 -1 3 12 0.0000 4 195 3045 9855 7560 typedef typename vtypes< Exact >::\001 +4 0 0 50 -1 3 12 0.0000 4 135 450 13050 7560 value\001 +4 0 12 50 -1 3 12 0.0000 4 180 510 13635 7560 value;\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 9225 7560 45 45 9225 7560 9180 7560 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 180.00 + 1575 7605 3465 7605 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 180.00 + 1845 10080 3285 10080 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7290 9855 9405 9855 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 7290 9450 9405 9450 9405 10980 7290 10980 7290 9450 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4680 7965 4770 7785 4860 7965 4680 7965 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3555 7380 6120 7380 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3555 7065 6120 7065 6120 7785 3555 7785 3555 7065 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4770 7965 4770 9450 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3375 9855 6345 9855 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3375 9450 6345 9450 6345 10260 3375 10260 3375 9450 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 180.00 + 4410 720 6300 720 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 180.00 + 4680 3195 6120 3195 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 10125 2970 12240 2970 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 10125 2565 12240 2565 12240 4095 10125 4095 10125 2565 +2 1 0 1 7 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 12600 810 15165 810 15165 945 15300 945 15165 810 15300 945 + 15300 1170 12600 1170 12600 810 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7515 1080 7605 900 7695 1080 7515 1080 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6390 495 8955 495 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6390 180 8955 180 8955 900 6390 900 6390 180 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7605 1080 7605 2565 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6210 2970 9180 2970 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 6210 2565 9180 2565 9180 3375 6210 3375 6210 2565 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7290 7380 9405 7380 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7290 7065 9405 7065 9405 8505 7290 8505 7290 7065 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 9270 7560 9765 7560 +2 1 0 2 15 7 50 -1 -1 0.000 0 0 7 1 0 4 + 0 0 2.00 120.00 180.00 + 11700 8100 11700 9135 10485 10350 8505 10350 +2 1 0 2 15 7 50 -1 -1 0.000 0 0 7 1 0 5 + 0 0 2.00 120.00 180.00 + 13275 7605 13275 10035 12060 11250 5535 11250 4905 10215 +4 0 0 50 -1 0 12 0.0000 4 180 1095 7605 9720 array_iterator\001 +4 0 12 50 -1 3 12 0.0000 4 180 1350 7380 10125 stc_using(value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1155 3645 7650 value : type =\001 +4 0 12 50 -1 3 12 0.0000 4 135 1020 4950 7650 stc::abstract\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 4815 7290 Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1425 4365 9720 array_iterator<T>\001 +4 0 0 50 -1 0 12 0.0000 4 180 1365 3465 10125 value : type = T\001 +4 0 12 50 -1 3 12 0.0000 4 180 1350 10215 3240 stc_using(value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 10665 2835 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1155 6480 765 value : type =\001 +4 0 12 50 -1 3 12 0.0000 4 135 1020 7785 765 stc::abstract\001 +4 0 12 50 -1 2 12 0.0000 4 165 645 6885 405 vtypes<\001 +4 0 25 50 -1 1 12 0.0000 4 135 630 7650 405 Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1425 7200 2835 array_iterator<T>\001 +4 0 0 50 -1 0 12 0.0000 4 180 1365 6300 3240 value : type = T\001 +4 0 12 50 -1 2 12 0.0000 4 105 105 8370 405 >\001 +4 0 12 50 -1 2 12 0.0000 4 105 105 8775 2835 >\001 +4 0 12 50 -1 2 12 0.0000 4 165 645 6435 2835 vtypes<\001 +4 0 25 50 -1 0 12 0.0000 4 165 480 10215 3510 next()\001 +4 0 25 50 -1 0 12 0.0000 4 165 1305 10215 3735 is_valid() : bool\001 +4 0 25 50 -1 0 12 0.0000 4 165 1050 10215 3960 set(v : value)\001 +4 0 12 50 -1 2 12 0.0000 4 165 645 4050 7290 vtypes<\001 +4 0 12 50 -1 2 12 0.0000 4 165 645 3600 9720 vtypes<\001 +4 0 12 50 -1 2 12 0.0000 4 105 105 5940 9720 >\001 +4 0 12 50 -1 2 12 0.0000 4 105 105 5535 7290 >\001 +4 0 0 50 -1 2 12 0.0000 4 180 975 7380 10395 impl_next()\001 +4 0 0 50 -1 2 12 0.0000 4 180 1815 7380 10620 impl_is_valid() : bool\001 +4 0 0 50 -1 2 12 0.0000 4 180 1560 7380 10845 impl_set(v : value)\001 +4 0 0 50 -1 3 12 0.0000 4 165 480 7380 7920 next()\001 +4 0 12 50 -1 3 12 0.0000 4 180 1695 7380 7650 stc_typename(value)\001 +4 0 25 50 -1 1 12 0.0000 4 135 630 7965 7290 Iterator\001 +4 0 0 50 -1 3 12 0.0000 4 165 1305 7380 8145 is_valid() : bool\001 +4 0 0 50 -1 3 12 0.0000 4 165 1035 7380 8370 set(v : value)\001 Index: doc/latex/paradigm/figures/harddeco.fig =================================================================== --- doc/latex/paradigm/figures/harddeco.fig (révision 0) +++ doc/latex/paradigm/figures/harddeco.fig (révision 0) @@ -0,0 +1,126 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 1485 900 3240 1890 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1485 1305 3240 1305 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 1485 900 3240 900 3240 1890 1485 1890 1485 900 +4 0 0 50 -1 1 12 0.0000 4 135 630 2025 1170 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 1575 1755 is_valid() : bool\001 +4 0 0 50 -1 1 12 0.0000 4 180 405 1575 1530 init()\001 +-6 +6 225 2655 1980 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 225 3060 1980 3060 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 225 2655 1980 2655 1980 3420 225 3420 225 2655 +4 0 0 50 -1 1 12 0.0000 4 180 1560 360 2925 Backward_Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 480 315 3285 prev()\001 +-6 +6 2790 2655 4545 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2790 3060 4545 3060 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2790 2655 4545 2655 4545 3420 2790 3420 2790 2655 +4 0 0 50 -1 1 12 0.0000 4 165 1455 2970 2925 Forward_Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 2880 3285 next()\001 +-6 +6 2790 3780 4725 4410 +6 4410 3780 4725 4095 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 4410 3780 4725 3780 4725 4095 4410 4095 4410 3780 +4 0 0 50 -1 0 12 0.0000 4 135 120 4500 4005 T\001 +-6 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 2790 3960 4545 3960 4545 4410 2790 4410 2790 3960 +4 0 0 50 -1 0 12 0.0000 4 180 1095 3105 4230 array_iterator\001 +-6 +6 3555 3375 3780 3960 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3557 3597 3647 3417 3737 3597 3557 3597 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3644 3600 3649 3960 +-6 +6 6840 1260 7065 1845 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6842 1482 6932 1302 7022 1482 6842 1482 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6929 1485 6934 1845 +-6 +6 6075 1845 10125 3375 +6 6705 2250 9225 2565 +6 8190 2250 9225 2565 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 8 + 9225 2385 9090 2385 9090 2250 9225 2385 9225 2565 8190 2565 + 8190 2250 9090 2250 +4 0 0 50 -1 0 12 0.0000 4 165 720 8280 2475 iter.init()\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 6750 2430 45 45 6750 2430 6750 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 150.00 + 6795 2430 8190 2430 +-6 +6 6840 2790 7065 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6842 3012 6932 2832 7022 3012 6842 3012 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6929 3015 6934 3375 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 7650 2655 45 45 7650 2655 7650 2700 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6075 2250 7830 2250 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 150.00 + 7693 2674 8190 2790 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 8 + 10125 2790 9990 2790 9990 2655 10125 2790 10125 2970 8190 2970 + 8190 2655 9990 2655 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 6075 1845 7830 1845 7830 2835 6075 2835 6075 1845 +4 0 0 50 -1 0 12 0.0000 4 165 1620 8280 2880 return iter.is_valid()\001 +4 0 0 50 -1 1 12 0.0000 4 165 1575 6255 2115 Iterator_Decorator\001 +4 0 0 50 -1 0 12 0.0000 4 165 405 6165 2475 init()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 6165 2700 is_valid() : bool\001 +-6 +6 6075 3375 9540 4590 +6 8145 3780 9540 4320 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 8 + 9540 3915 9405 3915 9405 3780 9540 3915 9540 4320 8145 4320 + 8145 3780 9405 3780 +4 0 0 50 -1 0 12 0.0000 4 180 1080 8235 4005 print("hello")\001 +4 0 0 50 -1 0 12 0.0000 4 180 885 8235 4230 super.init()\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 6705 3960 45 45 6705 3960 6705 4005 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6075 3780 7830 3780 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 6075 3375 7830 3375 7830 4590 6075 4590 6075 3375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 90.00 150.00 + 6750 3960 8145 3960 +4 0 0 50 -1 0 12 0.0000 4 165 405 6165 4005 init()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1110 6390 3645 hello_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1350 6120 4410 { and that's all! }\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2250 2070 2340 1890 2430 2070 2250 2070 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2340 2070 2340 2340 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 6075 900 7830 900 7830 1305 6075 1305 6075 900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 4 + 0 0 1.00 90.00 150.00 + 5882 2070 5445 2070 5445 1125 6075 1125 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1080 2655 1080 2340 3645 2340 3645 2655 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6071 2071 5981 1980 5891 2070 5981 2160 6071 2071 +4 0 0 50 -1 1 12 0.0000 4 135 630 6660 1170 Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 135 270 5580 990 iter\001 Index: doc/latex/paradigm/figures/design.fig =================================================================== --- doc/latex/paradigm/figures/design.fig (révision 0) +++ doc/latex/paradigm/figures/design.fig (révision 0) @@ -0,0 +1,393 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 5805 1350 9270 4860 +6 5895 1350 7425 2475 +6 5985 1755 7290 2385 +4 0 0 50 -1 1 12 0.0000 4 180 465 5985 1890 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 5985 2115 is_valid() : bool\001 +4 0 0 50 -1 1 12 0.0000 4 180 1050 5985 2340 set(v : void*)\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5895 1665 7425 1665 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5895 1350 7425 1350 7425 2475 5895 2475 5895 1350 +4 0 0 50 -1 1 12 0.0000 4 135 630 6300 1575 Iterator\001 +-6 +6 5805 3240 9270 4860 +6 7425 3240 7740 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 7425 3240 7740 3240 7740 3555 7425 3555 7425 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 7515 3465 T\001 +-6 +6 7920 4545 9270 4815 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 7920 4545 9135 4545 9135 4680 9270 4680 9135 4545 9270 4680 + 9270 4815 7920 4815 7920 4545 +4 0 0 50 -1 0 12 0.0000 4 165 1020 7965 4725 v_ := *(T*)v\001 +-6 +6 7110 4635 7920 4725 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 7155 4680 45 45 7155 4680 7110 4680 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 7200 4680 7920 4680 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5805 3825 7560 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 5805 3420 7560 3420 7560 4860 5805 4860 5805 3420 +4 0 0 50 -1 0 12 0.0000 4 180 1275 5895 4050 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 5895 4275 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 5895 4500 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1080 5895 4725 set(v : void*)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 6120 3690 array_iterator\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6525 2655 6615 2475 6705 2655 6525 2655 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6615 2655 6615 3420 +-6 +6 1170 2475 1350 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1170 2655 1260 2475 1350 2655 1170 2655 +2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 1260 2655 1260 3420 +-6 +6 585 900 2070 2475 +6 675 1530 1980 2385 +4 0 0 50 -1 0 12 0.0000 4 180 960 675 1665 value : type\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 675 1890 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 675 2115 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 675 2340 set(v : value)\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 585 1395 2070 1395 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 585 900 2070 900 2070 2475 585 2475 585 900 +4 0 0 50 -1 0 12 0.0000 4 135 1215 675 1080 << interface >>\001 +4 0 0 50 -1 0 12 0.0000 4 135 585 1035 1305 Iterator\001 +-6 +6 1215 4635 2700 4860 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 1260 4815 45 45 1260 4815 1215 4815 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1305 4815 2700 4680 +-6 +6 2025 4995 2700 5085 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 2070 5040 45 45 2070 5040 2025 5040 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2115 5040 2700 5040 +-6 +6 1755 5220 2700 5445 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 1800 5265 45 45 1800 5265 1755 5265 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 1845 5265 2700 5400 +-6 +6 2700 4905 5040 5175 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 2700 4905 4905 4905 4905 5040 5040 5040 4905 4905 5040 5040 + 5040 5175 2700 5175 2700 4905 +4 0 0 50 -1 0 12 0.0000 4 165 2055 2790 5085 return i_ >= 0 and i_ < n_\001 +-6 +6 2700 5265 3555 5535 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 2700 5265 3420 5265 3420 5400 3555 5400 3420 5265 3555 5400 + 3555 5535 2700 5535 2700 5265 +4 0 0 50 -1 0 12 0.0000 4 120 570 2745 5445 v_ := v\001 +-6 +6 2700 4545 3915 4815 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 2700 4545 3780 4545 3780 4680 3915 4680 3780 4545 3915 4680 + 3915 4815 2700 4815 2700 4545 +4 0 0 50 -1 0 12 0.0000 4 165 885 2790 4725 i_ := i_ + 1\001 +-6 +6 450 3915 1440 4320 +4 0 0 50 -1 0 12 0.0000 4 165 990 450 4050 # i_, n_ : int\001 +4 0 0 50 -1 0 12 0.0000 4 165 960 450 4275 # v_ : value\001 +-6 +6 2205 3240 2520 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 2205 3240 2520 3240 2520 3555 2205 3555 2205 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 2295 3465 T\001 +-6 +6 9765 1080 12735 4860 +6 11385 3240 11700 3555 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 11385 3240 11700 3240 11700 3555 11385 3555 11385 3240 +4 0 0 50 -1 0 12 0.0000 4 135 120 11475 3465 T\001 +-6 +6 11070 4635 11880 4725 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 11115 4680 45 45 11115 4680 11070 4680 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 11160 4680 11880 4680 +-6 +6 11880 4545 12735 4815 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 11880 4545 12600 4545 12600 4680 12735 4680 12600 4545 12735 4680 + 12735 4815 11880 4815 11880 4545 +4 0 0 50 -1 0 12 0.0000 4 120 570 11925 4725 v_ := v\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 10485 2655 10575 2475 10665 2655 10485 2655 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 10575 2655 10575 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9765 3825 11520 3825 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 9765 3420 11520 3420 11520 4860 9765 4860 9765 3420 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9855 1395 11385 1395 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 9855 1080 11385 1080 11385 2475 9855 2475 9855 1080 +4 0 0 50 -1 0 12 0.0000 4 180 1275 9855 4050 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 9855 4275 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 9855 4500 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 9855 4725 set(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 10080 3690 array_iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 9945 1890 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 9945 2115 is_valid() : bool\001 +4 0 0 50 -1 1 12 0.0000 4 180 1035 9945 2340 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 10260 1305 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 9945 1665 value : type\001 +-6 +6 13680 4050 16110 5940 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 13680 4230 15930 4230 15930 5940 13680 5940 13680 4230 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 13680 4635 15930 4635 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 15795 4050 16110 4050 16110 4365 15795 4365 15795 4050 +4 0 0 50 -1 0 12 0.0000 4 180 1995 13770 4905 category : type = Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 13770 5130 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 13770 5355 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 13770 5580 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 13770 5805 set(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 14265 4500 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 135 120 15885 4275 T\001 +-6 +6 1935 11295 2250 11610 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 1935 11295 2250 11295 2250 11610 1935 11610 1935 11295 +4 0 0 50 -1 0 12 0.0000 4 135 120 2025 11520 T\001 +-6 +6 1035 10530 1215 11475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1035 10710 1125 10530 1215 10710 1035 10710 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1125 10710 1125 11475 +-6 +6 14940 11295 15255 11610 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 14940 11295 15255 11295 15255 11610 14940 11610 14940 11295 +4 0 0 50 -1 0 12 0.0000 4 135 120 15030 11520 T\001 +-6 +6 14895 8730 15480 9045 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 14895 8730 15480 8730 15480 9045 14895 9045 14895 8730 +4 0 0 50 -1 0 12 0.0000 4 135 465 14940 8955 Exact\001 +-6 +6 14175 7965 14355 8910 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 14265 8145 14265 8910 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 14175 8145 14265 7965 14355 8145 14175 8145 +-6 +6 13320 6885 18315 7965 +6 15030 7470 18315 7830 +6 15750 7470 18315 7830 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 15750 7470 18180 7470 18180 7605 18315 7605 18180 7470 18315 7605 + 18315 7830 15750 7830 15750 7470 +4 0 0 50 -1 0 12 0.0000 4 165 2220 15840 7695 return *(Exact*)(void*)this\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 15075 7650 45 45 15075 7650 15030 7650 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 15120 7650 15750 7650 +-6 +6 15075 6885 15660 7200 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 15075 6885 15660 6885 15660 7200 15075 7200 15075 6885 +4 0 0 50 -1 0 12 0.0000 4 135 465 15120 7110 Exact\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 13320 7425 15345 7425 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 13320 7065 15345 7065 15345 7965 13320 7965 13320 7065 +4 0 0 50 -1 0 12 0.0000 4 165 1470 13410 7695 + exact() : Exact&\001 +4 0 0 50 -1 0 12 0.0000 4 30 135 13410 7830 ...\001 +4 0 0 50 -1 1 12 0.0000 4 180 315 14085 7290 Any\001 +-6 +6 3375 9090 6525 12285 +6 3375 11295 6525 12285 +6 6210 11295 6525 11610 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 6210 11295 6525 11295 6525 11610 6210 11610 6210 11295 +4 0 0 50 -1 0 12 0.0000 4 135 120 6300 11520 T\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3375 11880 6345 11880 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3375 11475 6345 11475 6345 12285 3375 12285 3375 11475 +4 0 24 50 -1 2 12 0.0000 4 165 645 3600 11745 vtypes<\001 +4 0 0 50 -1 0 12 0.0000 4 180 1425 4365 11745 array_iterator<T>\001 +4 0 24 50 -1 2 12 0.0000 4 105 105 5940 11745 >\001 +4 0 0 50 -1 0 12 0.0000 4 180 1365 3465 12150 value : type = T\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4680 9990 4770 9810 4860 9990 4680 9990 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3555 9405 6120 9405 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3555 9090 6120 9090 6120 9810 3555 9810 3555 9090 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4770 9990 4770 11475 +4 0 0 50 -1 0 12 0.0000 4 180 1155 3645 9675 value : type =\001 +4 0 12 50 -1 3 12 0.0000 4 135 1020 4950 9675 stc::abstract\001 +4 0 24 50 -1 2 12 0.0000 4 165 645 4050 9315 vtypes<\001 +4 0 24 50 -1 2 12 0.0000 4 105 105 5535 9315 >\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 4815 9315 Iterator\001 +-6 +6 8190 10530 8370 11475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8190 10710 8280 10530 8370 10710 8190 10710 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8280 10710 8280 11475 +-6 +6 8190 8145 8370 9090 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8190 8325 8280 8145 8370 8325 8190 8325 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8280 8325 8280 9090 +-6 +6 9270 11295 9585 11610 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 9270 11295 9585 11295 9585 11610 9270 11610 9270 11295 +4 0 0 50 -1 0 12 0.0000 4 135 120 9360 11520 T\001 +-6 +6 7380 12285 8415 12465 +4 0 24 50 -1 2 12 0.0000 4 180 495 7380 12420 impl_\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 7920 12420 next()\001 +-6 +6 9765 9720 12465 10080 +6 11205 9810 12240 9990 +4 0 24 50 -1 2 12 0.0000 4 180 495 11205 9945 impl_\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 11745 9945 next()\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 9765 9720 12330 9720 12330 9855 12465 9855 12330 9720 12465 9855 + 12465 10080 9765 10080 9765 9720 +4 0 12 50 -1 3 12 0.0000 4 165 1215 9855 9945 this -> exact() .\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 14355 9675 45 45 14355 9675 14310 9675 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 8100 9900 45 45 8100 9900 8055 9900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 360 3825 2340 3825 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 360 4410 2340 4410 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 360 3420 2340 3420 2340 5445 360 5445 360 3420 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 360 11970 1800 11970 1800 12240 360 12240 360 11970 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 315 11880 2070 11880 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 315 11475 2070 11475 2070 13005 315 13005 315 11475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 405 9405 1935 9405 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 450 9495 1530 9495 1530 9765 450 9765 450 9495 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 405 9090 1935 9090 1935 10530 405 10530 405 9090 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 180.00 + 1575 9630 3465 9630 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 180.00 + 1845 12105 3285 12105 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 14130 10710 14130 11475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 13320 11880 15075 11880 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 13320 11475 15075 11475 15075 12915 13320 12915 13320 11475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 14040 10710 14130 10530 14220 10710 14040 10710 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 14400 9675 15525 9675 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 15525 9540 17775 9540 17775 9675 17910 9675 17775 9540 17910 9675 + 17910 9900 15525 9900 15525 9540 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 13455 9225 15165 9225 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 13455 8910 15165 8910 15165 10530 13455 10530 13455 8910 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 15570 9585 16740 9585 16740 9855 15570 9855 15570 9585 +2 1 0 2 24 7 50 -1 -1 0.000 0 0 7 1 0 4 + 0 0 2.00 120.00 180.00 + 11430 10125 11430 11160 10215 12375 8505 12375 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7380 9405 9315 9405 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7380 9090 9315 9090 9315 10530 7380 10530 7380 9090 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7380 7830 9315 7830 9315 8145 7380 8145 7380 7830 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 8145 9900 9765 9900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7290 11880 9405 11880 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 7290 11475 9405 11475 9405 13005 7290 13005 7290 11475 +4 0 0 50 -1 0 12 0.0000 4 180 1095 810 3690 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1425 450 4635 + value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 630 450 4860 + next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1455 450 5085 + is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1200 450 5310 + set(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 630 11745 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 405 12150 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 405 12420 next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 405 12645 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 405 12870 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 810 9315 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 495 9675 value : type\001 +4 0 0 50 -1 1 12 0.0000 4 180 465 495 9945 next()\001 +4 0 0 50 -1 1 12 0.0000 4 180 1035 495 10395 set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 180 1305 495 10170 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 180 1275 13410 12105 value : type = T\001 +4 0 0 50 -1 0 12 0.0000 4 180 960 13410 12330 impl_next()\001 +4 0 0 50 -1 0 12 0.0000 4 180 1785 13410 12555 impl_is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 180 1530 13410 12780 impl_set(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 13635 11745 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 2070 15615 9765 this->exact(). impl_next()\001 +4 0 4 50 -1 1 14 0.0000 4 225 1575 15570 9450 manual dispatch\001 +4 0 0 50 -1 0 12 0.0000 4 180 1110 13545 9495 + value : type\001 +4 0 0 50 -1 0 12 0.0000 4 165 630 13545 9720 + next()\001 +4 0 0 50 -1 0 12 0.0000 4 165 1455 13545 9945 + is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1200 13545 10170 + set(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 195 900 13545 10395 # Iterator()\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 13950 9135 Iterator\001 +4 0 4 50 -1 1 14 0.0000 4 165 900 15885 7380 downcast\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 7470 10395 set(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 7470 10170 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 480 7470 9945 next()\001 +4 0 12 50 -1 3 12 0.0000 4 180 1695 7470 9675 stc_typename(value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 8010 9315 Iterator\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 7605 11745 array_iterator\001 +4 0 12 50 -1 3 12 0.0000 4 180 1350 7380 12150 stc_using(value)\001 +4 0 0 50 -1 0 12 0.0000 4 165 1305 7920 12645 is_valid() : bool\001 +4 0 0 50 -1 0 12 0.0000 4 165 1050 7920 12870 set(v : value)\001 +4 0 24 50 -1 2 12 0.0000 4 180 495 7380 12645 impl_\001 +4 0 24 50 -1 2 12 0.0000 4 180 495 7380 12870 impl_\001 +4 0 12 50 -1 3 12 0.0000 4 180 330 8145 8055 Any\001 Index: doc/latex/paradigm/figures/vt1.fig =================================================================== --- doc/latex/paradigm/figures/vt1.fig (révision 0) +++ doc/latex/paradigm/figures/vt1.fig (révision 0) @@ -0,0 +1,102 @@ +#FIG 3.2 Produced by xfig version 3.2.5-alpha5 +Landscape +Center +Metric +A4 +100.00 +Single +-2 +1200 2 +6 540 90 3285 5490 +6 855 1260 2835 2475 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 855 1665 2835 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 855 1260 2835 1260 2835 2475 855 2475 855 1260 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1440 1350 2160 1350 2160 1575 1440 1575 1440 1350 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 7 0 0 5 + 900 1935 2610 1935 2610 2160 900 2160 900 1935 +4 0 0 50 -1 1 12 0.0000 4 30 135 945 2340 ...\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 1485 1530 Iterator\001 +4 0 0 50 -1 1 12 0.0000 4 180 1590 945 2115 set_value(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 945 1890 value : type\001 +-6 +6 855 3780 3015 5175 +6 2700 3780 3015 4095 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 2700 3780 3015 3780 3015 4095 2700 4095 2700 3780 +4 0 0 50 -1 0 12 0.0000 4 135 120 2790 4005 T\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 855 4365 2835 4365 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 855 3960 2835 3960 2835 5175 855 5175 855 3960 +2 2 0 1 4 7 50 -1 -1 0.000 0 0 7 0 0 5 + 900 4635 2610 4635 2610 4860 900 4860 900 4635 +4 0 0 50 -1 0 12 0.0000 4 180 1275 945 4590 value : type = T\001 +4 0 0 50 -1 1 12 0.0000 4 30 135 945 5040 ...\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 1305 4230 array_iterator\001 +4 0 0 50 -1 0 12 0.0000 4 165 1605 945 4815 set_value(v : value)\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3285 405 540 405 540 5490 3285 5490 3285 405 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3285 405 3285 90 2565 90 2565 405 +2 1 2 1 6 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 540 2835 3285 2835 +4 0 0 50 -1 0 12 0.0000 4 135 510 2655 315 before\001 +-6 +6 3600 90 9855 5490 +6 3915 3780 6525 5175 +6 6210 3780 6525 4095 +6 6210 3780 6525 4095 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 6210 3780 6525 3780 6525 4095 6210 4095 6210 3780 +4 0 0 50 -1 0 12 0.0000 4 135 120 6300 4005 T\001 +-6 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3915 4365 6345 4365 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3915 3960 6345 3960 6345 5175 3915 5175 3915 3960 +4 0 0 50 -1 0 12 0.0000 4 180 1275 4005 4590 value : type = T\001 +4 0 0 50 -1 1 12 0.0000 4 30 135 4005 5040 ...\001 +4 0 21 50 -1 0 12 0.0000 4 180 2085 4005 4815 impl_set_value(v : value)\001 +4 0 0 50 -1 0 12 0.0000 4 180 1095 4545 4230 array_iterator\001 +-6 +6 6615 1935 9585 2205 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 9 + 6615 1935 9450 1935 9450 2070 9585 2070 9450 1935 9585 2070 + 9585 2205 6615 2205 6615 1935 +4 0 21 50 -1 0 12 0.0000 4 180 2610 6705 2115 this->exact().impl_set_value(v);\001 +-6 +1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 5805 2070 45 45 5805 2070 5850 2070 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 5850 2070 6615 2070 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3870 1665 6300 1665 +2 2 0 1 0 7 51 -1 -1 0.000 0 0 -1 0 0 5 + 3870 1260 6300 1260 6300 2475 3870 2475 3870 1260 +2 2 1 1 0 7 50 -1 20 4.000 0 0 -1 0 0 5 + 6030 1035 6615 1035 6615 1350 6030 1350 6030 1035 +2 1 1 2 15 7 50 -1 -1 4.000 0 0 -1 1 0 3 + 1 1 2.00 90.00 150.00 + 8100 2250 8100 4770 6255 4770 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3600 405 9855 405 9855 5490 3600 5490 3600 405 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 9855 405 9855 90 9135 90 9135 405 +2 1 2 1 6 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 3600 2835 9855 2835 +4 0 0 50 -1 1 12 0.0000 4 30 135 3960 2340 ...\001 +4 0 0 50 -1 1 12 0.0000 4 180 945 3960 1890 value : type\001 +4 0 21 50 -1 0 12 0.0000 4 165 1605 3960 2115 set_value(v : value)\001 +4 0 0 50 -1 1 12 0.0000 4 135 630 4680 1530 Iterator\001 +4 0 21 50 -1 0 12 0.0000 4 135 465 6075 1260 Exact\001 +4 0 0 50 -1 0 12 0.0000 4 180 2910 3915 3285 current = array_iterator<T> {macro}\001 +4 0 0 50 -1 0 12 0.0000 4 180 2715 3915 3555 super = Iterator<current> {macro}\001 +4 0 0 50 -1 0 12 0.0000 4 180 2370 3870 765 super = Any<Exact> {macro}\001 +4 0 0 50 -1 0 12 0.0000 4 135 360 9270 315 after\001 +-6 Index: doc/latex/paradigm/wewant.tex =================================================================== --- doc/latex/paradigm/wewant.tex (révision 0) +++ doc/latex/paradigm/wewant.tex (révision 0) @@ -0,0 +1,953 @@ + +%============================================================ +\section{What Do We Want?} + +%------------------------------------------------------------ +\subsection{Expectations} + + +%........................................................................ +\begin{frame} + \frametitle{What Would Be Great? (\scoop~1)} + +Expectations are: +\begin{itemize} +\item factor code through class hierarchies + \begin{itemize} + \item either with ``classical'' hierarchies\\ + ~ {\tiny{$\leadsto$ ~ abstract classes on top of implementation classes}} + \item or with ``modern'' generic programming\\ + ~ {\tiny{$\leadsto$ ~ hierarchies of concepts \emph{and} hierarchies of implementation classes}} + \end{itemize} +\item get virtual types in C++ +\end{itemize} + +\smallskip + +with: +\begin{itemize} +\item strong type checking +\item method and type lookup performed at compile-time +\end{itemize} + +\smallskip + +and... + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{What Would Be Great? (\scoop~2)} + +and... + +\smallskip + +\begin{itemize} +\item separate concepts and implementation classes +% +\smallskip +% +\item have types: + \begin{itemize} + \item that are defined over other types + \item whose definition is given once + \item that modify those types + \item and that are able to keep their specificities + \end{itemize} +\end{itemize} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{The Need for Virtual Types} + + +\begin{multicols}{2} +% + \begin{center} + \includegraphics[scale=.7]{simpleoovt} + \end{center} +% +\columnbreak +% +\begin{itemize} +\item we sometimes need covariant methods +\item C++ is limited to invariance... +\item type safety cannot be guarantied at compile-time +\end{itemize} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Translation into Valid C++} + +\begin{multicols}{2} +% +\begin{lstlisting}[escapechar=@] +class @\blueIterator@ +{ +public: + virtual void set_value(void* v) = 0; + ... +}; + +template <typename T> +class @\blueArrayIterator@ : public @\blueIterator@ +{ +public: + typedef T value; + virtual void set_value(void* v) + { + this->v_ = *(value*)v; + } + ... +}; +\end{lstlisting} +% +\columnbreak +% +\begin{lstlisting}[escapechar=@] +void fill(@\blueIterator@& it, @\color{darkyellow}{void*}@ v) +{ + it.init(); + while (it.is_valid()) + it.set_value(v); +} +\end{lstlisting} +% +\end{multicols} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{The Need for Virtual Types (2/2)} + +\begin{multicols}{2} +% + \begin{center} + \includegraphics[scale=.7]{simplevt} + \end{center} +% +\columnbreak +% +\begin{itemize} +\item solution: + \begin{itemize} + \item virtual types + \item behaving just like virtual methods + \item expressing that 'value' is an associated type + \end{itemize} +\smallskip +\item but: + \begin{itemize} + \item C++ does not feature virtual types + \item we also expect them to be statically type checked + \end{itemize} +\end{itemize} +% +\end{multicols} + +\end{frame} + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Translation into Pseudo-C++} + +\begin{multicols}{2} +% +\begin{lstlisting}[escapechar=@] +class @\blueIterator@ +{ +public: + virtual typedef @\color{darkyellow}{value}@ = 0; + virtual void set_value(value v) = 0; + ... +}; + +template <typename T> +class @\blueArrayIterator@ : public @\blueIterator@ +{ +public: + virtual typedef T value; + virtual void set_value(value v) + { + this->v_ = v; + } + ... +}; +\end{lstlisting} +% +\columnbreak +% +\begin{lstlisting}[escapechar=@] +@\color{red}{/* this slide is NOT valid C++ */}@ + +void fill(@\blueIterator@& it, @\blueIterator@::@\color{darkyellow}{value}@ v) +{ + it.init(); + while (it.is_valid()) + it.set_value(v); +} +\end{lstlisting} +% +\end{multicols} + +\end{frame} + + + +%------------------------------------------------------------ +\subsection{Static OO Hierarchy with Virtual Types (\scoop~1)} + + + +%........................................................................ +\begin{frame} + \frametitle{Migration towards \scoop: Static Hierarchy} + +\vspace*{-7mm} + \begin{center} + \includegraphics[scale=.55]{vt1} + \end{center} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{\scoop Static Hierarchy (1/3)} + + \begin{block}{Rule} + An abstract class takes exactly one parameter: \textbf{Exact}. + \end{block} + + \medskip + + \begin{itemize} + % + \item this parameter holds its exact type\\ + ~~~ {\scriptsize $\leadsto$ ~ e.g., when an object is a \textbf{rabbit}, it is an \textbf{Animal$<$rabbit$>$} } + % + \smallskip + % + \item an abstract class does not need any extra parameter\\ + ~~~ {\scriptsize $\leadsto$ ~ understand that everything can be known/fetched from \textbf{Exact}! }\\ + ~~~ {\scriptsize $\leadsto$ ~ \textbf{Iterator} does NOT need \textbf{T} as a parameter }\\ + ~~~ {\scriptsize $\leadsto$ ~ and we do not want to guess what else \textbf{Iterator} could need } + % + \smallskip + % + \item a concrete class sets the parameter of its abstract super class + \end{itemize} + +\end{frame} + + + + + +%........................................................................ +\begin{frame} + \frametitle{\scoop Static Hierarchy (2/3)} + + + \begin{block}{Rule} + Methods in \scoop slightly differ from their classical writing. + \end{block} + + \medskip + + \begin{itemize} + \item an abstract method is now \textit{pseudo}-abstract\\ + ~~~ {\scriptsize $\leadsto$ ~ there is no ``\textbf{virtual ... = 0}'' }\\ + ~~~ {\scriptsize $\leadsto$ ~ there is some code: } + % + \smallskip + % + \item the dispatch mechanism is hand-written + % + \smallskip + % + \item the names of actual concrete methods are prefixed by \textbf{impl\_}\\ + ~~~ {\scriptsize $\leadsto$ ~ first for disambiguation purpose } \\ + ~~~ {\scriptsize $\leadsto$ ~ second to allow ``class extension from the top'' (see later) } + \end{itemize} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{\scoop Static Hierarchy (3/3)} + + \begin{block}{Rule} + The upper most abstract class derives from \textbf{Any}. + \end{block} + + \medskip + + \begin{itemize} + % + \item so some equipment is inherited\\ + ~~~ {\scriptsize $\leadsto$ ~ for instance the \textbf{exact()} downcast method } + % + \smallskip + % + \item {\color{red}{warning:}} + \begin{itemize} + \item this is only ``\scoop~1'' stuff + \item i.e., turn a ``classical'' OO hierarchy into the static world + \item we will see more elaborate design later... + \end{itemize} + % + \end{itemize} + +\end{frame} + + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{\scoop Virtual Type (1/3)} + + First realize that we want something like: + +\medskip + +\hspace*{0.1\textwidth} +\begin{minipage}{0.8\textwidth} +\begin{lstlisting}[basicstyle={\tiny\sffamily}] +template <typename Exact> +struct Iterator +{ + typedef typename Exact::value value; + /* + * so 'value' can be used in: + * void set_value(value v) { ... } + */ +}; + +template <typename T> +struct array_iterator : Iterator< array_iterator<T> > +{ + typedef T value; +}; +\end{lstlisting} +\end{minipage} + +\medskip + +except that this code does not compile...\\ +{\small (both classes are in mutual recursion at compile-time)} +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Migration towards \scoop (continued)} + +%\vspace*{-5mm} +\hspace*{-5mm} +\includegraphics[scale=.55]{vt2} + +\end{frame} + + + + + +%........................................................................ +\begin{frame} + \frametitle{\scoop Virtual Type (2/3)} + + \begin{block}{Rule} + Split virtual type declarations/definitions from classes. + \end{block} + + \medskip + + \begin{itemize} + % + \item the \textbf{vtype} structure is specialized for each client class\\ + ~~~ {\scriptsize $\leadsto$ ~ it holds declarations and definitions of virtual types }\\ + ~~~ {\scriptsize $\leadsto$ ~ a declaration is performed with \textbf{stc::abstract} }\\ + ~~~ {\scriptsize $\leadsto$ ~ definitions can be overridden through inheritance } + % + \smallskip + % + \item client classes have to ``import'' virtual types\\ + ~~~ {\scriptsize $\leadsto$ ~ with \textbf{stc\_typename} when a virtual type is declared {\tiny(or defined for the 1st time)} }\\ + ~~~ {\scriptsize $\leadsto$ ~ with \textbf{stc\_using} to use a virtual type in a sub-class {\tiny(when already in a super one)} } + % + \end{itemize} + +\end{frame} + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{\scoop Virtual Type (3/3)} + + \begin{block}{Rule} + From a client point of view, associated types are already solved. + \end{block} + + \medskip + + \begin{itemize} + % + \item use the classical access syntax \\ + ~~~ {\scriptsize $\leadsto$ ~ either \textbf{Iterator$<$I$>$::value} or \textbf{I::value} } + % + \smallskip + % + \item to make sure a definition is not overridden use \textbf{stc::final$<$..$>$} \\ + ~~~ {\scriptsize $\leadsto$ ~ Cf. the upcoming sample code } + % + \smallskip + % + \item ...\\ + ~~~ {\scriptsize $\leadsto$ ~ actually we do not really have ``actual'' virtual types (but who cares?) } + \end{itemize} + +\end{frame} + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Nothing But Code (1/3)} + +% +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +#include <stc/scoop.hh> + +namespace abc +{ + @\color{mediumblue}{stc\_equip\_namespace}@; + @\color{mediumblue}{stc\_decl\_associated\_type}@(value); + + +# define templ@~~~~~~~~@template <typename Exact> +# define classname@~~@Iterator +# define @\color{mediumpink}{current}~~~~~~\color{red}{Iterator$<$Exact$>$}@ +# define @\color{mediumpink}{super}~~~~~~~~@stc::any<Exact> + + @\color{mediumblue}{stc\_Header}@; + typedef stc::abstract value; + @\color{mediumblue}{stc\_End}@; + + template <typename Exact> + struct Iterator : public super + { + @\color{mediumblue}{stc\_typename}@(value); + void next()@~~~~~~~~~~~~~~~~~~~@{ this->exact().impl_next(); } + bool is_valid() const@~~~~~~~~@{ return this->exact().impl_is_valid(); } + void set(const value& v)@~~@{ this->exact().impl_set(v); } + }; + +} // end of namespace abc +\end{lstlisting} +% + +\end{frame} + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Nothing But Code (1/3) --- Desugared Version} + +% +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +#include <stc/scoop.hh> + +namespace abc +{ + @\color{mediumblue}{stc\_equip\_namespace}@; + @\color{mediumblue}{stc\_decl\_associated\_type}@(value); + + + template <typename Exact> struct Iterator; // fwd decl + + template <typename Exact> @\hspace*{4cm} \color{mediumgreen}{SUGAR-FREE VERSION!}@ + struct vtypes< @\color{red}{Iterator$<$Exact$>$}@ > + { + typedef stc::any<Exact> @\color{mediumpink}{super\_type}@; + typedef stc::abstract value; + }; + + template <typename Exact> + struct Iterator : public stc::any<Exact> + { + typedef @\color{mediumblue}{stc\_type}@(Exact, value) value; + void next()@~~~~~~~~~~~~~~~~~~~@{ this->exact().impl_next(); } + bool is_valid() const@~~~~~~~~@{ return this->exact().impl_is_valid(); } + void set(const value& v)@~~@{ this->exact().impl_set(v); } + }; + +} // end of namespace abc +\end{lstlisting} +% + +\end{frame} + + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Nothing But Code (2/3)} + +% +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +namespace abc +{ +# define templ@~~~~~~~~@template <typename T> +# define classname@~~@array_iterator +# define @\color{mediumpink}{current}~~~~~~\color{red}{array\_iterator$<$T$>$}@ +# define @\color{mediumpink}{super}~~~~~~~~@Iterator< current > + + @\color{mediumblue}{stc\_Header}@; + typedef stc::final<T> value; + @\color{mediumblue}{stc\_End}@; + + template <typename T> + class array_iterator : public super + { + public: + @\color{mediumblue}{stc\_using}@(value); + void impl_next()@~~~~~~~~~~~~~~~~~~~@{ i_ = i_ + 1; } + bool impl_is_valid() const@~~~~~~~~@{ return i_ >= 0 and i_ < n_; } + void impl_set(const value& v)@~~@{ v_ = v; } + array_iterator(int n)@~~~~~~~~~~~~~~~@: i_(0), n_(n) {} + protected: + int i_, n_; + value v_; + }; + +} // end of namespace abc +\end{lstlisting} +% + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Nothing But Code (2/3) --- Desugared Version} + +% +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +namespace abc +{ + template <typename T> array_iterator; // fwd decl + + template <typename T> + struct vtypes< @\color{red}{array\_iterator$<$T$>$}@ > + { + typedef Iterator< array_iterator<T> > @\color{mediumpink}{super\_type}@; + typedef stc::final<T> value; + }; @\hspace*{6.7cm} \color{mediumgreen}{SUGAR-FREE VERSION!}@ + + template <typename T> + class array_iterator : public Iterator< array_iterator<T> > + { + public: + typedef typename Iterator< array_iterator<T> >::value value; + void impl_next()@~~~~~~~~~~~~~~~~~~~@{ i_ = i_ + 1; } + bool impl_is_valid() const@~~~~~~~~@{ return i_ >= 0 and i_ < n_; } + void impl_set(const value& v)@~~@{ v_ = v; } + array_iterator(int n)@~~~~~~~~~~~~~~~@: i_(0), n_(n) {} + protected: + int i_, n_; + value v_; + }; + +} // end of namespace abc +\end{lstlisting} +% + +\end{frame} + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Nothing But Code (3/3)} + +% +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +namespace abc +{ + // \color{red}{algorithm} + + template <typename @\greenI@> + void fill(@\blueIterator@<@\greenI@>& it,@~~@typename @\greenI@::@\color{darkyellow}{value}@ v) + { + it.init(); + while (it.is_valid()) + it.set_value(v); + } + +} // end of namespace abc + + +// \color{red}{main} + +int main() +{ + abc::array_iterator<int> i(7); + abc::algo(i, 51); +} + +\end{lstlisting} +% + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Going Further with \scoop 1} + +% + {\small A static {C++} object-oriented programming ({SCOOP}) + paradigm mixing benefits of traditional {OOP} and generic + programming. + } +% + {\scriptsize Nicolas Burrus, Alexandre Duret-Lutz, Thierry G\'eraud, + David Lesage, and Rapha\"el Poss. \textit{In the Proceedings of + the Workshop on Multiple Paradigm with Object-Oriented Languages + (MPOOL), 2003.} } +% + + \medskip + +% + {\scriptsize + \color{blue}{ + \url{http://www.lrde.epita.fr/people/theo/papers/geraud.03.mpool.pdf} + } + } +% + +\end{frame} + + + + + +%------------------------------------------------------------ +\subsection{Some Limitations of OO Designs} + + + +%........................................................................ +\begin{frame} + \frametitle{Generic Type Functions} + + +\begin{block}{} + We know how to write static hierarchies with virtual types +\end{block} + +% +\bigskip +% + +Yet... + +% +\bigskip +% + +\begin{block}{new objective:} + we want to define some types that behave like generic functions +\end{block} + +% +\bigskip +\bigskip +% + +For instance, something like the {\scriptsize{\textbf{boost::reverse\_iterator$<$OtherIterator$>$}}} \\ +{\scriptsize \color{blue}{ \url{http://www.boost.org/libs/iterator/doc/reverse_iterator.html} } } + + + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Example (1/3)} + + +For instance, with \bfI being any iterator type, we want a +generic iterator class, \bfreverseI: + +% +\bigskip +% + +\begin{itemize} +\item to be defined once and for all + \smallskip + % +\item which inverts the behavior of \bfnext and/or \bfprev + \smallskip + % +\item \textit{and} which keeps the other features of \bfI +\end{itemize} + +% +\bigskip +% + +Note that \textbf{reverse} is just like a function of \bfI + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Example (2/3)} + +This class: +\smallskip +% + +\begin{itemize} +\item should provide \bfnext iff \bfI provides \bfprev\\ + ~~~ {\scriptsize $\leadsto$ ~ we do not want any pollution by ``ghost'' methods } +\end{itemize} + +% +\bigskip +% + +so the snippet below is \textit{not} acceptable: + +\smallskip + +\begin{multicols}{2} +% +\begin{lstlisting}[basicstyle={\tiny\sffamily}] +template <typename I> +class reverse ... +{ +public: + void prev() { iter.next(); } + next next() { iter.prev(); } + ... +protected; + I iter; +}; +\end{lstlisting} +% +\columnbreak +% +because this class interface offers some features that might be +undesirable +% +\end{multicols} + +% +\bigskip +% + +{\tiny + consequently the client gets inappropriate error messages (try for instance + boost::reverse\_iterator with \_\_gnu\_cxx::slist and operator--). +} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Example (3/3)} + + +This class: +\smallskip +% + +\begin{itemize} +\item should also provide every upcoming methods\\ + ~~~ {\scriptsize $\leadsto$ ~ i.e., methods that will be added in + some new concepts that \bfI will model } +\end{itemize} + +% +\bigskip +% + +FIXME: illustration... + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Some More Examples} + +Then imagine: +\smallskip +% + +\begin{itemize} +\item \textbf{say\_hello$<$I$>$} that says hello when \textbf{init} is called +\smallskip +% +\item \textbf{skippy$<$I$>$} that skips $n$ elements when iterating... +\smallskip +% +\item \textbf{log$<$I, L$>$} that logs every method calls (with a + given log policy of type \textbf{L}) +\smallskip +% +\item \textbf{only\_if$<$I, P$>$} that behave like its container only has + elements which satisfies a given predicate (of type \textbf{P}) \smallskip +% +% +\item \textbf{paired$<$I$>$} that FIXME: explain +% +\item FIXME: ... +% +\end{itemize} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Intrinsically an OO Problem (1/3)} + + +\hspace*{-5mm} +\begin{minipage}{0.72\textwidth} + \includegraphics[scale=.55]{simpledeco} +\end{minipage} +\begin{minipage}{0.28\textwidth} + That works fine here! + \begin{itemize} + {\scriptsize + \item a \textit{single} actual abstraction (Iterator) + \item the decorator class factors code for the identity behavior + \item the hello\_iterator class is almost empty + \item it just does its job + } + \end{itemize} +\end{minipage} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Intrinsically an OO Problem (2/3)} + +\hspace*{-7mm} +\includegraphics[scale=.55]{harddeco} + +\smallskip + +{\scriptsize +Without duplicating code, how to + \begin{itemize} + \item make the \bfprev and/or \bfnext methods appear in \bfhelloiterator \\ + when they seem required? + \item and plug this class to the relevant abstraction,\\ + either \bfBackwardIterator or \bfForwardIterator? +\end{itemize} +} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Intrinsically an OO Problem (3/3)} + +We want to express that: +\smallskip +% + +\begin{itemize} +\item \bfhelloiterator transforms any \bfIterator class +\smallskip +% + +\item the behavior of \bfhelloiterator mainly is the identity +\smallskip +% + +\item the only method modified w.r.t. the ones of \bfI is \textbf{init} +\smallskip +% + +\item \bfhelloiteratorI derives from the same + abstractions then \bfI \smallskip +% +\end{itemize} + +% +\bigskip +% + +that does \textit{not} sound like something easily feasible with non-dynamic OO languages... + +\end{frame} + + + +%%% Local Variables: +%%% mode: latex +%%% eval: (ispell-change-dictionary "american") +%%% TeX-master: "slides" +%%% End: Index: doc/latex/paradigm/myhyperref.sty =================================================================== --- doc/latex/paradigm/myhyperref.sty (révision 0) +++ doc/latex/paradigm/myhyperref.sty (révision 0) @@ -0,0 +1,48 @@ +\NeedsTeXFormat{LaTeX2e} +\RequirePackage[english]{babel} + +%% Hyperref should always be included last. +%% In particular, do not load float.sty or listing.sty after it. +%% Don't include it if we are using entcs, since it loads it with a +%% different set of options. +\RequirePackage{hyperref} +\makeatletter +\@ifclassloaded{entcs}{} +{ + \hypersetup{bookmarks, bookmarksnumbered, bookmarksopen, + colorlinks, + citecolor=blue, linkcolor=blue, urlcolor=blue, + plainpages=false} +} +\makeatother + +\newcommand{\lemmaautorefname}{lemma} +\newcommand{\definitionautorefname}{definition} +\newcommand{\algorithmautorefname}{algorithm} +\newcommand{\chapterautorefname}{chapter} +\newcommand{\sectionautorefname}{section} +\newcommand{\subsectionautorefname}{subsection} +\newcommand{\subsubsectionautorefname}{subsubsection} +\newcommand{\theoremautorefname}{theorem} + +%% Thanks to Micha and Thomas Hérault. +\newcommand{\defautorefname}[3]{% + \expandafter\renewcommand\csname #1autorefname\endcsname{% + \iflanguage{french}{#3}{#2}% + }% +} + +\defautorefname{algorithm} {algorithm} {algorithme} +\defautorefname{chapter} {Chapter} {chapitre} +\defautorefname{definition}{definition}{définition} +\defautorefname{lemma} {lemma} {lemme} +\defautorefname{section} {Section} {Section} +\defautorefname{subsection}{Section} {Section} +\defautorefname{subsubsection}{Section} {Section} +\defautorefname{theorem} {theorem} {théorème} + +%\AtBeginDocument{ +%\makeatletter +% \hypersetup{pdftitle=\@title,pdfauthor=\@author} +%\makeatother +%} Index: doc/latex/paradigm/atour.tex =================================================================== --- doc/latex/paradigm/atour.tex (révision 0) +++ doc/latex/paradigm/atour.tex (révision 0) @@ -0,0 +1,626 @@ + +%============================================================ +\section{A Tour of Several Paradigms} + +%........................................................................ +\begin{frame} + \frametitle{Intents} + + FIXME: context + get the best of both OOP and GP. + +\end{frame} + + + +%------------------------------------------------------------ +\subsection{Classical OOP} + + +%........................................................................ +\begin{frame} + \frametitle{Classical Object-Oriented Programming} + + \begin{itemize} + % + \item we design class hierarchies + \begin{itemize} + \item class inheritance translates the \textit{is-a} relationship + \item a concrete class usually derives from an abstract class + \end{itemize} + \smallskip + % + \item an abstract class + \begin{itemize} + \item maps an \textit{abstraction} + \item describes an \textit{interface} + \end{itemize} + \smallskip + % + \item a concrete class + \begin{itemize} + \item is a realization of its immediate abstraction + \item implements its interface and those inherited + \end{itemize} + % + \end{itemize} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Simple Class Hierarchy + Algorithm} + +\begin{multicols}{2} +% + \begin{center} + \includegraphics[scale=.7]{simpleoo} + \end{center} +% +\columnbreak +% +{\scriptsize +\begin{algorithm}{count}{it : Iterator} + counter : \tunsigned \= 0 \\ + it.init() \\ + \begin{WHILE}{it.is\_valid()} + \tab counter \= counter + 1 \\ + \tab it.next() + \end{WHILE} \\ + \RETURN counter +\end{algorithm} +} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Translation into C++ OOP} + + +\begin{multicols}{2} +% +\begin{lstlisting}[escapechar=@] +class @\blueIterator@ +{ +public: + virtual void init() = 0; + virtual void next() = 0; + virtual bool is_valid() const = 0; + virtual ~Iterator() {} +}; + +template <typename T> +class @\color{mediumblue}{array\_iterator}@ : public @\blueIterator@ +{ +public: + virtual void init() { ... } + virtual void next() { ... } + virtual bool is_valid() const { ... } + ... +}; +\end{lstlisting} +% +\columnbreak +% +\begin{lstlisting}[escapechar=@] +unsigned count(@\blueIterator@& it) +{ + unsigned counter = 0; + it.init(); + while (it.is_valid()) { + counter = counter + 1; + it.next(); + } + return counter; +} +\end{lstlisting} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Conclusion About C++ OOP} + + +\begin{block}{C++ OOP in a Nutshell} + \begin{itemize} + \item[\bplus] Abstract classes \\ + ~~~ {\tiny{$\leadsto$ ~ abstractions clearly appear in programs and allow for overloading of algorithms}} + \item[\bplus] The OO Polymorphism \\ + ~~~ {\tiny{$\leadsto$ ~ method dispatch is a very convenient and straightforward tool}} + \item[\bminus] Poor efficiency \\ + ~~~ {\tiny{$\leadsto$ ~ ``virtual'' methods are penalizing when involved in intensive computation}} + \item[\bminus] No support for covariance and virtual types \\ + ~~~ {\tiny{$\leadsto$ ~ see later}} + \end{itemize} +\end{block} + +\end{frame} + + + + +%------------------------------------------------------------ +\subsection{Classical Generic Programming (GP)} + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Documentation and Implementation} + +\begin{multicols}{2} +% + \begin{center} + \includegraphics[scale=.7]{simplegp} + \end{center} +% +\columnbreak +% +{\scriptsize +\begin{itemize} +\item in code: + \begin{itemize} + \item no actual abstract classes + \item only implementation classes + \end{itemize} + \smallskip +\item limited OOP: + \begin{itemize} + \item abstractions only appear in documentation + \item inheritance is just a factoring tool + \end{itemize} +\end{itemize} +} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Translation into C++ Generic Programming} + +\begin{multicols}{2} +% +\begin{lstlisting}[escapechar=@] +/* documentation: + * + * Iterator + * { + * void init(); + * void next(); + * bool is_valid() const; + * }; + */ + +template <typename T> +class array_iterator +{ +public: + void init() { ... } + void next() { ... } + bool is_valid() const { ... } + ... +}; +\end{lstlisting} +% +\columnbreak +% +\begin{lstlisting}[escapechar=@] +template <typename @\greenI@> +unsigned count(@\greenI@& it) +{ + unsigned counter = 0; + it.init(); + while (it.is_valid()) { + counter = counter + 1; + it.next(); + } + return counter; +} +\end{lstlisting} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Conclusion About C++ GP} + +\begin{block}{C++ GP in a Nutshell} + \begin{itemize} + \item[\bplus] Efficiency \\ + ~~~ {\tiny{$\leadsto$ ~ algorithms do not pay the cost of abstractions}} + \item[\bminus] Implicit abstractions \\ + ~~~ {\tiny{$\leadsto$ ~ abstractions are not mapped into code so program expressiveness is limited}} + \item[\bminus] No support for constrained genericity \\ + ~~~ {\tiny{$\leadsto$ ~ being able to overload generic algorithms is not trivial}} + \item[\bminus] Factoring code using inheritance is usually hard \\ + ~~~ {\tiny{$\leadsto$ ~ postponing definitions to sub-classes and + overriding do not work well without the 'virtual' + keyword}} + \end{itemize} +\end{block} + +\end{frame} + + + + +%------------------------------------------------------------ +\subsection{Generic Programming Evolution with C++0x} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Concepts and Implementation} + +\begin{multicols}{2} +% + \begin{center} + \includegraphics[scale=.7]{simple0x} + \end{center} +% +\columnbreak +% +{\scriptsize +\begin{itemize} +\item in code: + \begin{itemize} + \item concepts + implementation classes + \item no need of setting explicit relations between them + % concepts and classes + \end{itemize} + \smallskip +\item consequences: + \begin{itemize} + \item stronger type-checking than in GP + \item great decoupling between concepts and classes + \item inheritance remains a factoring tool + \end{itemize} +\end{itemize} +} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Translation into C++0x} + +\begin{multicols}{2} +% +\begin{lstlisting}[escapechar=@] +auto concept @\blueIterator@ <typename @\greenI@> +{ + void I::init(); + void I::next(); + bool I::is_valid() const; +}; + +template <typename T> +class array_iterator +{ +public: + void init() { ... } + void next() { ... } + bool is_valid() const { ... } + ... +}; +\end{lstlisting} +% +\columnbreak +% +\begin{lstlisting}[escapechar=@] +template <typename @\greenI@> +where @\blueIterator@<@\greenI@> +unsigned count(@\greenI@& it) +{ + unsigned counter = 0; + it.init(); + while (it.is_valid()) { + counter = counter + 1; + it.next(); + } + return counter; +} +\end{lstlisting} +% +\end{multicols} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Conclusion About C++0x} + +\begin{block}{C++0x in a Nutshell} + \begin{itemize} + \item[\bplus] Efficiency, expressiveness, and type safety \\ + ~~~ {\tiny{$\leadsto$ ~ most drawbacks of OOP and GPP disappear!}} + \item[\bminus] Not really OO \\ + ~~~ {\tiny{$\leadsto$ ~ like with GP we cannot take advantage of many designs related to ``classical'' inheritance}} + \item[\bminus] Not yet part of the C++ standard \\ + ~~~ {\tiny{$\leadsto$ ~ so is there something to do now but waiting?}} + \end{itemize} +\end{block} + +\end{frame} + + + + +%------------------------------------------------------------ +\subsection{Mixing OOP and GP} + + + +%........................................................................ +\begin{frame} + \frametitle{Combining Inheritance and Genericity} + +\begin{multicols}{2} +% + \begin{center} + \includegraphics[scale=.7]{simplescoop1} + \end{center} +% +\columnbreak +% +\vspace*{.2\textheight} +\begin{itemize} +\item close to OOP + \begin{itemize} + \item we have class hierarchies + \item but method lookup is solved at compile-time! + \end{itemize} +\item close to GP + \begin{itemize} + \item algorithms are fast + \item but their signatures are as strong as in C++0x! + \end{itemize} +\end{itemize} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Translation into \scoop 1} + +\begin{multicols}{2} +% +\begin{lstlisting}[escapechar=@] +template <typename @\greenI@> +class @\blueIterator@ : public @\color{darkgray}{Any}@<I> +{ +public: + void init() { this->@\color{darkgray}{exact()}@.impl_init(); } + void next() { /* likewise */ } + bool is_valid() const { /* likewise */ } +}; + + + +template <typename T> +class @\blueArrayIterator@ : public @\blueIterator@< array_iterator<T> > +{ +public: + void impl_init() { ... } + void impl_next() { ... } + bool impl_is_valid() const { ... } + ... +}; +\end{lstlisting} +% +\columnbreak +% +\begin{lstlisting}[escapechar=@] +template <typename @\greenI@> +unsigned count(@\blueIterator@<@\greenI@>& it) +{ + unsigned counter = 0; + it.init(); + while (it.is_valid()) { + counter = counter + 1; + it.next(); + } + return counter; +} +\end{lstlisting} +% +\end{multicols} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Conclusion About \scoop~1} + +\begin{block}{\scoop~1 in a Nutshell} + \begin{itemize} + \item[\bplus] Efficiency, expressiveness, and type safety \\ + ~~~ {\tiny{$\leadsto$ ~ most drawbacks of OOP and GPP disappear!}} + \item[\bplus] Really OO \\ + ~~~ {\tiny{$\leadsto$ ~ a mix between OOP and GP}} + \item[\bminus] Not so trivial C++ \\ + ~~~ {\tiny{$\leadsto$ ~ yet not so difficult neither!}} + \item[\bminus] Explicit inheritance \\ + ~~~ {\tiny{$\leadsto$ ~ just like in OOP...}} + \end{itemize} +\end{block} + +\end{frame} + + + + +%------------------------------------------------------------ +\subsection{Recap + Comparison} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Abstraction and Algorithm} + +\hspace*{-3mm} +\begin{tabular}{|c|p{.45\textwidth}|p{.4\textwidth}|} +% +\hline +% +{\small OOP} +& +\begin{minipage}{.9\textwidth} +\begin{lstlisting}[escapechar=@] +class @\blueIterator@ +{ ... }; +\end{lstlisting} +\end{minipage} +& +\begin{minipage}{.9\textwidth} +\begin{lstlisting}[escapechar=@] +unsigned count(@\blueIterator@& it); +\end{lstlisting} +\end{minipage} +\\ +% +\hline +% +{\small GP} +& +\begin{minipage}{.9\textwidth} +\begin{lstlisting}[escapechar=@] +/* documentation: Iterator + ... */ +\end{lstlisting} +\end{minipage} +& +\begin{minipage}{.9\textwidth} +\begin{lstlisting}[escapechar=@] +template <typename @\greenI@> +unsigned count(@\greenI@& it); +\end{lstlisting} +\end{minipage} +\\ +% +\hline +% +{\small C++0x} +& +\begin{minipage}{.9\textwidth} +\begin{lstlisting}[escapechar=@] +auto concept @\blueIterator@ <typename @\greenI@> +{ ... }; +\end{lstlisting} +\end{minipage} +& +\begin{minipage}{.9\textwidth} +\begin{lstlisting}[escapechar=@] +template <typename @\greenI@> +where @\blueIterator@<@\greenI@> +unsigned count(@\greenI@& it); +\end{lstlisting} +\end{minipage} +% template <@\blueIterator@ @\greenI@> +\\ +% +\hline +% +{\small \scoop} +& +\begin{minipage}{.9\textwidth} +\begin{lstlisting}[escapechar=@] +template <typename @\greenI@> +class @\blueIterator@ : public @\color{darkgray}{Any}@<I> +{ ... } +\end{lstlisting} +\end{minipage} +& +\begin{minipage}{.9\textwidth} +\begin{lstlisting}[escapechar=@] +template <typename @\greenI@> +unsigned count(@\blueIterator@<@\greenI@>& it); +\end{lstlisting} +\end{minipage} +\\ +% +\hline +% +\end{tabular} + + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Paradigms At a Glance} + +\newcommand{\badweak}{\color{red}{weak}} +\newcommand{\badexplicit}{\color{red}{explicit}} +\newcommand{\badno}{\color{red}{no}} +\newcommand{\badpoor}{\color{red}{poor}} + +\newcommand{\yestrong}{\color{darkgreen}{strong}} +\newcommand{\yeimplicit}{\color{darkgreen}{implicit}} +\newcommand{\yeyes}{\color{darkgreen}{yes}} +\newcommand{\yegreat}{\color{darkgreen}{great}} + +\newcommand{\ftypetotype}{{\scriptsize{$f: \mathit{type} \rightarrow \mathit{type}$}}} + +\hspace*{-5mm} +\begin{tabular}{|c||c|c|c|c|c|} +\hline + & OOP & GP & C++0x & \scoop & \scoop 2 \\ +\hline +\hline +2003 C++ & \yeyes & \yeyes & \badno & \yeyes & \yeyes \\ +inheritance & ok & \badpoor & \badpoor & \yegreat & \yegreat \\ +abstraction & {\bf class} & \textsc{rtfm} & {\bf concept} & {\bf class} & {\bf struct} \\ +relation & \badexplicit & \yeimplicit & \yeimplicit & \badexplicit & quasi-\yeimplicit \\ +signature & \yestrong & \badweak & \yestrong & \yestrong & \yestrong \\ +efficiency & \badpoor & \yegreat & \yegreat & \yegreat & \yegreat \\ +\hline +\hline +\ftypetotype& \badno & \badno & \badno & \badno & \yeyes \\ +\hline +\end{tabular} + +\end{frame} + + +%%% Local Variables: +%%% mode: latex +%%% eval: (ispell-change-dictionary "american") +%%% TeX-master: "slides" +%%% End: Index: doc/latex/paradigm/numberslides.sty =================================================================== --- doc/latex/paradigm/numberslides.sty (révision 0) +++ doc/latex/paradigm/numberslides.sty (révision 0) @@ -0,0 +1,17 @@ +% Put the page number too. +\defbeamertemplate*{footline}{infolines theme with institution} +{ + \leavevmode% + \hbox{% + \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1.125ex,center]{author in head/foot}% + \usebeamerfont{author in head/foot}\insertshortauthor~~(\insertshortinstitute) + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1.125ex,center]{title in head/foot}% + \usebeamerfont{title in head/foot}\insertshorttitle + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1.125ex,right]{date in head/foot}% + \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em} + \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} + \end{beamercolorbox}}% + \vskip0pt% +} Index: doc/latex/paradigm/newalg.sty =================================================================== --- doc/latex/paradigm/newalg.sty (révision 0) +++ doc/latex/paradigm/newalg.sty (révision 0) @@ -0,0 +1,152 @@ +%% +%% This is file `newalg.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% newalg.dtx (with options: `package') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from newalg.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file newalg.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +\NeedsTeXFormat{LaTeX2e}[1994/06/01] +\ProvidesPackage{newalg}[1994/12/15 Format code algorithms nicely] + +\newbox\algstack +\newbox\algtab +\newcount\algline +\newtoks\alga +\newtoks\algb + +\newif\ifalgisenv + +\def\alglpsh#1\to#2{\alga={#1\\}\algb=\expandafter{#2} + \global\edef#2{\the\alga\the\algb}} +\def\alglpop#1\to#2{\ifx\empty#1\def#2{} + \else\global\expandafter\algllop#1\algllop#1#2\fi} +\def\algllop#1\\#2\algllop#3#4{\def#3{#2}\def#4{#1}} +\def\algltop#1\to#2{\ifx\empty#1\def\#2{}\else + \expandafter\alglttop#1\alglttop#2\fi} +\def\alglttop#1\\#2\alglttop#3{\def#3{#1}} +\def\algckenv#1{\algltop\alglenv\to\algenv + \def\algarg{#1} + \ifx \algarg\algenv \algisenvtrue \else \algisenvfalse \fi} + +\def\algsol{\global\advance\algline by 1 + \the\algline&\hbox\bgroup\copy\algtab$\ignorespaces} +\def\algeol{$\egroup\cr\algsol} +\def\algpush{\global\setbox\algstack\hbox{\unhbox\algstack\box\algtab}} +\def\algpop{\global\setbox\algstack\hbox{\unhbox\algstack + \global\setbox\algtab\lastbox}} +\def\algset{$\egroup\setbox0=\lastbox\algpush + \global\setbox\algtab\hbox to \wd0{}\hbox\bgroup\unhbox0$} +\def\algorithm#1#2{\bgroup + \let\\=\algeol + \let\==\leftarrow + \let\IF=\algIF + \let\RETURN=\algRETURN + \let\ELSE=\algELSE + \let\endIF=\endalgIF + \let\ERROR=\algERROR + \let\NIL=\algNIL + \let\WHILE=\algWHILE + \let\endWHILE=\endalgWHILE + \let\FOR=\algFOR + \let\endFOR=\endalgFOR + \let\CALL=\algCALL + \let\text=\algtext + \let\TO=\algTO + \let\EACH=\algEACH + \let\SWITCH=\algSWITCH + \let\item=\algitem + \let\endSWITCH=\endalgSWITCH + \let\DEFAULT=\algDEFAULT + \let\REPEAT=\algREPEAT + \let\UNTIL=\endalgREPEAT + \let\endREPEAT=\UNTIL + \let\IN=\algIN + \let\begin=\algbegin + \let\end=\algend + \let\endalgorithm=\algalmostend + \global\setbox\algtab\null + \global\setbox\algstack\null + \global\algline=0 + \def\alglenv{algorithm\\} + \halign\bgroup\space\hfill##&\quad##\hss \cr + \omit\CALL{#1}$(#2)$\span\omit\hfill \cr + \algsol} +\def\algalmostend{$\egroup\cr\egroup\egroup\strut\end{algorithm}} +\def\algkey#1{\mbox{\bf #1\ }} +\def\algIF#1{\algkey{if}\algset#1 \\ + \algkey{then}\algset} +\def\algELSE{\algckenv{IF} + \ifalgisenv + \algpop \\ + {\setbox0\hbox{\algkey{then}} + \hbox to \wd0{\algkey{else}\hfill}} + \algset + \else + \PackageError{newalg} + {\string\ELSE\space is only allowed in the IF environment} + {You have an \protect\ELSE\space command without a \string\begin{IF}} + \fi} +\def\endalgIF{\algpop\algpop} +\def\algERROR#1{\algkey{error}\mbox{``#1''}} +\def\algRETURN{\algkey{return}} +\def\algconst#1{\mbox{\sc #1}} +\def\algNIL{\algconst{nil}} +\def\algWHILE#1{\algkey{while}#1 \\ + \indent\algset} +\def\endalgWHILE{\algpop} +\def\algCALL#1{\mbox{\sc #1}} +\def\algFOR#1{\algkey{for}#1 \\ + \indent\algset} +\def\endalgFOR{\algpop} +\def\algtext#1{\mbox{ #1 }} +\def\algTO{\algkey{ to}} +\def\algEACH{\algkey{ each}} +\def\algSWITCH{\algkey{switch}\algpush} +\def\algitem#1{\algckenv{SWITCH} + \ifalgisenv + \algpop \\ + \quad\algkey{case}\algset #1: + \else + \PackageError{newalg} + {\string\item\space can only be used in a SWITCH environment} + {You have an item that is not inside of the correct environment} + \fi} +\def\endalgSWITCH{\algpop} +\def\algDEFAULT{\algkey{default}} +\def\algREPEAT#1{ + \algkey{repeat}\algset\\} +\def\endalgREPEAT{\algpop \\ + \quad\algkey{until}} +\def\algIN{\algkey{ in}} +\def\algbegin#1{\alglpsh#1\to\alglenv + \csname #1\endcsname} +\def\algend#1{\alglpop\alglenv\to\algenv + \def\algarg{#1} + \ifx \algarg\algenv + \relax + \else + \PackageError{newalg} + {\string\begin{\algenv}\space ended by \string\end{\algarg}} + {We are confused. Try to return now} + \fi + \csname end#1\endcsname +} + +\endinput +%% +%% End of file `newalg.sty'. Index: doc/latex/paradigm/Makefile =================================================================== --- doc/latex/paradigm/Makefile (révision 0) +++ doc/latex/paradigm/Makefile (révision 0) @@ -0,0 +1,63 @@ +include share/make/share.mk +include share/make/tex.mk +TEXI2PDF_FLAGS += -I figures +include share/make/pdf-figs.mk + +# The article must be named using the last name of the first author +# plus the extension, according to the ICIP Paper Submision Kit. +BASE = scoop +PDF = slides.pdf + +.PHONY: final +final: $(BASE).pdf + +$(BASE).pdf: slides.pdf + cp $< $@ + +CLEANFILES += $(PDF) $(HTML) $(BASE).pdf + +all : pdf +pdf: $(PDF) + +DOCUMENT_IMAGES = \ + figures/design.fig \ + figures/simple0x.fig \ + figures/simplegp.fig \ + figures/simplescoop1.fig \ + figures/simpleoovt.fig \ + figures/simplevt.fig \ + figures/simpledeco.fig \ + figures/harddeco.fig \ + figures/vt1.fig \ + figures/vt2.fig \ + figures/corn.fig \ + figures/glance.fig \ + figures/zoomin.fig \ + figures/alt.fig \ + figures/evolution.fig \ + figures/selectors.fig \ + figures/harder0x.fig \ + figures/simpleoo.fig + +CLEANFILES += \ + figures/*~ \ + figures/*.eps + +# Dependencies. +# figures/times.pdf: figures/times-16bit.dat figures/times-float.dat + +# FIXME: Generate figures/h16b.pdf (and figures/h16b.ps) from +# figures/h16.dat.gz using grace/xmgrace. +#EXTRA_DIST = figures/h16.dat.gz figures/h16b.ps + +DOCUMENT_IMAGES_PDF = $(call share_convert_to_pdf,$(DOCUMENT_IMAGES)) + +debug: + @echo "DOCUMENT_IMAGES_PDF = $(DOCUMENT_IMAGES_PDF)" + +CLEANFILES += $(DOCUMENT_IMAGES_PDF) figures/*.{pdftex,pdftex_t} + +slides.pdf: $(DOCUMENT_IMAGES_PDF) + +view pdfview: pdf + xpdf $(PDF) Index: doc/latex/paradigm/sequel.tex =================================================================== --- doc/latex/paradigm/sequel.tex (révision 0) +++ doc/latex/paradigm/sequel.tex (révision 0) @@ -0,0 +1,1257 @@ +\section{A Sequel to \scoop} + + + +%------------------------------------------------------------ +\subsection{Thoughts about Concepts} + + + +%........................................................................ +\begin{frame} + \frametitle{A Concept-Oriented Design} + +\vspace*{-2mm} +Consider this C++0x design: + +\medskip + +\includegraphics[scale=.45]{harder0x} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Ruminations (1/3)} + +It is great because: + +\smallskip + + \begin{itemize} + \item we do not have to draw explicit relations between models and concepts\\ + ~~~ {\scriptsize $\leadsto$ ~ we define \bfarrayiteratorT as a stand-alone class }\\ + ~~~ {\scriptsize $\leadsto$ ~ we maintain a very low coupling between program entities } + % + \smallskip + % + \item some concepts are orthogonal\\ + ~~~ {\scriptsize $\leadsto$ ~ discriminants ``browsing'' and ``accessibility'' are unrelated } + \end{itemize} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Ruminations (2/3)} + +Yet: + +\smallskip + + \begin{itemize} + \item we are \textit{clearly} aware of \bfarrayiteratorT being an \textbf{Iterator} \\ + ~~~ {\scriptsize $\leadsto$ ~ many classes are \textit{explicitly} designed to model some domain concepts }\\ + % + \smallskip + % + \item this design is not so far from a ``classical'' OO design based on multiple inheritance \\ + ~~~ {\scriptsize $\leadsto$ ~ and we know how to turn hierarchies into the static world } + \end{itemize} + +\smallskip + +\begin{block}{Postulate} + Static hierarchies may be a way to get in 2003 ISO/ANSI C++ such a ``C++0x''-like design. +\end{block} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Ruminations (3/3)} + +Furthermore: + % + \smallskip + % + \begin{itemize} + \item when providing implementation classes (models) in C++0x, \\ + we may also want to factor some code through inheritance \\ + ~~~ {\scriptsize $\leadsto$ ~ so static hierarchies can be useful to implement models }\\ + ~~~ {\scriptsize $\leadsto$ ~ and having virtual types (resolved at compile-time) can help } + % + \smallskip + % + \item it is well-known that structural conformance is sometimes not so great \\ + ~~~ {\scriptsize $\leadsto$ ~ how can a concept express that addition is commutative? }\\ + ~~~ {\scriptsize $\leadsto$ ~ does a 3D point model the concept of 2D point? } + \end{itemize} + +\end{frame} + + + +%------------------------------------------------------------ +\subsection{Towards a Solution} + + +%........................................................................ +\begin{frame} + \frametitle{The Way We Think (1/3)} + +We want to implement \bfarrayiteratorT in classical OO: + +\bigskip + +\begin{enumerate} +{\scriptsize{ + +\item[] \textit{first step} +\smallskip +\item we know that \bfarrayiteratorT goes forward +\item the \bfForwardIterator {\color{red}{ abstract class}} is for iterators going forward +\item $\Rightarrow ~ $ we {\color{mediumgreen}explicitly} state that \bfarrayiteratorT derives from \bfForwardIterator + +\medskip +\item[] \textit{second step} +\smallskip + +\item \bfForwardIterator {\color{red}{ declares}} \bfnext +\item $\Rightarrow ~ $ we {\color{red}{define}} \bfnext in \bfarrayiteratorT + +}} +\end{enumerate} + +\bigskip + +OK... + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{The Way We Think (2/3)} + +We want to implement \bfarrayiteratorT in C++-0x: + +\bigskip + +\begin{enumerate} +{\scriptsize{ + +\item[] \textit{first step} +\smallskip +\item we know that \bfarrayiteratorT goes forward +\item the \bfForwardIterator {\color{red}{ concept}} is for iterators going forward +\item $\Rightarrow ~ $ \bfarrayiteratorT shall {\color{mediumgreen}{implicitly}} model \bfForwardIterator + +\medskip +\item[] \textit{second step} +\smallskip + +\item \bfForwardIterator {\color{red}{ requires}} \bfnext +\item $\Rightarrow ~ $ we {\color{red}{implement}} \bfnext in \bfarrayiteratorT + +}} +\end{enumerate} + +\bigskip + +finally that is not so different from classical OO! + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{The Way We Think (3/3)} + +now... + +\medskip + +what can we say about \bfhelloiteratorI? + +\medskip + +and about \bfreverseI? + +\bigskip\medskip + +let us try: + +\medskip + +\begin{enumerate} +{\scriptsize{ + +\item[] \textit{first step} +\smallskip +\item we know that \bfhelloiteratorI goes the same way of \bfI +\item and then we are stuck... +}} +\end{enumerate} + +\bigskip\medskip + +so we have to think different! + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Think Different (1/3)} + +Let us rewrite: +\medskip +% +\begin{itemize} +\scriptsize +\item we know that \bfarrayiteratorT goes forward +\item $\Rightarrow ~ $ we {\color{mediumgreen}explicitly} state that \bfarrayiteratorT derives from \bfForwardIterator +\item $\Rightarrow ~ $ we {\color{red}{define}} \bfnext in \bfarrayiteratorT +\end{itemize} + +% +\bigskip +% + +that way: +\medskip +% + +\begin{itemize} +\scriptsize +\item we {\color{mediumgreen}explicitly} state that \bfarrayiteratorT + \begin{itemize} \scriptsize + \item is an \bfIterator + \item goes forward + \end{itemize} +\item $\leadsto ~ $ \bfarrayiteratorT is {\color{mediumgreen}implicitly} a \bfForwardIterator +\item $\Rightarrow ~ $ we {\color{red}{define}} \bfnext in \bfarrayiteratorT +\end{itemize} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Think Different (2/3)} + +For \bfhelloiteratorI: +\medskip +% +\begin{itemize} +\scriptsize +\item we {\color{mediumgreen}explicitly} state that \bfhelloiteratorI + \begin{itemize} \scriptsize + \item is an \bfIterator + \item goes the same way than \bfI + \end{itemize} +\item $\leadsto ~ $ \bfhelloiteratorI is {\color{mediumgreen}implicitly} a \bfForwardIterator iff \bfI is a \bfForwardIterator +\item $\leadsto ~ $ \bfnext is {\color{mediumgreen}implicitly} defined in \bfarrayiteratorT in that case +\end{itemize} + +% +\bigskip +% + +more precisely: +\medskip +% +\begin{itemize} +\scriptsize +\item we {\color{mediumgreen}explicitly} state that \bfhelloiteratorI + \begin{itemize} \scriptsize + \item is an \bfIterator + \item behaves like \bfI + \end{itemize} +\item $\leadsto ~ $ we {\color{mediumgreen}implicitly} get from \bfI all we expect for \bfhelloiteratorI +\item $\Rightarrow ~ $ then we just have to {\color{red}{override}} \bfinit. +\end{itemize} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Think Different (3/3)} + +For \bfreverseI: +\medskip +% +\begin{itemize} +\scriptsize +\item we {\color{mediumgreen}explicitly} state that \bfreverseI + \begin{itemize} \scriptsize + \item behaves most of the time like \bfI + \item goes forward (resp. backward) iff \bfI goes backward (resp. forward) + \end{itemize} +\item $\Rightarrow ~ $ then we just have to {\color{red}{implement}} \bfprev and \bfnext in a {\color{mediumgreen}non-intrusive} way. +\end{itemize} + +% +\bigskip +% + +Now just realize that: +\medskip +% +\begin{itemize} +\scriptsize +\item \bfreverseI can even work when \bfI is \textit{not} an iterator +\item with \textit{non-intrusive} extensions this class can handle some different ``reverse something'' cases +\item the definition of the \bfreverseI class contains about \textit{nothing}! +\end{itemize} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Temporary Conclusion About OOP} + +\begin{block}{trouble with OOP} + some types cannot explicitly derive from \bfForwardIterator +\end{block} + +\bigskip +\bigskip + +indeed, some types cannot be explicitly plugged to abstract classes +because it depends on some other information + +\bigskip + +{\scriptsize for instance \bfreverseI might be an iterator... or not! + and if it is, it might be forward... or not! } + + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Temporary Conclusion About Concepts} + + +\begin{block}{trouble with concepts} + we cannot state that a type is a \bfForwardIterator because it + offers the method \bfnext +\end{block} + +\bigskip +\bigskip + +indeed, some types are defined without knowing what methods they +actually shall feature + +\bigskip + +{\scriptsize for instance \bfreverseI might implement \bfnext... and + sometimes it might not! } + + +\end{frame} + + + + + +%........................................................................ +\begin{frame} + \frametitle{Temporary Conclusion} + + +We really should think different: + +\bigskip + +\begin{block}{Rationale} + if a type has the \textsc{forward} \textit{{\color{red}{property}}} + \begin{itemize} + \item it offers the method \bfnext because + \begin{itemize} + \item either it implements this method + \item or an implementation of this method is automatically fetched + \end{itemize} + \item and thus it is a \bfForwardIterator + \end{itemize} +\end{block} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Discarding A False Solution} + +Consider a generic function type \bff (such as \bfreverse), \\ its behavior +is roughly the identity of the type on which it applies. + +\bigskip + +Yet forming ``\bffT derives from \bfT'' is clearly \textit{not} a +solution \\ since some functions \bff are far from the identity. + +% FIXME: Instead, we need a delegation mechanism (at compile-time). + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Using Delegation} + + Having \bffT means that an object with this type is constructed over + an object with type \bfT. + + \bigskip + + {\scriptsize for instance an object with type + \bfreversearrayiteratorT holds an object with type + \bfarrayiteratorT } + + \bigskip + + We expect that the behavior of most methods in \bffT rely on methods + of \bfT; so we need \textit{delegation}. + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Providing Properties} + + We sometimes said that a type has some properties (for instance the + \textsc{forward} property). + +\bigskip + +\begin{block}{Property} + A property is mapped into an associated type\\ + \textbf{+} \\ + is turned into a virtual type in order to take benefice from + inheritance. +\end{block} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Providing Delegation} + +\begin{block}{Delegatee} + The possible presence of a delegatee is handled as a special + property of a type. +\end{block} + +\bigskip + +For instance \bfI is the delegatee of \bfreverseI, meaning that the +latter delegates some methods to the former. + +\bigskip + +In addition the definitions of virtual types can also be delegated. + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Providing a Category} + + We sometimes said that a type belongs to a given category of objects + (for instance \bfIterator) without being specific about this type + belonging to a more precise sub-category (for instance + \bfForwardIterator). + + \bigskip + + \begin{block}{Category} + A category is a special property of a type that identifies its + belonging to a very large family of types. + \end{block} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Providing a Default Behavior} + + We sometimes said that function types have a given behavior (for + instance \bfhelloiteratorI almost behaves like the identity of + \bfI). + + \bigskip + +\begin{block}{Behavior} + The behavior of a type is a special property that characterizes most + of the implementation of this type. +\end{block} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Decoupling Implementation Classes From Abstractions} + + We sometimes cannot plug an implementation class to some abstract + class (for instance \bfreverseI). + + \bigskip + +\begin{block}{Top} + Any implementation class derives from a class named \bftop, + either directly or through its super classes (when we have an + implementation hierarchy). +\end{block} + + \bigskip + + Remember that we are in a static context so, more precisely, this + class is \textbf{top$<$Exact$>$}. + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{Fetching Implementation Automatically} + + We sometimes want an implementation class to have some methods that + cannot be directly implemented in that class (for instance, if \bfI + is an iterator, \bfreverseI shall automatically get an \bfisvalid + method). + + \bigskip + +\begin{block}{Automatic Implementation} + Some implementation is automatically fetched through inheritance thanks + to a mechanism located above \bftop. +\end{block} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Setting A Particular Implementation} + + We sometimes want an implementation class to define a very + particular method but in a non-intrusive way (for instance, if + \bfreverseI is a forward iterator, \bfnext shall be defined, calling + \bfprev on the delegatee). + + \bigskip + +\begin{block}{Non-intrusive Implementation} + The mechanism located above \bftop allows for setting some + particular implementation. +\end{block} + +\end{frame} + + + +%------------------------------------------------------------ +\subsection{Abstractions and Classes in \scoop~2} + + +%........................................................................ +\begin{frame} + \frametitle{Abstractions} + +To implement abstractions: + +\medskip + +\begin{itemize} +\item we stick with the 2003 ISO/ANSI C++ Standard\\ + ~ {\scriptsize{$\leadsto$ ~ so we can wait until C++-0x}} +% + \smallskip +\item a concept is turned into an abstract class\\ + ~ {\scriptsize{$\leadsto$ ~ so it is really materialized into code (a C++ type with a name)}} +% + \smallskip +\item a concept is parameterized by \textbf{Exact}\\ + ~ {\scriptsize{$\leadsto$ ~ so exact types are known at compile-time (static world)}} +% + \smallskip +\item a concept refinement is handle by inheritance\\ + ~ {\scriptsize{$\leadsto$ ~ so we effectively get the ``is-a'' relationship}} +\end{itemize} + + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Sample of Concept-Oriented Design} + +\vspace*{-2mm} +Consider again this C++0x design: + +\medskip + +\hspace*{-5mm} +\includegraphics[scale=.45]{harder0x} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Code of Abstractions (1/2)} + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +namespace abc +{ + + template <typename Exact> + struct @\color{blue}{Iterator}@ @ : \color{blue}{any}@<Exact>, @\color{mediumgreen}{automatic::get\_impl}@<Iterator, Exact> + { + @\color{mediumblue}{stc\_typename@(value); + void init()@~~~~~~~~~~~~~~~~@{ return this->exact().impl_init(); } + bool is_valid() const@~~~@{ return this->exact().impl_is_valid(); } + }; + + template <typename Exact> + struct @\color{blue}{Backward\_Iterator}@ @ : @virtual @\color{blue}{Iterator}@<Exact>, @\color{mediumgreen}{automatic::get\_impl}@<Backward_Iterator, Exact> + { + void prev()@~~~@{ this->exact().impl_prev(); } + }; + + template <typename Exact> + struct @\color{blue}{Forward\_Iterator}@ @ : @virtual @\color{blue}{Iterator}@<Exact>, @\color{mediumgreen}{automatic::get\_impl}@<Forward_Iterator, Exact> + { + void next()@~~~@{ this->exact().impl_next(); } + }; + + template <typename Exact> + struct @\color{blue}{Bidirectional\_Iterator}@ @ : @@\color{blue}{Backward\_Iterator}@<Exact>, @\color{blue}{Forward\_Iterator}@<Exact> + { + }; + + ... +\end{lstlisting} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Automatically Getting Implementation} + +\begin{multicols}{2} +% +\vspace*{-9mm}\hspace*{-5mm} +\includegraphics[scale=.45]{corn} +% +\columnbreak +% +\begin{itemize} +\small +\item we have an ``ear of corn'' design +\item FIXME +\end{itemize} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Code of Abstractions (2/2)} + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] + template <typename Exact> + struct @\color{blue}{Write\_Iterator}@ @ : @virtual @\color{blue}{Iterator}@<Exact>, @\color{mediumgreen}{automatic::get\_impl}@<Write_Iterator, Exact> + { + @\color{mediumblue}{stc\_using\_from}@(Iterator, value); + void set_value(const value& v)@~~~@{ return this->exact().impl_set_value(v); } + }; + + template <typename Exact> + struct @\color{blue}{Write\_Only\_Iterator}@ @ : \color{blue}{Write\_Iterator}@<Exact> + { + }; + + template <typename Exact> + struct @\color{blue}{Read\_Iterator}@ @ : @virtual @\color{blue}{Iterator}@<Exact>, @\color{mediumgreen}{automatic::get\_impl}@<Read_Iterator, Exact> + { + @\color{mediumblue}{stc\_using\_from}@(Iterator, value); + const value& get_value() const@~~~@{ return this->exact().impl_get_value(); } + }; + + template <typename Exact> + struct @\color{blue}{Read\_Write\_Iterator}@ @ : \color{blue}{Read\_Iterator}@<Exact>, @\color{blue}{Write\_Iterator}@<Exact> + { + }; + +} // end of namespace abc +\end{lstlisting} + +\end{frame} + + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Set an Implementation for a Default Behavior} + + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +namespace abc +{ + namespace @\color{mediumgreen}{automatic}@ + { + template <typename Exact> + struct @\color{mediumgreen}{set\_impl}@< @\color{blue}{Iterator}@, @\color{mediumpink}{behavior::identity}@, Exact >@~~:~~@virtual any<Exact> + { + void impl_init()@~~~~~~~~~~~~~~~~@{ this->exact().delegatee_.init(); } + bool impl_is_valid() const@~~~@{ return this->exact().delegatee_.is_valid(); } + }; + + template <typename Exact> + struct @\color{mediumgreen}{set\_impl}@< @\color{blue}{Read\_Iterator}@, @\color{mediumpink}{behavior::identity}@, Exact >@~~:~~@virtual any<Exact> + { + @\color{mediumblue}{stc\_typename}@(value); + const value& impl_get_value() const@~~~@{ return this->exact().delegatee_.get_value(); } + }; + + ... + + } // end of namespace abc::automatic + +} // end of namespace abc +\end{lstlisting} + + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{A Classical Implementation Class} + +We have: +\smallskip + +\begin{itemize} +\scriptsize +\item we {\color{mediumgreen}{explicitly}} state that \bfarrayiteratorT + \begin{itemize} \scriptsize + \item is an \bfIterator + \item goes forward + \item allows to assign a value (write in the container) + \end{itemize} +\item $\Rightarrow ~ $ we have to implement the corresponding methods. +\end{itemize} + +\bigskip + +So: +\smallskip + +\begin{itemize} + \scriptsize +\item this class derives from \bftop +\item we do \textit{not} have to draw an explicit link towards + \bfForwardIterator or to \bfWriteOnlyIterator +\item we can omit setting the \textsc{read} and \textsc{backward} to + 'false'\\ + ~~~ {\scriptsize $\leadsto$ ~ a property is verified when its value is set to ``true'' }\\ + ~~~ {\scriptsize $\leadsto$ ~ so if a property is unset, its value is not ``true'' }\\ +\end{itemize} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Code of \bfarrayiteratorT} + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +# define templ@~~~~~~~~@template <typename T> +# define classname@~~@array_iterator +# define current@~~~~~~\color{red}{array\_iterator$<$T$>$}@ +# define super@~~~~~~~~\color{mediumgreen}{top}@< current > + +@\color{mediumblue}{stc\_Header}@; + typedef stc::is<@\color{blue}{Iterator}@> category; + typedef T value; + typedef stc::true_ @\color{blue}{forward}@; + typedef stc::true_ @\color{blue}{write}@; +@\color{mediumblue}{stc\_End}@; + +template <typename T> +class array_iterator : public super +{ +public: + @\color{mediumblue}{stc\_using}@(value); + void impl_init()@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@{ i_ = 0; } + void impl_next()@~~~~~~~~~~~~~~~~~~~~~~~~~~~~@{ i_ = i_ + 1; } + bool impl_is_valid() const@~~~~~~~~~~~~~~~~@{ return i_ >= 0 and i_ < n_; } + void impl_set_value(const value& v)@~~~@{ this->v_ = v; } + + array_iterator(int n)@~~~~~~~~~~~~~~~~~~~~~~~~@: n_(n) {} + int index() const@~~~~~~~~~~~~~~~~~~~~~~~~~~~~@{ return i_; } +protected: + int i_, n_; +}; +\end{lstlisting} + +\end{frame} + + + + +%........................................................................ +\begin{frame} + \frametitle{A Generic Function} + +Remember: +\smallskip + +\begin{itemize} +\scriptsize +\item we {\color{mediumgreen}explicitly} state that \bfhelloiteratorI + \begin{itemize} \scriptsize + \item is an \bfIterator + \item behaves by default like \bfI + \end{itemize} +\item $\leadsto ~ $ we {\color{mediumgreen}implicitly} get from \bfI all we expect for \bfhelloiteratorI +\item $\Rightarrow ~ $ then we just have to {\color{red}{override}} \bfinit. +\end{itemize} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Code of \bfhelloiteratorI} + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +# define templ@~~~~~~~~@template <typename I> +# define classname@~~@hello_iterator +# define current@~~~~~~\color{red}{hello\_iterator$<$I$>$}@ +# define super@~~~~~~~~\color{mediumgreen}{top}@< current > + +@\color{mediumblue}{stc\_Header}@; + typedef stc::is<@\color{blue}{Iterator}@> category; + typedef @\color{mediumpink}{tag::identity}@ behavior; + typedef I delegatee; +@\color{mediumblue}{stc\_End}@; + +template <typename I> +class hello_iterator : public super +{ +public: + I& delegatee_; + hello_iterator(I& iter) : delegatee_(iter) {} // ctor + + // overriding + void impl_init() + { + std::cout << "hello!" << std::endl; + super::impl_init(); + } +}; +\end{lstlisting} + +\end{frame} + + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Another Generic Function} + +Remember: +\smallskip + +\begin{itemize} +\scriptsize +\item we {\color{mediumgreen}explicitly} state that \bfreverseT + \begin{itemize} \scriptsize + \item behaves most of the time like \bfT + \item goes forward (resp. backward) iff \bfI goes backward (resp. forward) + \end{itemize} +\item $\Rightarrow ~ $ then we just have to {\color{red}{implement}} \bfprev and \bfnext in a {\color{mediumgreen}non-intrusive} way. +\end{itemize} + +\end{frame} + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Code of \bfreverseT (1/2)} + +\begin{multicols}{2} +% +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +// first, name the behavior + +namespace behavior { struct reverse; } + + +// then, define the class + +# define templ@~~~~~~~~@template <typename T> +# define classname@~~@reverse +# define current@~~~~~~\color{red}{reverse$<$T$>$}@ +# define super@~~~~~~~~\color{mediumgreen}{top}@< current > + +@\color{mediumblue}{stc\_Header}@; + typedef T delegatee; + typedef @\color{mediumpink}{behavior::reverse}@ behavior; +@\color{mediumblue}{stc\_End}@; + +template <typename T> +class reverse : public super +{ +public: + T& delegatee_; // mandatory for delegation + reverse(T& d) : delegatee_(d) {} +}; +\end{lstlisting} +% +\columnbreak +% +{\scriptsize{ We can extend (non-intrusively) this class type with + new virtual types: }} \smallskip + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] + @\color{mediumblue}{stc\_Header\_Extension}@(forward); + typedef stc_prop(T, backward) ret; + @\color{mediumblue}{stc\_End}@; + + @\color{mediumblue}{stc\_Header\_Extension}@(backward); + typedef stc_prop(T, forward) ret; + @\color{mediumblue}{stc\_End}@; +\end{lstlisting} + +\smallskip {\scriptsize{ meaning that, \bfreverseT is forward iff \bfT + has the backward property }} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Code of \bfreverseT (2/2)} + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +namespace abc +{ + + namespace @\color{mediumgreen}{automatic}@ + { + // default behavior is 'identity' + + template <template <class> class @\textit{abstraction}@, typename Exact> + struct @\color{mediumgreen}{set\_impl}@< @\color{blue}{\textit{abstraction}}@, @\color{mediumpink}{behavior::reverse}@, Exact >@~~:~~\color{mediumgreen}{impl}@< @\color{blue}{\textit{abstraction}}@, @\color{mediumpink}{tag::identity}@, Exact > + {}; + + // particular implementations + + template <typename Exact> + struct @\color{mediumgreen}{set\_impl}@< @\color{blue}{Backward\_Iterator}@, @\color{mediumpink}{behavior::reverse}@, Exact > : virtual any<Exact> + { + void impl_prev()@~~~@{ this->exact().delegatee_.next(); }@~~~~@// 'prev' means 'next' + }; + + template <typename Exact> + struct @\color{mediumgreen}{set\_impl}@< @\color{blue}{Forward\_Iterator}@, @\color{mediumpink}{behavior::reverse}@, Exact > : virtual any<Exact> + { + void impl_next()@~~~@{ this->exact().delegatee_.prev(); }@~~~~@// 'next' means 'prev' + }; + + } // end of namespace abc::automatic + +} // end of namespace abc +\end{lstlisting} + +\end{frame} + + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Sample use} + +\begin{multicols}{2} +% +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +template <typename @\greenI@> +void echo(const @\color{blue}{abc::Forward\_Iterator}@<@\greenI@>&) +{ + std::cout << "@\textbf{Forward Iterator}@" << std::endl; +} + +template <typename @\greenI@> +void echo(const @\color{blue}{abc::Backward\_Iterator}@<@\greenI@>&) +{ + std::cout << "@\textbf{Backward Iterator}@" << std::endl; +} +\end{lstlisting} +% +\columnbreak +% +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +int main() +{ + typedef abc::array_iterator<int> iterator_t; + + iterator_t i(8); + echo(i);@~~~@// {\color{darkgray}{gives:}} \textbf{Forward Iterator} + + abc::reverse<iterator_t> j(i); + echo(j);@~~~@// {\color{darkgray}{gives:}} \textbf{Backward Iterator} + + i.init(); + std::cout << i.index() << std::endl; + // {\color{darkgray}{gives: 0}} + + j.prev();@~~~@// {\color{darkyellow}{actually means ``i.next()''}} + std::cout << i.index() << std::endl; + // {\color{darkgray}{gives: 1}} +} +\end{lstlisting} +% +\end{multicols} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Between \bftop and Abstractions (1/2)} + + +\begin{itemize} +\item an implementation class derives from \bftop\\ + ~~~ {\tiny $\leadsto$ ~ so, unlike in classical OO, we do \textit{not} plug the class into some abstract class(es)} + \medskip + % +\item this class might be related to some abstractions\\ + ~~~ {\tiny $\leadsto$ ~ and these possible relationships looks \textit{implicit} to the client} + \medskip + % +\item that depends upon: + \smallskip + % + \begin{itemize} + \scriptsize + \item the value of the class category\\ + ~~~ {\tiny $\leadsto$ ~ for instance the category of \bfarrayiteratorT is set to \textbf{stc::is$<$Iterator$>$}} + \smallskip + % + \item \textit{and} some computation over the class virtual types\\ + ~~~ {\tiny $\leadsto$ ~ for instance to be a \bfForwardIterator the \textsc{forward} property shall be true} + \smallskip + % + \item \textit{and possibly} the nature of the delegatee\\ + ~~~ {\tiny $\leadsto$ ~ if it exists and provides relevant information}\\ + ~~~ {\tiny $\leadsto$ ~ for instance \bfT for the class \bfreverseT} + \end{itemize} + % +\end{itemize} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{Between \bftop and Abstractions (1/2)} + +Above \bftop +\medskip + +\begin{itemize} + \scriptsize +\item an equipment exists to link implementation classes with abstractions\\ + ~~~ {\tiny $\leadsto$ ~ this equipment is a meta-program imported by the macro {\color{mediumblue}{stc\_equip\_namespace}}} + \smallskip + % +\item (and that is also the means to automatically fetch some default implementations)\\ + ~~~ {\tiny $\leadsto$ ~ so we can have generic function types like \bfreverseT} + \smallskip + % +\item yet the designer has to explain how properties and abstractions are related\\ + ~~~ {\tiny $\leadsto$ ~ for instance the \textsc{forward} property goes with the \bfForwardIterator abstraction } +\end{itemize} + +\medskip + + \begin{block}{Plugging rules} + The relations between properties and abstractions are implemented + in a declarative way. + \end{block} + +\end{frame} + + + +%........................................................................ +\begin{frame} + \frametitle{The Running Concept-Oriented Design} + +{\scriptsize This design feature two \textit{separate} concept hierarchies:} + +\medskip + +\includegraphics[scale=.4]{selectors} + +\medskip + +{\scriptsize we then have to define two \textit{selectors}, one per hierarchy} + +\end{frame} + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Code of Selector 1 (iterator browsing mode)} + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +namespace abc +{ + namespace @\color{mediumgreen}{internal}@ + { + + typedef @\color{mediumpink}{selector}@<@\textit{\color{blue}{Iterator}}@, @\color{mediumpink}{1}@> @\color{mediumpink}{Iterator\_browsing}@; + + template <typename Exact> + struct @\color{darkyellow}{case\_}@< @\color{darkpink}{Iterator\_browsing}@, Exact, @\color{darkyellow}{~1}@ > : @\color{darkyellow}{where\_}@< mlc::and_< stc_is(@\color{mediumblue}{forward}@), stc_is(@\color{mediumblue}{backward}@) > > + { + typedef @\color{blue}{Bidirectional\_Iterator}@<Exact> ret; + }; + + template <typename Exact> + struct @\color{darkyellow}{case\_}@< @\color{darkpink}{Iterator\_browsing}@, Exact, @\color{darkyellow}{~2}@ > : @\color{darkyellow}{where\_}@< stc_is(@\color{mediumblue}{forward}@) > + { + typedef @\color{blue}{Forward\_Iterator}@<Exact> ret; + }; + + template <typename Exact> + struct @\color{darkyellow}{case\_}@< @\color{darkpink}{Iterator\_browsing}@, Exact, @\color{darkyellow}{~3}@ > : @\color{darkyellow}{where\_}@< stc_is(@\color{mediumblue}{backward}@) > + { + typedef @\color{blue}{Backward\_Iterator}@<Exact> ret; + }; + + } // end of namespace abc::internal + +} // end of namespace abc +\end{lstlisting} + +\end{frame} + + + + +%........................................................................ +\begin{frame}[fragile] + \frametitle{Code of Selector 2 (iterator data accessibility)} + +\begin{lstlisting}[escapechar=@,basicstyle={\tiny\sffamily}] +namespace abc +{ + namespace @\color{mediumgreen}{internal}@ + { + + typedef @\color{mediumpink}{selector}@<@\textit{\color{blue}{Iterator}}@, @\color{mediumpink}{2}@> @\color{mediumpink}{Iterator\_accessibility}@; + + template <typename Exact> + struct @\color{darkyellow}{case\_}@< @\color{darkpink}{Iterator\_accessibility}@, Exact, @\color{darkyellow}{~1}@ > : @\color{darkyellow}{where\_}@< mlc::and_< stc_is(@\color{mediumblue}{read}@), stc_is(@\color{mediumblue}{write}@) > > + { + typedef @\color{blue}{Read\_Write\_Iterator}@<Exact> ret; + }; + + template <typename Exact> + struct @\color{darkyellow}{case\_}@< @\color{darkpink}{Iterator\_accessibility}@, Exact, @\color{darkyellow}{~2}@ > : @\color{darkyellow}{where\_}@< mlc::and_< stc_is(@\color{mediumblue}{read}@), stc_is_not(@\color{mediumblue}{write}@) > > + { + typedef @\color{blue}{Read\_Only\_Iterator}@<Exact> ret; + }; + + template <typename Exact> + struct @\color{darkyellow}{case\_}@< @\color{darkpink}{Iterator\_accessibility}@, Exact, @\color{darkyellow}{~3}@ > : @\color{darkyellow}{where\_}@< mlc::and_< stc_is(@\color{mediumblue}{write}@), stc_is_not(@\color{mediumblue}{read}@) > > + { + typedef @\color{blue}{Write\_Only\_Iterator}@<Exact> ret; + }; + + } // end of namespace abc::internal + +} // end of namespace abc +\end{lstlisting} + +\end{frame} + + + +%%% Local Variables: +%%% mode: latex +%%% eval: (ispell-change-dictionary "american") +%%% TeX-master: "slides" +%%% End:
participants (1)
-
Thierry GERAUD