doc/named-param.dox
changeset 1624 61cc647dac99
parent 1619 f0700b9e6418
child 1709 a323456bf7c8
     1.1 --- a/doc/named-param.dox	Thu Aug 11 13:20:52 2005 +0000
     1.2 +++ b/doc/named-param.dox	Thu Aug 11 14:31:06 2005 +0000
     1.3 @@ -1,8 +1,8 @@
     1.4 -*!
     1.5 +/*!
     1.6  
     1.7  \page named-param Named Parameters
     1.8  
     1.9 -\section named-func-param Named "Function" Parameters
    1.10 +\section named-func-param Named Function Parameters
    1.11  
    1.12  C++ makes it possible to use default parameter values when calling a
    1.13  function. In such a case we do not have to give value for parameters,
    1.14 @@ -42,24 +42,27 @@
    1.15  
    1.16  The usage is the following.
    1.17  
    1.18 -We have to define a class, let's call it named_fn.  Let us assume that
    1.19 -we would like to use a parameter, called X. In the named_fn class we
    1.20 -have to define an _X attribute, and a function X. The function
    1.21 -expects a parameter with the type of _X, and sets the value of
    1.22 -_X. After setting the value the function returns the class itself. The
    1.23 -class also have to have a function, called for example run(), we have
    1.24 +We have to define a class, let's call it \c named_fn.  Let us assume that
    1.25 +we would like to use a parameter, called \c X. In the \c named_fn class we
    1.26 +have to define an \c _X attribute, and a function \c X. The function
    1.27 +expects a parameter with the type of \c _X, and sets the value of
    1.28 +\c _X. After setting the value the function returns the class itself. The
    1.29 +class also have to have a function, called for example <tt>run()</tt>, we have
    1.30  to implement here the original function itself. The constructor of the
    1.31 -class have to give all the attributes like _X the default values of
    1.32 +class have to give all the attributes like \c _X the default values of
    1.33  them.
    1.34  
    1.35  If we instantiate this class, the default values will be set for the
    1.36  attributes (originally the parameters), initially. If we call function
    1.37 -X, we get a class with the modified parameter value of
    1.38 -X. Therefore we can modify any parameter-value, independent from the
    1.39 -order. To run the algorithm we have to call the run() function at the
    1.40 +\c X, we get a class with the modified parameter value of
    1.41 +\c X. Therefore we can modify any parameter-value, independent from the
    1.42 +order. To run the algorithm we have to call the <tt>run()</tt> function at the
    1.43  end of the row.
    1.44  
    1.45 -Example: named_fn().id(3).val(2).run();
    1.46 +Example:
    1.47 +\code
    1.48 +named_fn().id(3).val(2).run();
    1.49 +\endcode
    1.50  
    1.51  \section traits-classes Traits Classes
    1.52  
    1.53 @@ -92,7 +95,7 @@
    1.54  The result will be an instantiated Dijkstra class, in which the
    1.55  DistMap and the PredMap is modified.
    1.56  
    1.57 -\section named-templ-func-param Named "Function" Template Parameters
    1.58 +\section named-templ-func-param Named Function Template Parameters
    1.59  
    1.60  If the class has so called wizard functions, the new class with the
    1.61  modified tpye of attributes can be returned by the appropriate wizard