// $Id$
//
// Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-// Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Stefan Bund <g0dil@berlios.de>
//
// 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
#include "SocketHandle.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include <typeinfo>
#include <boost/lexical_cast.hpp>
#include "../Utils/TypeInfo.hh"
prefix_ senf::SocketHandle<SocketPolicy>::SocketHandle(FileHandle other, bool isChecked)
: FileHandle(other)
{
- BOOST_ASSERT( isChecked );
- BOOST_ASSERT( dynamic_cast<SocketBody *>(&FileHandle::body()) );
+ SENF_ASSERT( isChecked );
+ SENF_ASSERT( dynamic_cast<SocketBody *>(&FileHandle::body()) );
}
template <class SocketPolicy>
prefix_ senf::SocketBody & senf::SocketHandle<SocketPolicy>::body()
{
- BOOST_ASSERT( dynamic_cast<SocketBody *>(&FileHandle::body()) );
+ SENF_ASSERT( dynamic_cast<SocketBody *>(&FileHandle::body()) );
return static_cast<SocketBody &>(FileHandle::body());
}
prefix_ senf::SocketBody const & senf::SocketHandle<SocketPolicy>::body()
const
{
- BOOST_ASSERT( dynamic_cast<SocketBody const *>(&FileHandle::body()) );
+ SENF_ASSERT( dynamic_cast<SocketBody const *>(&FileHandle::body()) );
return static_cast<SocketBody const &>(FileHandle::body());
}
boost::is_convertible<Target*,FileHandle*>::value &&
( boost::is_convertible<Source,Target>::value ||
boost::is_convertible<Target,Source>::value ) ));
- BOOST_ASSERT( check_socket_cast<Target>(handle) );
+ SENF_ASSERT( check_socket_cast<Target>(handle) );
return Target::cast_static(handle);
}
// automatically include the SocketPolicy template parameter in
// the type name and therefore show the \e static policy of the
// socket handle.
- map["handle"] = prettyName(typeid(*this));
+ map["handle"] << prettyName(typeid(*this));
body().state(map,lod);
}
return detail::dumpState(map);
}
-///////////////////////////////////////////////////////////////////////////
-// senf::detail::ConvertibleString
-
-template <class T>
-prefix_ senf::detail::ConvertibleString::ConvertibleString(T const & other)
- : std::string(boost::lexical_cast<std::string>(other))
-{}
-
///////////////////////////////cti.e///////////////////////////////////////
#undef prefix_