2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum NETwork research (NET)
4 // David Wagner <david.wagner@fokus.fraunhofer.de>
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 \brief UNAddress public header */
25 #define HH_UNAddress_ 1
29 #include <boost/operators.hpp>
30 #include "../../../Utils/safe_bool.hh"
32 //#include "UNAddress.mpp"
33 ///////////////////////////////hh.p////////////////////////////////////////
35 /** \brief Unix domain address
37 UNAddress represents a simple unix domain address which is given by a path to a socket.
38 It is modelled as a boost::filesystem::path.
43 : public comparable_safe_bool<UNAddress>
46 UNAddress(); ///< Construct an empty address
47 explicit UNAddress(std::string);///< Construct an address constant from given path
48 static UNAddress fromString(std::string & s); ///< Convert string to address by interpreting the string as path
49 UNAddress clone(); ///< Clone object
50 std::string pathString() const; ///< Return the path of the address as string
52 /** \brief Base-class for UNAddress exceptions */
53 struct AddressException : public std::exception {};
59 std::ostream & operator<<(std::ostream & os, UNAddress const & addr);
62 ///////////////////////////////hh.e////////////////////////////////////////
63 //#include "UNAddress.cci"
64 //#include "UNAddress.ct"
65 //#include "UNAddress.cti"
73 // c-file-style: "senf"
74 // indent-tabs-mode: nil
75 // ispell-local-dictionary: "american"
76 // compile-command: "scons -u test"