basic implementation of Unix Domain Sockets, for now Datagram only. docs mostly missing.
[senf.git] / Socket / Protocols / UN / UNAddress.cc
1 // $Id$
2 //
3 // Copyright (C) 2007 
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the
17 // Free Software Foundation, Inc.,
18 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
20 /** \file
21     \brief UNAddress non-inline non-template implementation */
22
23 #include "UNAddress.hh"
24 //#include "UNAddress.ih"
25
26 // Custom includes
27
28 //#include "UNAddress.mpp"
29 #define prefix_
30 ///////////////////////////////cc.p////////////////////////////////////////
31
32 prefix_ senf::UNAddress::UNAddress()
33     //:path("")
34 {
35     path = boost::filesystem::path("");
36 }
37
38 prefix_ senf::UNAddress::UNAddress(boost::filesystem::path p)
39     //:path(p)
40 {
41     
42 }
43
44
45 prefix_ senf::UNAddress::UNAddress senf::UNAddress::fromString(std::string &  s)
46 {
47     return senf::UNAddress::UNAddress(boost::filesystem::path(s));
48 }
49
50 prefix_ senf::UNAddress::UNAddress senf::UNAddress::fromPath(boost::filesystem::path & p){
51     return senf::UNAddress::UNAddress(p);
52 }
53
54 prefix_  std::string senf::UNAddress::pathString()
55 {
56     return  path.string();
57 }
58
59
60 prefix_ const std::ostream & senf::operator<<(std::ostream & os, UNAddress const & addr)
61 {
62     os << addr.pathString();
63     return os;
64 }
65
66 ///////////////////////////////cc.e////////////////////////////////////////
67 #undef prefix_
68 //#include "UNAddress.mpp"
69
70 \f
71 // Local Variables:
72 // mode: c++
73 // fill-column: 100
74 // comment-column: 40
75 // c-file-style: "senf"
76 // indent-tabs-mode: nil
77 // ispell-local-dictionary: "american"
78 // compile-command: "scons -u test"
79 // End: