doc/named-param.dox
changeset 1489 f7e9cc3bc2da
parent 1141 e5ee2726abe4
child 1536 308150155bb5
equal deleted inserted replaced
3:d85cf6653e98 4:519272f76132
    42 Example: named_fn().id(3).val(2).run();
    42 Example: named_fn().id(3).val(2).run();
    43 
    43 
    44 \section traits-classes Traits Classes
    44 \section traits-classes Traits Classes
    45 
    45 
    46 The procedure above can also be applied when defining classes. In this case the type of the attributes can be changed.
    46 The procedure above can also be applied when defining classes. In this case the type of the attributes can be changed.
    47 Initially we have to define a class with the default attribute types. This is the se called Traits Class. Later on
    47 Initially we have to define a class with the default attribute types. This is the so called Traits Class. Later on
    48 the types of these attributes can be changed, as described below. In our software \ref DijkstraDefaultTraits is an example of how a traits class look like.
    48 the types of these attributes can be changed, as described below. In our software \ref DijkstraDefaultTraits is an example of how a traits class looks like.
    49 
    49 
    50 \section named-templ-param Named Class Template Parameters
    50 \section named-templ-param Named Class Template Parameters
    51 
    51 
    52 If we would like to change the type of an attribute in a class that was instantiated by using a traits class as a template parameter, and the class contains named parameters, we do not have to reinstantiate the class with new traits class. Instead of that adaptor classes can be used like in the following cases.
    52 If we would like to change the type of an attribute in a class that was instantiated by using a traits class as a template parameter, and the class contains named parameters, we do not have to reinstantiate the class with new traits class. Instead of that, adaptor classes can be used like in the following cases.
    53 
    53 
    54 \code
    54 \code
    55 Dijkstra<>::SetPredNodeMap<NullMap<Node,Node> >
    55 Dijkstra<>::SetPredNodeMap<NullMap<Node,Node> >
    56 \endcode
    56 \endcode
    57 
    57