13
0
livetrax/libs/audiographer/audiographer/debug_utils.h
John Emmas b855e5f322 Merge remote-tracking branch 'remotes/origin/exportvis' into windows+cc
Conflicts (hopefully resolved):
	gtk2_ardour/wscript
	libs/ardour/ardour/audioregion.h
	libs/ardour/ardour/debug.h
	libs/ardour/ardour/directory_names.h
	libs/ardour/ardour/filesystem_paths.h
	libs/ardour/ardour/session_event.h
	libs/gtkmm2ext/gtkmm2ext/utils.h
	libs/panners/1in2out/wscript
	libs/panners/2in2out/wscript
	libs/panners/vbap/wscript
	libs/pbd/pbd/debug.h
	libs/pbd/pbd/file_utils.h
	libs/pbd/pbd/pathexpand.h
	libs/pbd/pbd/ringbuffer.h
	libs/pbd/pbd/ringbufferNPT.h
	libs/pbd/pbd/search_path.h
	libs/pbd/pbd/stacktrace.h
	libs/pbd/pbd/uuid.h
	libs/pbd/pbd/uuid_boost.h
	libs/surfaces/control_protocol/control_protocol/basic_ui.h
	libs/surfaces/control_protocol/control_protocol/control_protocol.h
2013-10-18 10:03:22 +01:00

45 lines
868 B
C++

#ifndef AUDIOGRAPHER_DEBUG_UTILS_H
#define AUDIOGRAPHER_DEBUG_UTILS_H
#include "flag_field.h"
#include <cstdlib>
#include <string>
#ifdef __GNUC__
#include <cxxabi.h>
#include <cstdlib>
#endif
#include "audiographer/visibility.h"
namespace AudioGrapher
{
/// Utilities for debugging
struct LIBAUDIOGRAPHER_API DebugUtils
{
/// Returns the demangled name of the object passed as the parameter
template<typename T>
static std::string demangled_name (T const & obj)
{
#ifdef __GNUC__
int status;
char * res = abi::__cxa_demangle (typeid(obj).name(), 0, 0, &status);
if (status == 0) {
std::string s(res);
std::free (res);
return s;
}
#endif
return typeid(obj).name();
}
/// Returns name of ProcessContext::Flag
static std::string process_context_flag_name (FlagField::Flag flag);
};
} // namespace
#endif // AUDIOGRAPHER_DEBUG_UTILS_H