From 65e8cc63fc450cedaad5433de2683f0291f69534 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 2 Jun 2012 12:52:13 -0400 Subject: [PATCH] Enhancement - Added ostream converter for Path object. --- src/Path.cpp | 7 +++++++ src/Path.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/Path.cpp b/src/Path.cpp index f9bd216bd..811bd53c1 100644 --- a/src/Path.cpp +++ b/src/Path.cpp @@ -36,6 +36,13 @@ #include #include +//////////////////////////////////////////////////////////////////////////////// +std::ostream& operator<< (std::ostream& out, const Path& path) +{ + out << path._data; + return out; +} + //////////////////////////////////////////////////////////////////////////////// Path::Path () { diff --git a/src/Path.h b/src/Path.h index 8ca758392..6ab371935 100644 --- a/src/Path.h +++ b/src/Path.h @@ -29,6 +29,7 @@ #define INCLUDED_PATH #define L10N // Localization complete. +#include #include #include @@ -62,5 +63,7 @@ public: std::string _data; }; +std::ostream& operator<< (std::ostream&, const Path&); + #endif ////////////////////////////////////////////////////////////////////////////////