#include "ULEdec.hh"
+#include <cassert>
#include <linux/dvb/dmx.h>
#include <boost/format.hpp>
#include <senf/Packets.hh>
if ( (*payload_iter++ << 8 | *payload_iter++) != ULE_END_INDICATOR )
std::cerr << "delimiting error\n";
} else {
- BOOST_ASSERT( std::distance( payload_iter, payload_end ) == 0 );
+ assert( std::distance( payload_iter, payload_end ) == 0 );
}
}
break;
std::advance(payload_iter, payload_pointer);
} else {
payload_iter = readContSNDUPacket( payload_iter, payload_end );
- BOOST_ASSERT( isSDNUPacketComplete() );
+ assert( isSDNUPacketComplete() );
try {
handleSNDUPacket();
} catch (ULEdecException const & ex) {
do {
payload_iter = readNewSNDUPacket( payload_iter, payload_end );
if (! isSDNUPacketComplete()) {
- BOOST_ASSERT( std::distance( payload_iter, payload_end ) == 0 );
+ assert( std::distance( payload_iter, payload_end ) == 0 );
this->receiver_state = Reassembly;
break;
}
\brief Connectors inline non-template implementation */
// Custom includes
+#include "../Utils/senfassert.hh"
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
prefix_ senf::ppi::connector::Connector & senf::ppi::connector::Connector::peer()
const
{
- BOOST_ASSERT(peer_);
+ SENF_ASSERT(peer_);
return *peer_;
}
prefix_ senf::ppi::module::Module & senf::ppi::connector::Connector::module()
const
{
- BOOST_ASSERT(module_);
+ SENF_ASSERT(module_);
return *module_;
}
prefix_ void senf::ppi::connector::Connector::connect(Connector & target)
{
- BOOST_ASSERT( ! peer_ && ! target.peer_ );
+ SENF_ASSERT( ! peer_ && ! target.peer_ );
peer_ = & target;
target.peer_ = this;
}
prefix_ void senf::ppi::connector::PassiveConnector::emit()
{
- BOOST_ASSERT(callback_);
+ SENF_ASSERT(callback_);
if (!throttled())
callback_();
}
prefix_ senf::Packet senf::ppi::connector::InputConnector::peek()
const
{
- BOOST_ASSERT( ! queue_.empty() );
+ SENF_ASSERT( ! queue_.empty() );
return queue_.back();
}
\brief DebugModules inline non-template implementation */
// Custom includes
+#include "../Utils/senfassert.hh"
#include "Setup.hh"
#define prefix_ inline
prefix_ void senf::ppi::module::debug::PassiveSource::request()
{
- BOOST_ASSERT( ! packets_.empty() );
+ SENF_ASSERT( ! packets_.empty() );
output(packets_.front());
packets_.pop_front();
if (packets_.empty())
\brief Events inline non-template implementation */
// Custom includes
-#include <boost/assert.hpp>
+#include <../Utils/senfassert.hh>
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
prefix_ void senf::ppi::EventDescriptor::enabled(bool v)
{
- BOOST_ASSERT(v_isRegistered());
+ SENF_ASSERT(v_isRegistered());
if (v && ! enabled_)
v_enable();
else if (! v && enabled_)
#include "Events.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include "detail/EventBinding.hh"
#define prefix_ inline
prefix_ senf::ppi::detail::EventBinding<EventType> &
senf::ppi::EventImplementationHelper<EventType,Self>::binding()
{
- BOOST_ASSERT( static_cast<Self*>(this)->binding_ );
+ SENF_ASSERT( static_cast<Self*>(this)->binding_ );
return * static_cast<Self*>(this)->binding_;
}
prefix_ senf::ppi::detail::EventBinding<void> &
senf::ppi::EventImplementationHelper<void,Self>::binding()
{
- BOOST_ASSERT( static_cast<Self*>(this)->binding_ );
+ SENF_ASSERT( static_cast<Self*>(this)->binding_ );
return * static_cast<Self*>(this)->binding_;
}
//#include "IOEvent.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include <boost/bind.hpp>
//#include "IOEvent.mpp"
throw HangupException();
else
// This cannot happen.
- BOOST_ASSERT(false);
+ SENF_ASSERT(false);
} else {
IOEventInfo info = { event };
callback(info);
#include "ArrayParser.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#define prefix_ inline
///////////////////////////////cti.p///////////////////////////////////////
senf::ArrayParser<elements,ElementParser>::operator[](difference_type i)
const
{
- BOOST_ASSERT( i>=0 && i < difference_type(elements) );
+ SENF_ASSERT( i>=0 && i < difference_type(elements) );
return begin()[i];
}
else if (p.next().is<EthernetPacket>())
p->type_length() << p.next().data().size();
else
- ///\fixme Is this correct ??
+ ///\fixme Is this correct ?? we at least need an 'if (! p.next().is<DataPacket>() )'
p->type_length() << 0;
}
#include "ListNParser.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#define prefix_
///////////////////////////////ct.p////////////////////////////////////////
for (; n_; --n_, j += ElementParser(j,s).bytes())
if (j==p)
return;
- BOOST_ASSERT( false );
+ SENF_ASSERT( false );
}
template <class ElementParser, class SizeParser>
#include "ListParser.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#define prefix_
///////////////////////////////ct.p////////////////////////////////////////
senf::ListParser<ListPolicy>::back()
const
{
- BOOST_ASSERT( ! empty() );
+ SENF_ASSERT( ! empty() );
iterator i (begin()), j;
iterator const e (end());
for (j=i; i!=e; j=i, ++i) ;
senf::ListParser_Container<ListPolicy>::back()
const
{
- BOOST_ASSERT( ! empty() );
+ SENF_ASSERT( ! empty() );
iterator i (begin()), j;
iterator const e (end());
for (j=i; i!=e; j=i, ++i) ;
#include "ListParser.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#define prefix_ inline
///////////////////////////////cti.p///////////////////////////////////////
senf::ListParser<ListPolicy>::front()
const
{
- BOOST_ASSERT( ! empty() );
+ SENF_ASSERT( ! empty() );
return *begin();
}
senf::ListParser_Container<ListPolicy>::front()
const
{
- BOOST_ASSERT( ! empty() );
+ SENF_ASSERT( ! empty() );
return *begin();
}
\brief Packet inline non-template implementation */
// Custom includes
+#include "../Utils/senfassert.hh"
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
prefix_ senf::PacketInterpreterBase::ptr senf::Packet::ptr()
const
{
- BOOST_ASSERT(packet_);
+ SENF_ASSERT(packet_);
return packet_;
}
\brief PacketData inline non-template implementation */
// Custom includes
+#include "../Utils/senfassert.hh"
#include <iterator>
#include "PacketImpl.hh"
#include "PacketParser.hh"
prefix_ senf::PacketData::iterator senf::PacketData::begin()
const
{
- BOOST_ASSERT(begin_ <= impl().size());
+ SENF_ASSERT(begin_ <= impl().size());
return boost::next(impl().begin(),begin_);
}
prefix_ senf::PacketData::iterator senf::PacketData::end()
const
{
- BOOST_ASSERT(end_ <= impl().size());
+ SENF_ASSERT(end_ <= impl().size());
return boost::next(impl().begin(),end_);
}
prefix_ senf::PacketData::byte senf::PacketData::operator[](size_type n)
const
{
- BOOST_ASSERT( n < size() );
+ SENF_ASSERT( n < size() );
return *( boost::next(begin(),n) );
}
prefix_ senf::PacketData::byte & senf::PacketData::operator[](size_type n)
{
- BOOST_ASSERT( n < size() );
+ SENF_ASSERT( n < size() );
return *( boost::next(begin(),n) );
}
prefix_ senf::detail::PacketImpl & senf::PacketData::impl()
const
{
- BOOST_ASSERT( impl_ );
+ SENF_ASSERT( impl_ );
return *impl_;
}
prefix_ senf::safe_data_iterator & senf::safe_data_iterator::operator=(PacketData::iterator i)
{
- BOOST_ASSERT(data_);
+ SENF_ASSERT(data_);
i_ = std::distance(data_->begin(),i);
return *this;
}
prefix_ senf::PacketData & senf::safe_data_iterator::data()
const
{
- BOOST_ASSERT(data_);
+ SENF_ASSERT(data_);
return *data_;
}
prefix_ bool senf::safe_data_iterator::equal(safe_data_iterator const & other)
const
{
- BOOST_ASSERT(data_ == other.data_);
+ SENF_ASSERT(data_ == other.data_);
return i_ == other.i_;
}
senf::safe_data_iterator::distance_to(safe_data_iterator const & other)
const
{
- BOOST_ASSERT(data_ == other.data_);
+ SENF_ASSERT(data_ == other.data_);
return other.i_ - i_;
}
prefix_ void senf::safe_data_iterator::decrement()
{
- BOOST_ASSERT(i_>0);
+ SENF_ASSERT(i_>0);
--i_;
}
prefix_ void senf::safe_data_iterator::advance(difference_type n)
{
- BOOST_ASSERT( -n < difference_type(i_) );
+ SENF_ASSERT( -n < difference_type(i_) );
i_ += n;
}
prefix_ senf::PacketData::iterator senf::safe_data_iterator::i()
const
{
- BOOST_ASSERT(data_);
+ SENF_ASSERT(data_);
return boost::next(data_->begin(),i_);
}
\brief PacketImpl inline non-template implementation */
// Custom includes
+#include "../Utils/senfassert.hh"
#include "PacketInterpreter.hh"
#define prefix_ inline
prefix_ void senf::detail::PacketImpl::release(refcount_t n)
{
- BOOST_ASSERT(refcount_ >= n);
+ SENF_ASSERT(refcount_ >= n);
// uah ... we need to be extremely careful here. If refcount_ is n, we want to commit suicide,
// however the destructor will remove all PacketInterpreters from the list and will thereby
// decrement refcount -> only decrenebt refcount_ when *not* caling delete
BOOST_CHECK_EQUAL(p->refcount(), 0);
p->add_ref();
BOOST_CHECK_EQUAL(p->refcount(), 1);
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
BOOST_CHECK_EQUAL(
senf::pool_alloc_mixin<senf::detail::PacketImpl>::allocCounter(), 1u);
#endif
p,p->begin(),p->end(), senf::PacketInterpreterBase::Append));
// Hmm ... this check works as long as sizeof(PacketInterpreterBase> !=
// sizeof(PacketImpl) ... !!
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
BOOST_CHECK_EQUAL(
senf::pool_alloc_mixin< senf::PacketInterpreter<VoidPacket> >::allocCounter(), 1u);
#endif
p->truncateInterpreters(pi.get());
BOOST_CHECK_EQUAL(p->refcount(),1);
}
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
BOOST_CHECK_EQUAL(
senf::pool_alloc_mixin<senf::PacketInterpreterBase>::allocCounter(), 0u);
#endif
// Therefore we can safely delete the object.
BOOST_CHECK_EQUAL(p->refcount(), 1);
p->release();
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
BOOST_CHECK_EQUAL(
senf::pool_alloc_mixin<senf::detail::PacketImpl>::allocCounter(), 0u);
#endif
BOOST_CHECK_EQUAL(p->refcount(), 1);
p->release();
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
BOOST_CHECK_EQUAL(
senf::pool_alloc_mixin<senf::detail::PacketImpl>::allocCounter(), 0u);
#endif
\brief PacketInterpreter inline non-template implementation */
// Custom includes
+#include "../Utils/senfassert.hh"
#include <boost/utility.hpp>
#define prefix_ inline
prefix_ void senf::PacketInterpreterBase::assignImpl(detail::PacketImpl * impl)
{
- BOOST_ASSERT(!impl_);
+ SENF_ASSERT(!impl_);
impl_ = impl;
impl_->add_ref(refcount());
}
prefix_ void senf::PacketInterpreterBase::releaseImpl()
{
- BOOST_ASSERT(impl_);
+ SENF_ASSERT(impl_);
refcount_t refc (refcount());
if (refc) {
impl_->release(refc);
return i_;
}
-prefix_ data_iterator senf::PacketParserBase::i(size_type offset)
+prefix_ senf::PacketParserBase::data_iterator senf::PacketParserBase::i(size_type offset)
const
{
validate(offset);
#include "PacketParser.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include "PacketData.hh"
#define prefix_ inline
prefix_ Parser senf::SafePacketParserWrapper<Parser>::operator*()
const
{
- BOOST_ASSERT( i_ );
+ SENF_ASSERT( i_ );
parser_->i_ = PacketParserBase::data_iterator(i_);
return *parser_;
}
prefix_ Parser const * senf::SafePacketParserWrapper<Parser>::operator->()
const
{
- BOOST_ASSERT( i_ );
+ SENF_ASSERT( i_ );
parser_->i_ = PacketParserBase::data_iterator(i_);
return & (*parser_);
}
#include "PacketRegistry.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include <iostream>
#define prefix_
template <class PacketType>
prefix_ void senf::detail::PacketRegistryImpl<KeyType>::registerPacket(key_t key)
{
-#ifdef NDEBUG
+#ifdef SENF_NO_DEBUG
registry_.insert(std::make_pair(key, Entry_ptr(new detail::PkReg_EntryImpl<PacketType>())));
reverseRegistry_.insert(std::make_pair(senf::typeIdValue<PacketType>(), key));
#else
registry_.insert(
std::make_pair(key, Entry_ptr(new detail::PkReg_EntryImpl<PacketType>()))).second);
// If this assertion fails, a Packet was registered with an already known key
- BOOST_ASSERT( isUnique );
+ SENF_ASSERT( isUnique );
bool isNew (
reverseRegistry_.insert(
std::make_pair(senf::typeIdValue<PacketType>(), key)).second);
// If this assertion fails, the same Packet was registered with two different keys
- BOOST_ASSERT( isNew );
+ SENF_ASSERT( isNew );
#endif
}
#include "VariantParser.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include <boost/mpl/size.hpp>
#define prefix_ inline
senf::VariantParser<VariantPolicy,SENF_PARSE_VARIANT_TPL_ARGS(P)>::get()
const
{
- BOOST_ASSERT( variant() == N );
+ SENF_ASSERT( variant() == N );
return typename boost::mpl::at<parsers, boost::mpl::int_<N> >::type(
VariantPolicy::begin(i(), state()), state() );
}
except OSError: return False
def checkLocalConf(target, source, env):
- if [ True for f in env['CONFIG_FILES'] if nonemptyFile(f) ]:
+ if [ True for f in env['LOCAL_CONFIG_FILES'] if nonemptyFile(f) ]:
print
print "You have made local modifications to one of the following local configuration"
print "files:"
- for f in env['CONFIG_FILES']:
+ for f in env['LOCAL_CONFIG_FILES']:
print " ",f
print
print "Building a debian package would remove those files."
logname = pwd.getpwuid(os.getuid()).pw_name
def configFilesOpts(target, source, env, for_signature):
- return [ '-I%s' % os.path.split(f)[1] for f in env['CONFIG_FILES'] ]
+ return [ '-I%s' % os.path.split(f)[1] for f in env['LOCAL_CONFIG_FILES'] ]
env.Append(
CPPPATH = [ '#/include' ],
'CONCURRENCY_LEVEL' : env.GetOption('num_jobs') or "1",
'SCONS' : 1,
},
- CONFIG_FILES = [ 'Doxyfile.local', 'SConfig', 'local_config.hh' ],
+ LOCAL_CONFIG_FILES = [ 'Doxyfile.local', 'SConfig', 'local_config.hh' ],
CONFIG_FILES_OPTS = configFilesOpts,
CLEAN_PATTERNS = [ '*.pyc', 'semantic.cache', '.sconsign', '.sconsign.dblite' ],
BUILDPACKAGE_COMMAND = "dpkg-buildpackage -us -uc -rfakeroot -I.svn $CONFIG_FILES_OPTS",
//#include "Scheduler.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include <errno.h>
#include <sys/epoll.h>
#include <unistd.h>
if (mask & EPOLLERR) extraFlags |= EV_ERR;
if (mask & EPOLLIN) {
- BOOST_ASSERT(spec.cb_read);
+ SENF_ASSERT(spec.cb_read);
spec.cb_read(EventId(EV_READ | extraFlags));
}
else if (mask & EPOLLPRI) {
- BOOST_ASSERT(spec.cb_prio);
+ SENF_ASSERT(spec.cb_prio);
spec.cb_prio(EventId(EV_PRIO | extraFlags));
}
else if (mask & EPOLLOUT) {
- BOOST_ASSERT(spec.cb_write);
+ SENF_ASSERT(spec.cb_write);
spec.cb_write(EventId(EV_WRITE | extraFlags));
}
else {
//#include "FileHandle.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include <errno.h>
#include "../Utils/Exception.hh"
prefix_ senf::FileBody & senf::FileHandle::body()
{
- BOOST_ASSERT(body_);
+ SENF_ASSERT(body_);
return *body_;
}
prefix_ senf::FileBody const & senf::FileHandle::body()
const
{
- BOOST_ASSERT(body_);
+ SENF_ASSERT(body_);
return *body_;
}
//#include "ProtocolClientSocketHandle.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#define prefix_ inline
///////////////////////////////cti.p///////////////////////////////////////
prefix_ SocketProtocol const &
senf::ProtocolClientSocketHandle<SocketProtocol>::protocol()
{
- BOOST_ASSERT( dynamic_cast<SocketProtocol const *>(&this->body().protocol()) );
+ SENF_ASSERT( dynamic_cast<SocketProtocol const *>(&this->body().protocol()) );
// Need dynamic_cast here, since senf::SocketProtocol is a
// virtual base
return dynamic_cast<SocketProtocol const &>(this->body().protocol());
//#include "ProtocolServerSocketHandle.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include "ProtocolClientSocketHandle.hh"
#define prefix_ inline
prefix_ SocketProtocol const &
senf::ProtocolServerSocketHandle<SocketProtocol>::protocol()
{
- BOOST_ASSERT( dynamic_cast<SocketProtocol const *>(&this->body().protocol()) );
+ SENF_ASSERT( dynamic_cast<SocketProtocol const *>(&this->body().protocol()) );
// Need dynamic_cast here, since senf::SocketProtocol is a
// virtual base
return dynamic_cast<SocketProtocol const &>(this->body().protocol());
#include <net/if.h>
#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
+#include "../../../Utils/senfassert.hh"
//#include "INetAddressing.mpp"
#define prefix_
if (sockaddr_.sin6_scope_id == 0)
return "";
char buffer[IFNAMSIZ];
-#ifndef NDEBUG
- BOOST_ASSERT( if_indextoname(sockaddr_.sin6_scope_id,buffer) );
+#ifndef SENF_NO_DEBUG
+ SENF_ASSERT( if_indextoname(sockaddr_.sin6_scope_id,buffer) );
#else
if_indextoname(sockaddr_.sin6_scope_id,buffer);
#endif
#include "SocketHandle.ih"
// Custom includes
+#include "../Utils/senfassert.hh"
#include "../Utils/Exception.hh"
#include "SocketProtocol.hh"
bool isServer)
: protocol_(protocol), isServer_(isServer)
{
- BOOST_ASSERT( ! protocol_->body_ );
+ SENF_ASSERT( ! protocol_->body_ );
protocol_->body_ = this;
}
bool isServer, int fd)
: FileBody(fd), protocol_(protocol), isServer_(isServer)
{
- BOOST_ASSERT( ! protocol_->body_ );
+ SENF_ASSERT( ! protocol_->body_ );
protocol_->body_ = this;
}
#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);
}
//#include "SocketProtocol.ih"
// Custom includes
-#include <boost/assert.hpp>
+#include <../Utils/senfassert.hh>
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
prefix_ void senf::SocketProtocol::fd(int fd)
const
{
- BOOST_ASSERT(! body().valid());
+ SENF_ASSERT(! body().valid());
body().fd(fd);
}
prefix_ senf::SocketBody & senf::SocketProtocol::body()
const
{
- BOOST_ASSERT( body_ );
+ SENF_ASSERT( body_ );
return *body_;
}
return e.code;
}
-#ifdef NDEBUG
+#ifdef SENF_NO_DEBUG
catch (std::exception & e) {
std::cerr << "\n*** Fatal exception: " << e.what() << std::endl;
//#include "intrusive_refcount.ih"
// Custom includes
-#include <boost/assert.hpp>
+#include "senfassert.hh"
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
prefix_ bool senf::intrusive_refcount_base::release()
{
- BOOST_ASSERT(refcount_>0);
+ SENF_ASSERT(refcount_>0);
return --refcount_ == 0;
}
//#include "pool_alloc_mixin.ih"
// Custom includes
-#include <boost/assert.hpp>
+#include <../Utils/senfassert.hh>
#define prefix_ inline
///////////////////////////////cti.p///////////////////////////////////////
{
// When deriving from Self you may not change the class's size without
// inheriting from pool_alloc_mixin again. See pool_alloc_mixin documentation.
- BOOST_ASSERT( size <= sizeof(Self) );
-#ifndef NDEBUG
+ SENF_ASSERT( size <= sizeof(Self) );
+#ifndef SENF_NO_DEBUG
allocCounter(1);
#endif
return boost::singleton_pool< pool_alloc_mixin_tag, sizeof(Self) >::malloc();
template <class Self>
prefix_ void senf::pool_alloc_mixin<Self>::operator delete(void * p, size_t size)
{
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
allocCounter(-1);
#endif
boost::singleton_pool< pool_alloc_mixin_tag, sizeof(Self) >::free(p);
}
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
template <class Self>
prefix_ unsigned long senf::pool_alloc_mixin<Self>::allocCounter()
static void operator delete (void *p, size_t size);
///< Operator delete utilizing pool allocation
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
static unsigned long allocCounter();
private:
static unsigned long allocCounter(long delta);
BOOST_AUTO_UNIT_TEST(poolAllocMixin)
{
-#ifndef NDEBUG
+#ifndef SENF_NO_DEBUG
BOOST_CHECK_EQUAL( Test::allocCounter(), 0u );
{
--- /dev/null
+// $Id$
+//
+// Copyright (C) 2008
+// 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
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the
+// Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/** \file
+ \brief senfassert public header */
+
+#ifndef HH_senfassert_
+#define HH_senfassert_ 1
+
+// Custom includes
+#include "../Utils/senfassert.hh"
+
+//#include "senfassert.mpp"
+///////////////////////////////hh.p////////////////////////////////////////
+
+#ifdef SENF_NO_DEBUG
+
+# define SENF_ASSERT(x)
+
+#else
+
+# include <cassert>
+# define SENF_ASSERT(x) assert(x)
+
+#endif
+
+///////////////////////////////hh.e////////////////////////////////////////
+//#include "senfassert.cci"
+//#include "senfassert.ct"
+//#include "senfassert.cti"
+#endif
+
+\f
+// Local Variables:
+// mode: c++
+// fill-column: 100
+// comment-column: 40
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// End:
-// $Id$
-//
-// Copyright (C) 2007
-// 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
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the
-// Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-/** \file
- \brief config public header */
-
-#ifndef HH_config_
-#define HH_config_ 1
-
-// Custom includes
-
-//#include "config.mpp"
-///////////////////////////////hh.p////////////////////////////////////////
-
+# // $Id$
+# //
+# // Copyright (C) 2007
+# // 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
+# // the Free Software Foundation; either version 2 of the License, or
+# // (at your option) any later version.
+# //
+# // This program is distributed in the hope that it will be useful,
+# // but WITHOUT ANY WARRANTY; without even the implied warranty of
+# // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# // GNU General Public License for more details.
+# //
+# // You should have received a copy of the GNU General Public License
+# // along with this program; if not, write to the
+# // Free Software Foundation, Inc.,
+# // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# /** \file
+# \brief config public header */
+#
+# ifndef HH_config_
+# define HH_config_ 1
+#
+# // Custom includes
+#
+# ///////////////////////////////hh.p////////////////////////////////////////
+#
# include "local_config.hh"
-
+#
# ifndef SENF_ABSOLUTE_INCLUDE_PATH
# define SENF_ABSOLUTE_INCLUDE_PATH(senf_relative_include_file_path) <senf/senf_relative_include_file_path>
# endif
-
+#
# ifndef SENF_copy_n
# include <algorithm>
# if defined(__GNUC__) && ! defined(_STLP_ALGORITHM) && (__GNUC__>=4 || (__GNUC__==3 && __GNUC_MINOR__>=4))
# define SENF_copy_n std::copy_n
# endif
# endif
-
+#
# ifndef SENF_MPL_RV_ALIGNMENT
# define SENF_MPL_RV_ALIGNMENT 16
# endif
-
+#
# if !defined(SENF_BUFFER_USE_LOCALS) && !defined(SENF_BUFFER_USE_ALLOCA) && !defined(SENF_BUFFER_USE_NEW)
#
# if defined(__GNUC__)
# endif
#
# endif
-
+#
# ifndef SENF_SENFLOG_LIMIT
-# define SENF_SENFLOG_LIMIT senf::log::VERBOSE
+# ifdef SENF_NO_DEBUG
+# define SENF_SENFLOG_LIMIT senf::log::IMPORTANT
+# else
+# define SENF_SENFLOG_LIMIT senf::log::VERBOSE
+# endif
+# endif
+#
+# ///////////////////////////////hh.e////////////////////////////////////////
# endif
-
-///////////////////////////////hh.e////////////////////////////////////////
-//#include "config.cci"
-//#include "config.ct"
-//#include "config.cti"
-#endif
-
+
\f
// Local Variables:
// mode: c++
// ispell-local-dictionary: "american"
// compile-command: "scons -u all_tests"
// End:
+
aListCollection
alloc
API
-API's
arg
argc
args
if env['final']:
env.Append(CXXFLAGS = [ '-O3' ],
- CPPDEFINES = [ 'NDEBUG' ])
+ CPPDEFINES = [ 'SENF_NO_DEBUG' ])
else:
env.Append(CXXFLAGS = [ '-O0', '-g', '-fno-inline' ],
# The boost-regex library is not compiled with _GLIBCXX_DEBUG so this fails.