X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FUN%2FUNAddress.hh;h=1dfdeeabffd50d46051782a6756f09367c4df109;hb=74270969b7d3562a3ee3a0a32d3cc4ee476760f0;hp=36d4ffc3a25c865d3ccd6540f63f153a892a4828;hpb=0de6c83e2769c7deb2ed3c57d7b26e8cb3fcca04;p=senf.git diff --git a/Socket/Protocols/UN/UNAddress.hh b/Socket/Protocols/UN/UNAddress.hh index 36d4ffc..1dfdeea 100644 --- a/Socket/Protocols/UN/UNAddress.hh +++ b/Socket/Protocols/UN/UNAddress.hh @@ -1,6 +1,7 @@ -// $Id$ -// // Copyright (C) 2007 +// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) +// Kompetenzzentrum NETwork research (NET) +// David Wagner // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -26,28 +27,36 @@ // Custom includes #include #include -#include -#include "../../../Utils/SafeBool.hh" +#include "../../../Utils/safe_bool.hh" //#include "UNAddress.mpp" ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { + /** \brief Unix domain address + + UNAddress represents a simple unix domain address which is given by a path to a socket. + It is modelled as a boost::filesystem::path. + + \ingroup addr_group + */ class UNAddress - : public boost::filesystem::path, - public ComparableSafeBool + : public comparable_safe_bool { public: - UNAddress(); - explicit UNAddress(boost::filesystem::path); - static UNAddress fromString(std::string & s); - static UNAddress fromPath(boost::filesystem::path & p); - static std::string pathString(); - struct AddressException : public std::exception {}; + UNAddress(); ///< Construct an empty address + 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 + UNAddress clone(); ///< Clone object + std::string pathString() const; ///< Return the path of the address as string + + /** \brief Base-class for UNAddress exceptions */ + struct AddressException : public std::exception {}; + private: - static boost::filesystem::path path; + std::string path; }; -const std::ostream & operator<<(std::ostream & os, UNAddress const & addr); +std::ostream & operator<<(std::ostream & os, UNAddress const & addr); } ///////////////////////////////hh.e////////////////////////////////////////