removed boost::filesystem dependency
dw6 [Tue, 13 Nov 2007 10:49:26 +0000 (10:49 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@509 270642c3-0616-0410-b53a-bc976706d245

Socket/Protocols/UN/UNAddress.cc
Socket/Protocols/UN/UNAddress.hh
Socket/Protocols/UN/UNAddressing.cc
Socket/Protocols/UN/UNAddressing.hh

index 6d4e81a..feb9570 100644 (file)
 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()
index 1b6ed5f..1dfdeea 100644 (file)
@@ -27,7 +27,6 @@
 // Custom includes
 #include <string>
 #include <boost/operators.hpp>
-#include <boost/filesystem/path.hpp>
 #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<UNAddress>
+        : public comparable_safe_bool<UNAddress>
     {   
     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);
index 2ae9b95..9a98b10 100644 (file)
 // Custom includes
 #include <stdio.h>
 #include <boost/operators.hpp>
-#include <boost/filesystem/path.hpp>
 
 #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
index 1116d1b..837adb7 100644 (file)
@@ -31,7 +31,6 @@
 #include <sys/un.h>
 #include <boost/cstdint.hpp>
 #include <boost/operators.hpp>
-#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() ;