From f7f9d6fdc40248b190ec9c6e1a886261d55777ae Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Oct 2007 22:07:47 +0000 Subject: merge from 2.0-ongoing by hand, minus key binding editor git-svn-id: svn://localhost/ardour2/trunk@2539 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/pbd/pbd/convert.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libs/pbd/pbd/convert.h') diff --git a/libs/pbd/pbd/convert.h b/libs/pbd/pbd/convert.h index 00176659cf..83cd285098 100644 --- a/libs/pbd/pbd/convert.h +++ b/libs/pbd/pbd/convert.h @@ -22,6 +22,9 @@ #include #include +#include +#include +#include namespace PBD { @@ -30,6 +33,7 @@ std::string short_version (std::string, std::string::size_type target_length); int atoi (const std::string&); double atof (const std::string&); void url_decode (std::string&); +void url_decode (Glib::ustring&); // std::string length2string (const int32_t frames, const float sample_rate); std::string length2string (const int64_t frames, const double sample_rate); @@ -37,6 +41,14 @@ std::string length2string (const int64_t frames, const double sample_rate); std::vector internationalize (const char *, const char **); bool strings_equal_ignore_case (const std::string& a, const std::string& b); +template std::string +to_string (T t, std::ios_base & (*f)(std::ios_base&)) +{ + std::ostringstream oss; + oss << f << t; + return oss.str(); +} + } //namespace PBD #endif /* __pbd_convert_h__ */ -- cgit v1.2.3