- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

# syntactic_decorator.hh

Go to the documentation of this file.

    00001 // syntactic_decorator.hh: this file is part of the Vaucanson project.
    00002 //
    00003 // Vaucanson, a generic library for finite state machines.
    00004 //
    00005 // Copyright (C) 2001, 2002, 2003, 2004, 2005 The Vaucanson Group.
    00006 //
    00007 // This program is free software; you can redistribute it and/or
    00008 // modify it under the terms of the GNU General Public License
    00009 // as published by the Free Software Foundation; either version 2
    00010 // of the License, or (at your option) any later version.
    00011 //
    00012 // The complete GNU General Public Licence Notice can be found as the
    00013 // `COPYING' file in the root directory.
    00014 //
    00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
    00016 //
    00017 #ifndef VCSN_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH
    00018 # define VCSN_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH
    00019
    00020 # include <vaucanson/design_pattern/predecls.hh>
    00021
    00029 namespace vcsn {
    00030
    00033   /*-------------------.
    00034   | SyntacticDecorator |
    00035   `-------------------*/
    00036
    00043   template<typename S, typename T>
    00044   struct SyntacticDecorator
    00045   {
    00047     static const bool dynamic_value = true;
    00048
    00050     const S&    structure() const;
    00051
    00053
    00054     T&          value();
    00055     const T&    value() const;
    00057
    00059     template<typename OtherS, typename U>
    00060     Element<S, T>& operator+=(const Element<OtherS, U>& other);
    00061
    00064     template<typename U>
    00065     Element<S, T>& operator+=(const U& other);
    00066
    00068     template<typename OtherS, typename U>
    00069     Element<S, T>& operator-=(const Element<OtherS, U>& other);
    00070
    00073     template<typename U>
    00074     Element<S, T>& operator-=(const U& other);
    00075
    00077     template<typename OtherS, typename U>
    00078     Element<S, T>& operator/=(const Element<OtherS, U>& other);
    00079
    00082     template<typename U>
    00083     Element<S, T>& operator/=(const U& other);
    00084
    00086     template<typename OtherS, typename U>
    00087     Element<S, T>& operator*=(const Element<OtherS, U>& other);
    00088
    00091     template<typename U>
    00092     Element<S, T>& operator*=(const U& other);
    00093
    00095     template<typename OtherS, typename U>
    00096     Element<S, T>& operator%=(const Element<OtherS, U>& other);
    00097
    00100     template<typename U>
    00101     Element<S, T>& operator%=(const U& other);
    00102
    00104     Element<S, T>& operator++();
    00105
    00107     Element<S, T> operator++(int);
    00108
    00110     Element<S, T>& operator--();
    00111
    00113     Element<S, T> operator--(int);
    00114
    00117     template<typename U>
    00118     Element<S, T>& swap(Element<S, U>& other);
    00119
    00121
    00128     Element<S, T>& self();
    00129     const Element<S, T>& self() const;
    00131
    00132   protected:
    00133
    00135
    00136     SyntacticDecorator();
    00137     SyntacticDecorator(const SyntacticDecorator& other);
    00139   };
    00140
    00143 } // vcsn
    00144
    00145 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
    00146 #  include <vaucanson/design_pattern/syntactic_decorator.hxx>
    00147 # endif // VCSN_USE_INTERFACE_ONLY
    00148
    00149 #endif // ! VCSN_DESIGN_PATTERN_SYNTACTIC_DECORATOR_HH