include/BDSDebug.hh

00001 #ifndef BDSDebug_h
00002 #define BDSDebug_h
00003 
00004 #include <stddef.h>
00005 #include <string>
00006 #include <stdio.h>
00007 #include <stdlib.h>
00008 
00009 inline std::string methodName(const std::string& prettyFunction)
00010 {
00011   size_t colons = prettyFunction.find("::");
00012   size_t begin = prettyFunction.substr(0,colons).rfind(" ") + 1;
00013   size_t end = prettyFunction.rfind("(") - begin;
00014   return prettyFunction.substr(begin,end) +"> ";
00015 }
00016 #define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__)
00017 
00018 
00019 #endif

Generated on 27 Aug 2013 for BDSIM by  doxygen 1.4.7