Search:

SENF Extensible Network Framework

  • Home
  • Download
  • Wiki
  • BerliOS
  • ChangeLog
  • Browse SVN
  • Bug Tracker
  • Overview
  • Examples
  • HowTos
  • Glossary
  • PPI
  • Packets
  • Scheduler
  • Socket
  • Utils
  • Console
  • Daemon
  • Logger
  • Termlib
  • Main Page
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

Log.hh

Go to the documentation of this file.
00001 // $Id: Log.hh 1742 2010-11-04 14:51:56Z g0dil $
00002 //
00003 // Copyright (C) 2007
00004 // Fraunhofer (FOKUS)
00005 // Competence Center NETwork research (NET), St. Augustin, GERMANY
00006 //     Stefan Bund <g0dil@berlios.de>
00007 //
00008 // This program is free software; you can redistribute it and/or modify
00009 // it under the terms of the GNU General Public License as published by
00010 // the Free Software Foundation; either version 2 of the License, or
00011 // (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the
00020 // Free Software Foundation, Inc.,
00021 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00026 #ifndef HH_SENF_Utils_Logger_Log_
00027 #define HH_SENF_Utils_Logger_Log_ 1
00028 
00029 // Custom includes
00030 #include <boost/preprocessor/seq/size.hpp>
00031 #include <boost/preprocessor/dec.hpp>
00032 #include <boost/preprocessor/seq/elem.hpp>
00033 #include <boost/preprocessor/seq/pop_back.hpp>
00034 #include "Parameters.hh"
00035 
00036 //#include "Log.mpp"
00037 #include "Log.ih"
00038 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00039 
00095 
00096 //\{
00097 
00099 //\{
00100 
00112 #define SENF_LOG(args)                                                                            \
00113     SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS(BOOST_PP_SEQ_POP_BACK(args)),                      \
00114                      { log << BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args); })
00115 
00122 #define SENF_LOG_TPL(args)                                                                        \
00123     SENF_LOG_BLOCK_TPL_( SENF_LOG_MERGE_PARAMETERS_TPL(BOOST_PP_SEQ_POP_BACK(args)),              \
00124                          { log << BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args); })
00125 
00139 #define SENF_LOG_BLOCK(args)                                                                      \
00140     SENF_LOG_BLOCK_( SENF_LOG_MERGE_PARAMETERS(BOOST_PP_SEQ_POP_BACK(args)),                      \
00141                      BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args))
00142 
00149 #define SENF_LOG_BLOCK_TPL(args)                                                                  \
00150     SENF_LOG_BLOCK_TPL_( SENF_LOG_MERGE_PARAMETERS_TPL(BOOST_PP_SEQ_POP_BACK(args)),              \
00151                          BOOST_PP_SEQ_ELEM(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(args)),args))
00152 
00153 //\}
00154 //\}
00155 
00156 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00157 //#include "Log.cci"
00158 //#include "Log.ct"
00159 //#include "Log.cti"
00160 #endif
00161 
00162 
00163 // Local Variables:
00164 // mode: c++
00165 // fill-column: 100
00166 // comment-column: 40
00167 // c-file-style: "senf"
00168 // indent-tabs-mode: nil
00169 // ispell-local-dictionary: "american"
00170 // compile-command: "scons -u test"
00171 // End:

Contact: senf-dev@lists.berlios.de | © 2006-2010 Fraunhofer Institute for Open Communication Systems, Network Research