| ... | ... |
@@ -72,3 +72,3 @@ |
| 72 | 72 |
Path(const CPath& cpath) {
|
| 73 |
|
|
| 73 |
pathCopy(cpath, *this); |
|
| 74 | 74 |
} |
| ... | ... |
@@ -80,3 +80,3 @@ |
| 80 | 80 |
Path& operator=(const CPath& cpath) {
|
| 81 |
|
|
| 81 |
pathCopy(cpath, *this); |
|
| 82 | 82 |
return *this; |
| ... | ... |
@@ -260,3 +260,3 @@ |
| 260 | 260 |
SimplePath(const CPath& cpath) {
|
| 261 |
|
|
| 261 |
pathCopy(cpath, *this); |
|
| 262 | 262 |
} |
| ... | ... |
@@ -269,3 +269,3 @@ |
| 269 | 269 |
SimplePath& operator=(const CPath& cpath) {
|
| 270 |
|
|
| 270 |
pathCopy(cpath, *this); |
|
| 271 | 271 |
return *this; |
| ... | ... |
@@ -439,3 +439,3 @@ |
| 439 | 439 |
ListPath(const CPath& cpath) : first(0), last(0) {
|
| 440 |
|
|
| 440 |
pathCopy(cpath, *this); |
|
| 441 | 441 |
} |
| ... | ... |
@@ -455,3 +455,3 @@ |
| 455 | 455 |
ListPath& operator=(const CPath& cpath) {
|
| 456 |
|
|
| 456 |
pathCopy(cpath, *this); |
|
| 457 | 457 |
return *this; |
| ... | ... |
@@ -765,3 +765,3 @@ |
| 765 | 765 |
StaticPath(const CPath& cpath) : arcs(0) {
|
| 766 |
|
|
| 766 |
pathCopy(cpath, *this); |
|
| 767 | 767 |
} |
| ... | ... |
@@ -781,3 +781,3 @@ |
| 781 | 781 |
StaticPath& operator=(const CPath& cpath) {
|
| 782 |
|
|
| 782 |
pathCopy(cpath, *this); |
|
| 783 | 783 |
return *this; |
| ... | ... |
@@ -930,9 +930,9 @@ |
| 930 | 930 |
|
| 931 |
template <typename Target, typename Source, |
|
| 932 |
bool buildEnable = BuildTagIndicator<Target>::value> |
|
| 931 |
template <typename From, typename To, |
|
| 932 |
bool buildEnable = BuildTagIndicator<To>::value> |
|
| 933 | 933 |
struct PathCopySelectorForward {
|
| 934 |
static void copy(Target& target, const Source& source) {
|
|
| 935 |
target.clear(); |
|
| 936 |
for (typename Source::ArcIt it(source); it != INVALID; ++it) {
|
|
| 937 |
target.addBack(it); |
|
| 934 |
static void copy(const From& from, To& to) {
|
|
| 935 |
to.clear(); |
|
| 936 |
for (typename From::ArcIt it(from); it != INVALID; ++it) {
|
|
| 937 |
to.addBack(it); |
|
| 938 | 938 |
} |
| ... | ... |
@@ -941,7 +941,7 @@ |
| 941 | 941 |
|
| 942 |
template <typename Target, typename Source> |
|
| 943 |
struct PathCopySelectorForward<Target, Source, true> {
|
|
| 944 |
static void copy(Target& target, const Source& source) {
|
|
| 945 |
target.clear(); |
|
| 946 |
|
|
| 942 |
template <typename From, typename To> |
|
| 943 |
struct PathCopySelectorForward<From, To, true> {
|
|
| 944 |
static void copy(const From& from, To& to) {
|
|
| 945 |
to.clear(); |
|
| 946 |
to.build(from); |
|
| 947 | 947 |
} |
| ... | ... |
@@ -949,9 +949,9 @@ |
| 949 | 949 |
|
| 950 |
template <typename Target, typename Source, |
|
| 951 |
bool buildEnable = BuildTagIndicator<Target>::value> |
|
| 950 |
template <typename From, typename To, |
|
| 951 |
bool buildEnable = BuildTagIndicator<To>::value> |
|
| 952 | 952 |
struct PathCopySelectorBackward {
|
| 953 |
static void copy(Target& target, const Source& source) {
|
|
| 954 |
target.clear(); |
|
| 955 |
for (typename Source::RevArcIt it(source); it != INVALID; ++it) {
|
|
| 956 |
target.addFront(it); |
|
| 953 |
static void copy(const From& from, To& to) {
|
|
| 954 |
to.clear(); |
|
| 955 |
for (typename From::RevArcIt it(from); it != INVALID; ++it) {
|
|
| 956 |
to.addFront(it); |
|
| 957 | 957 |
} |
| ... | ... |
@@ -960,7 +960,7 @@ |
| 960 | 960 |
|
| 961 |
template <typename Target, typename Source> |
|
| 962 |
struct PathCopySelectorBackward<Target, Source, true> {
|
|
| 963 |
static void copy(Target& target, const Source& source) {
|
|
| 964 |
target.clear(); |
|
| 965 |
|
|
| 961 |
template <typename From, typename To> |
|
| 962 |
struct PathCopySelectorBackward<From, To, true> {
|
|
| 963 |
static void copy(const From& from, To& to) {
|
|
| 964 |
to.clear(); |
|
| 965 |
to.buildRev(from); |
|
| 966 | 966 |
} |
| ... | ... |
@@ -969,7 +969,7 @@ |
| 969 | 969 |
|
| 970 |
template <typename Target, typename Source, |
|
| 971 |
bool revEnable = RevPathTagIndicator<Source>::value> |
|
| 970 |
template <typename From, typename To, |
|
| 971 |
bool revEnable = RevPathTagIndicator<From>::value> |
|
| 972 | 972 |
struct PathCopySelector {
|
| 973 |
static void copy(Target& target, const Source& source) {
|
|
| 974 |
PathCopySelectorForward<Target, Source>::copy(target, source); |
|
| 973 |
static void copy(const From& from, To& to) {
|
|
| 974 |
PathCopySelectorForward<From, To>::copy(from, to); |
|
| 975 | 975 |
} |
| ... | ... |
@@ -977,6 +977,6 @@ |
| 977 | 977 |
|
| 978 |
template <typename Target, typename Source> |
|
| 979 |
struct PathCopySelector<Target, Source, true> {
|
|
| 980 |
static void copy(Target& target, const Source& source) {
|
|
| 981 |
PathCopySelectorBackward<Target, Source>::copy(target, source); |
|
| 978 |
template <typename From, typename To> |
|
| 979 |
struct PathCopySelector<From, To, true> {
|
|
| 980 |
static void copy(const From& from, To& to) {
|
|
| 981 |
PathCopySelectorBackward<From, To>::copy(from, to); |
|
| 982 | 982 |
} |
| ... | ... |
@@ -989,7 +989,15 @@ |
| 989 | 989 |
/// |
| 990 |
/// This function makes a copy of a path. |
|
| 991 |
template <typename Target, typename Source> |
|
| 992 |
void copyPath(Target& target, const Source& source) {
|
|
| 993 |
checkConcept<concepts::PathDumper<typename Source::Digraph>, Source>(); |
|
| 994 |
|
|
| 990 |
/// This function makes a copy of a path. |
|
| 991 |
template <typename From, typename To> |
|
| 992 |
void pathCopy(const From& from, To& to) {
|
|
| 993 |
checkConcept<concepts::PathDumper<typename From::Digraph>, From>(); |
|
| 994 |
_path_bits::PathCopySelector<From, To>::copy(from, to); |
|
| 995 |
} |
|
| 996 |
|
|
| 997 |
/// \brief Deprecated version of \ref pathCopy(). |
|
| 998 |
/// |
|
| 999 |
/// Deprecated version of \ref pathCopy() (only for reverse compatibility). |
|
| 1000 |
template <typename To, typename From> |
|
| 1001 |
void copyPath(To& to, const From& from) {
|
|
| 1002 |
pathCopy(from, to); |
|
| 995 | 1003 |
} |
0 comments (0 inline)