From: tho Date: Mon, 20 Sep 2010 10:05:32 +0000 (+0000) Subject: Packets/80221Bundle: swap out MIHMessageRegistry in own header file; documentation... X-Git-Url: http://g0dil.de/git?p=senf.git;a=commitdiff_plain;h=13d2e8af1e2516a2289949b8360f4e6a1c508720 Packets/80221Bundle: swap out MIHMessageRegistry in own header file; documentation still missing! Scons: clean up profile switch git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1718 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/SConstruct b/SConstruct index ebef9b9..6c16622 100644 --- a/SConstruct +++ b/SConstruct @@ -104,7 +104,8 @@ env.Append( INLINE_OPTS_NORMAL = [ '-finline-limit=5000', '--param', 'inline-unit-growth=60' ], INLINE_OPTS = [ '$INLINE_OPTS_NORMAL' ], CXXFLAGS = [ '-Wall', '-Woverloaded-virtual', '-Wno-long-long', '$INLINE_OPTS', - '-pipe', '$CXXFLAGS_', '-fno-strict-aliasing' ], + '-pipe', '$CXXFLAGS_', '-fno-strict-aliasing', + "${profile and '-pg' or None}" ], CXXFLAGS_final = [ '-O3' ], CXXFLAGS_normal = [ '-O2', '-g' ], CXXFLAGS_debug = [ '-O0', '-g' ], @@ -114,7 +115,7 @@ env.Append( CPPDEFINES_normal = [ 'SENF_DEBUG' ], CPPDEFINES_debug = [ '$CPPDEFINES_normal' ], - LINKFLAGS = [ '-rdynamic', '$LINKFLAGS_' ], + LINKFLAGS = [ '-rdynamic', '$LINKFLAGS_', "${profile and '-pg' or None}" ], LINKFLAGS_final = [ ], LINKFLAGS_normal = [ '-Wl,-S' ], LINKFLAGS_debug = [ '-g' ], @@ -157,14 +158,6 @@ senfutil.parseArguments( BoolVariable('sparse_tests', 'Link tests against object files and not the senf lib', False) ) -# gprof -if env['profile']: - env.Append( - LINKFLAGS = [ '-pg' ], - CXXFLAGS = [ '-pg' ], - ) - - # Add UNIX env vars matching IMPORT_ENV patterns into the execution environment senfutil.importProcessEnv(env) diff --git a/senf/Packets/80221Bundle/MIHMessageRegistry.hh b/senf/Packets/80221Bundle/MIHMessageRegistry.hh new file mode 100644 index 0000000..a22178e --- /dev/null +++ b/senf/Packets/80221Bundle/MIHMessageRegistry.hh @@ -0,0 +1,63 @@ +// $Id$ +// +// Copyright (C) 2009 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Thorsten Horstmann +// +// 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 MIH Message-Registry public header */ + +#ifndef HH_SENF_Packets_80221Bundle_MIHMessageRegistry_ +#define HH_SENF_Packets_80221Bundle_MIHMessageRegistry_ 1 + +// Custom includes +#include + +//#include "MIHPacket.mpp" +///////////////////////////////hh.p//////////////////////////////////////// + +namespace senf { + + struct MIHMessageRegistry { + // MIH messages registry + typedef boost::uint16_t key_t; + }; + +# define SENF_MIH_PACKET_REGISTRY_REGISTER( packet ) \ + SENF_PACKET_REGISTRY_REGISTER( \ + senf::MIHMessageRegistry, packet::type::MESSAGE_ID, packet ) + +} +///////////////////////////////hh.e//////////////////////////////////////// +//#include "MIHPacket.cci" +//#include "MIHPacket.ct" +//#include "MIHPacket.cti" +#endif + + + +// Local Variables: +// mode: c++ +// fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 +// End: diff --git a/senf/Packets/80221Bundle/MIHPacket.hh b/senf/Packets/80221Bundle/MIHPacket.hh index 227d7cd..1efe4b6 100644 --- a/senf/Packets/80221Bundle/MIHPacket.hh +++ b/senf/Packets/80221Bundle/MIHPacket.hh @@ -29,22 +29,13 @@ // Custom includes #include #include "TLVParser.hh" +#include "MIHMessageRegistry.hh" //#include "MIHPacket.mpp" ///////////////////////////////hh.p//////////////////////////////////////// namespace senf { - struct MIHMessageRegistry { - // MIH messages registry - typedef boost::uint16_t key_t; - }; - -# define SENF_MIH_PACKET_REGISTRY_REGISTER( packet ) \ - SENF_PACKET_REGISTRY_REGISTER( \ - senf::MIHMessageRegistry, packet::type::MESSAGE_ID, packet ) - - /** \brief Parse a MIH packet Parser implementing the MIH header. The fields implemented are: diff --git a/site_scons/senfutil.py b/site_scons/senfutil.py index 7217c84..1a2d4a1 100644 --- a/site_scons/senfutil.py +++ b/site_scons/senfutil.py @@ -210,19 +210,15 @@ def DefaultOptions(env): # Set nice default options env.Append( - CXXFLAGS = [ '-Wall', '-Woverloaded-virtual' ], + CXXFLAGS = [ '-Wall', '-Woverloaded-virtual', "${profile and '-pg' or None}" ], CXXFLAGS_final = [ '-O3' ], CXXFLAGS_normal = [ '-O2', '-g' ], CXXFLAGS_debug = [ '-O0', '-g' ], + LINKFLAGS = [ "${profile and '-pg' or None}" ], LINKFLAGS_normal = [ '-Wl,-S' ], LINKFLAGS_debug = [ '-g' ], ) - if env['profile']: - env.Append( - LINKFLAGS = [ '-pg' ], - CXXFLAGS = [ '-pg' ], - ) env.Alias('all', '#')