# HG changeset patch
# User Akos Ladanyi <ladanyi@tmit.bme.hu>
# Date 1271337914 -3600
# Branch 1.1
# Node ID b265952526f2e1de91291b5d900b7424837a2e03
# Parent 290f3ca599d693626ca7d1fcd718e1562573f3c9
Rename types conflicting with names in windows.h (#365)
diff --git a/lemon/adaptors.h b/lemon/adaptors.h
a
|
b
|
|
3422 | 3422 | /// |
3423 | 3423 | /// This map adaptor class adapts two node maps of the original digraph |
3424 | 3424 | /// to get a node map of the split digraph. |
3425 | | /// Its value type is inherited from the first node map type (\c IN). |
3426 | | /// \tparam IN The type of the node map for the in-nodes. |
3427 | | /// \tparam OUT The type of the node map for the out-nodes. |
3428 | | template <typename IN, typename OUT> |
| 3425 | /// Its value type is inherited from the first node map type (\c IM). |
| 3426 | /// \tparam IM The type of the node map for the in-nodes. |
| 3427 | /// \tparam OM The type of the node map for the out-nodes. |
| 3428 | template <typename IM, typename OM> |
3429 | 3429 | class CombinedNodeMap { |
3430 | 3430 | public: |
3431 | 3431 | |
3432 | 3432 | /// The key type of the map |
3433 | 3433 | typedef Node Key; |
3434 | 3434 | /// The value type of the map |
3435 | | typedef typename IN::Value Value; |
3436 | | |
3437 | | typedef typename MapTraits<IN>::ReferenceMapTag ReferenceMapTag; |
3438 | | typedef typename MapTraits<IN>::ReturnValue ReturnValue; |
3439 | | typedef typename MapTraits<IN>::ConstReturnValue ConstReturnValue; |
3440 | | typedef typename MapTraits<IN>::ReturnValue Reference; |
3441 | | typedef typename MapTraits<IN>::ConstReturnValue ConstReference; |
| 3435 | typedef typename IM::Value Value; |
| 3436 | |
| 3437 | typedef typename MapTraits<IM>::ReferenceMapTag ReferenceMapTag; |
| 3438 | typedef typename MapTraits<IM>::ReturnValue ReturnValue; |
| 3439 | typedef typename MapTraits<IM>::ConstReturnValue ConstReturnValue; |
| 3440 | typedef typename MapTraits<IM>::ReturnValue Reference; |
| 3441 | typedef typename MapTraits<IM>::ConstReturnValue ConstReference; |
3442 | 3442 | |
3443 | 3443 | /// Constructor |
3444 | | CombinedNodeMap(IN& in_map, OUT& out_map) |
| 3444 | CombinedNodeMap(IM& in_map, OM& out_map) |
3445 | 3445 | : _in_map(in_map), _out_map(out_map) {} |
3446 | 3446 | |
3447 | 3447 | /// Returns the value associated with the given key. |
… |
… |
|
3473 | 3473 | |
3474 | 3474 | private: |
3475 | 3475 | |
3476 | | IN& _in_map; |
3477 | | OUT& _out_map; |
| 3476 | IM& _in_map; |
| 3477 | OM& _out_map; |
3478 | 3478 | |
3479 | 3479 | }; |
3480 | 3480 | |
… |
… |
|
3482 | 3482 | /// \brief Returns a combined node map |
3483 | 3483 | /// |
3484 | 3484 | /// This function just returns a combined node map. |
3485 | | template <typename IN, typename OUT> |
3486 | | static CombinedNodeMap<IN, OUT> |
3487 | | combinedNodeMap(IN& in_map, OUT& out_map) { |
3488 | | return CombinedNodeMap<IN, OUT>(in_map, out_map); |
| 3485 | template <typename IM, typename OM> |
| 3486 | static CombinedNodeMap<IM, OM> |
| 3487 | combinedNodeMap(IM& in_map, OM& out_map) { |
| 3488 | return CombinedNodeMap<IM, OM>(in_map, out_map); |
3489 | 3489 | } |
3490 | 3490 | |
3491 | | template <typename IN, typename OUT> |
3492 | | static CombinedNodeMap<const IN, OUT> |
3493 | | combinedNodeMap(const IN& in_map, OUT& out_map) { |
3494 | | return CombinedNodeMap<const IN, OUT>(in_map, out_map); |
| 3491 | template <typename IM, typename OM> |
| 3492 | static CombinedNodeMap<const IM, OM> |
| 3493 | combinedNodeMap(const IM& in_map, OM& out_map) { |
| 3494 | return CombinedNodeMap<const IM, OM>(in_map, out_map); |
3495 | 3495 | } |
3496 | 3496 | |
3497 | | template <typename IN, typename OUT> |
3498 | | static CombinedNodeMap<IN, const OUT> |
3499 | | combinedNodeMap(IN& in_map, const OUT& out_map) { |
3500 | | return CombinedNodeMap<IN, const OUT>(in_map, out_map); |
| 3497 | template <typename IM, typename OM> |
| 3498 | static CombinedNodeMap<IM, const OM> |
| 3499 | combinedNodeMap(IM& in_map, const OM& out_map) { |
| 3500 | return CombinedNodeMap<IM, const OM>(in_map, out_map); |
3501 | 3501 | } |
3502 | 3502 | |
3503 | | template <typename IN, typename OUT> |
3504 | | static CombinedNodeMap<const IN, const OUT> |
3505 | | combinedNodeMap(const IN& in_map, const OUT& out_map) { |
3506 | | return CombinedNodeMap<const IN, const OUT>(in_map, out_map); |
| 3503 | template <typename IM, typename OM> |
| 3504 | static CombinedNodeMap<const IM, const OM> |
| 3505 | combinedNodeMap(const IM& in_map, const OM& out_map) { |
| 3506 | return CombinedNodeMap<const IM, const OM>(in_map, out_map); |
3507 | 3507 | } |
3508 | 3508 | |
3509 | 3509 | /// \brief Arc map combined from an arc map and a node map of the |