From: dw6 Date: Tue, 13 Nov 2007 10:49:26 +0000 (+0000) Subject: removed boost::filesystem dependency X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=84ae60e20582a1c0b02f6d7475f46fa226c1239b;p=senf.git removed boost::filesystem dependency git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@509 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Socket/Protocols/UN/UNAddress.cc b/Socket/Protocols/UN/UNAddress.cc index 6d4e81a..feb9570 100644 --- a/Socket/Protocols/UN/UNAddress.cc +++ b/Socket/Protocols/UN/UNAddress.cc @@ -33,10 +33,10 @@ prefix_ senf::UNAddress::UNAddress() //:path("") { - path = boost::filesystem::path(""); + path = ""; } -prefix_ senf::UNAddress::UNAddress(boost::filesystem::path p) +prefix_ senf::UNAddress::UNAddress(std::string p) { path = p; } @@ -44,17 +44,14 @@ prefix_ senf::UNAddress::UNAddress(boost::filesystem::path p) prefix_ senf::UNAddress::UNAddress senf::UNAddress::fromString(std::string & s) { - return senf::UNAddress::UNAddress(boost::filesystem::path(s)); + return senf::UNAddress::UNAddress(s); } -prefix_ senf::UNAddress::UNAddress senf::UNAddress::fromPath(boost::filesystem::path & p){ - return senf::UNAddress::UNAddress(p); -} prefix_ std::string senf::UNAddress::pathString() const { - return path.string(); + return path; } prefix_ senf::UNAddress::UNAddress senf::UNAddress::clone() diff --git a/Socket/Protocols/UN/UNAddress.hh b/Socket/Protocols/UN/UNAddress.hh index 1b6ed5f..1dfdeea 100644 --- a/Socket/Protocols/UN/UNAddress.hh +++ b/Socket/Protocols/UN/UNAddress.hh @@ -27,7 +27,6 @@ // Custom includes #include #include -#include #include "../../../Utils/safe_bool.hh" //#include "UNAddress.mpp" @@ -41,14 +40,12 @@ namespace senf { \ingroup addr_group */ class UNAddress - : public boost::filesystem::path, - public comparable_safe_bool + : public comparable_safe_bool { public: UNAddress(); ///< Construct an empty address - explicit UNAddress(boost::filesystem::path);///< Construct an address constant from given path + explicit UNAddress(std::string);///< Construct an address constant from given path static UNAddress fromString(std::string & s); ///< Convert string to address by interpreting the string as path - static UNAddress fromPath(boost::filesystem::path & p);///< Convert path to address UNAddress clone(); ///< Clone object std::string pathString() const; ///< Return the path of the address as string @@ -56,7 +53,7 @@ namespace senf { struct AddressException : public std::exception {}; private: - boost::filesystem::path path; + std::string path; }; std::ostream & operator<<(std::ostream & os, UNAddress const & addr); diff --git a/Socket/Protocols/UN/UNAddressing.cc b/Socket/Protocols/UN/UNAddressing.cc index 2ae9b95..9a98b10 100644 --- a/Socket/Protocols/UN/UNAddressing.cc +++ b/Socket/Protocols/UN/UNAddressing.cc @@ -27,24 +27,19 @@ // Custom includes #include #include -#include #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// -prefix_ senf::UNSocketAddress::UNSocketAddress(boost::filesystem::path p) +prefix_ senf::UNSocketAddress::UNSocketAddress(std::string p) { sockAddr.sun_family = AF_UNIX; - strcpy(sockAddr.sun_path, p.string().c_str()); + strcpy(sockAddr.sun_path, p.c_str()); } prefix_ senf::UNSocketAddress fromString(std::string s) { - return senf::UNSocketAddress::UNSocketAddress(boost::filesystem::path(s)); + return senf::UNSocketAddress::UNSocketAddress(s); } -prefix_ senf::UNSocketAddress fromPath(boost::filesystem::path p) -{ - return senf::UNSocketAddress::UNSocketAddress(p); -} prefix_ std::string senf::UNSocketAddress::path() const diff --git a/Socket/Protocols/UN/UNAddressing.hh b/Socket/Protocols/UN/UNAddressing.hh index 1116d1b..837adb7 100644 --- a/Socket/Protocols/UN/UNAddressing.hh +++ b/Socket/Protocols/UN/UNAddressing.hh @@ -31,7 +31,6 @@ #include #include #include -#include "boost/filesystem/path.hpp" #include "../../../Socket/SocketPolicy.hh" #include "../../../Socket/ClientSocketHandle.hh" #include "../../../Socket/CommunicationPolicy.hh" @@ -57,10 +56,9 @@ namespace senf { public: //UNSocketAddress(); - explicit UNSocketAddress(boost::filesystem::path p); + explicit UNSocketAddress(std::string p); ///< Construct an address constant from given path static UNSocketAddress from_string(std::string const s); ///< Create UNSocketAddress from string - static UNSocketAddress from_path(boost::filesystem::path const p); ///< Create UNSocketAddress from path std::string path() const ; ///< Return path as string struct sockaddr_un sockaddr(); struct sockaddr * sockaddr_p() ;