13
0
livetrax/libs/pbd/pbd
Tim Mayberry c634daef6a Add locale independent and thread safe string conversion API with tests
All conversions are performed as if in the "C" locale but without actually
changing locale.

This is a wrapper around printf/sscanf for int types which aren't affected by
locale and uses glib functions g_ascii_strtod and g_ascii_dtostr for
float/double types.

My first attempt at this used std::stringstream and
ios::imbue(std::locale::classic()) as it should be thread safe, but testing
shows it is not for gcc/mingw-w64 on Windows, and possibly also some versions
of macOS/OS X.

Use "yes" and "no" when converting a boolean in PBD::string_to<bool> as this
seems to be the convention used throughout libardour which will allow using
string_to<bool> in those cases.

Add accepted bool string values from PBD::string_is_affirmative to
PBD::string_to<bool>

Mark strings in pbd/string_convert.cc as not for translation

Add u/int16_t string conversions to pbd/string_convert.h and tests

Add DEBUG_TRACE output on conversion errors

Add int8_t/uint8_t conversions(using int16/uint16 types) to string_convert.h

Add support for converting an infinity expression to/from string

Follows the C99/C11 standard for strtof/strtod where subject sequence is an
optional plus or minus sign then INF or INFINITY, ignoring case.
2017-04-16 14:02:41 +10:00
..
.DS_Store
abstract_ui.cc Free dead request-buffers 2017-01-20 13:53:59 +01:00
abstract_ui.h Free dead request-buffers 2017-01-20 13:53:59 +01:00
atomic_counter.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
base_ui.h move BaseUI::_name into EventLoop; rename access method in EventLoop as event_loop_name() to clarify usage 2015-12-12 11:12:10 -05:00
basename.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
boost_debug.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
cartesian.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
command.h some strategic documentation 2016-04-12 17:03:44 +02:00
compose.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
configuration_variable.h syncing with upstream 2017-01-05 09:24:40 +00:00
configuration.h
controllable.h add new API to PBD::Controllable, ::get_save_value() 2017-02-06 16:49:08 +01:00
convert.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
cpus.h
crossthread.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
debug_rt_alloc.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
debug.h Add PBD::DEBUG::StringConvert debug bit 2017-04-16 14:02:41 +10:00
demangle.h Don't indent inside namespace declaration to be consistent with ardour style 2015-12-01 14:22:38 +10:00
destructible.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
enumwriter.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
epa.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
error.h
event_loop.h Silence -Wunused-value 2017-04-16 00:15:53 +02:00
failed_constructor.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
fastlog.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
ffs.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
file_archive.h add API to create [tar.xz] archives 2016-09-19 11:33:07 +02:00
file_utils.h Move PBD::canonical_path to pbd/file_utils.h/cc and reimplement for Windows 2016-09-19 14:47:52 +10:00
floating.h Enable build for FreeBSD (part 1/2) 2016-06-26 16:43:07 +02:00
forkexec.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
fpu.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
functor_command.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
gstdio_compat.h fix g_lstat() 2015-09-17 15:01:26 +02:00
i18n.h enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
id.h some strategic documentation 2016-04-12 17:03:44 +02:00
libpbd_visibility.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
locale_guard.h redesign PBD::LocaleGuard to work correctly (i.e. not break translations) 2016-07-14 11:37:48 -04:00
localtime_r.h
malign.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
mathfix.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
md5.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
memento_command.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
mountpoint.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
msvc_pbd.h Remove a JE addition to one of the qm-dsp source files (no longer needed) 2017-02-06 09:47:10 +00:00
natsort.h prevent duplicate symbols (fix OSX compilation) 2016-07-14 23:11:11 +02:00
openuri.h allot to open OSX Finder with arbitrary paths 2016-02-17 16:29:25 +01:00
pathexpand.h
pbd.h
pool.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
properties.h OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
property_basics_impl.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
property_basics.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
property_list_impl.h
property_list.h Fix indentation and make comment style consistent in PBD::PropertyList header 2017-04-16 14:02:03 +10:00
pthread_utils.h redesign cross-thread registration/signalling system 2015-12-28 10:14:17 -05:00
rcu.h
reallocpool.h don't collect rt-mempoll statistics anymore (by default) 2016-04-03 23:54:53 +02:00
receiver.h change PBD::Transmitter code to use PBD::Signal<> not sigc::signal<>, since the latter is not thread safe 2016-08-14 08:33:23 -04:00
replace_all.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
resource.h
ringbuffer.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
ringbufferNPT.h add a single-element ring-buffer write function 2016-07-10 15:56:18 +02:00
scoped_file_descriptor.h
search_path.h Add PBD::Searchpath::contains method to check if a Searchpath contains a path 2015-10-22 11:51:03 -04:00
selectable.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
semutils.h rename ProcessSemaphore to Semaphore (libs) 2015-12-02 20:18:48 +01:00
sequence_property.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
shortpath.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
signals.h store InvalidationRecord in a Connection object and ref/unref it as appropriate 2016-12-15 16:36:50 +00:00
signals.py store InvalidationRecord in a Connection object and ref/unref it as appropriate 2016-12-15 16:36:50 +00:00
stacktrace.h Move PBD symbol demangle functions into pbd/demangle.h/cc 2015-12-01 14:22:38 +10:00
stateful_diff_command.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
stateful.h add API to query stateful ID override mode 2015-12-17 23:18:22 +01:00
statefuldestructible.h Add a few class documentations to override inherited doc. 2016-03-31 01:16:07 +02:00
stl_delete.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
stl_functors.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
string_convert.h Add locale independent and thread safe string conversion API with tests 2017-04-16 14:02:41 +10:00
strsplit.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
system_exec.h Enable build for FreeBSD (part 1/2) 2016-06-26 16:43:07 +02:00
textreceiver.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
thrown_error.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
timer.h add API to suspend timers signal emission. 2015-10-30 15:55:26 +01:00
timersub.h
timing.h Add PBD::Timing::elapsed_msecs() as convenience API 2016-10-10 08:45:33 +10:00
tlsf.h re-add TLSF 2016-07-19 15:03:51 +02:00
tokenizer.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
touchable.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
transmitter.h change PBD::Transmitter code to use PBD::Signal<> not sigc::signal<>, since the latter is not thread safe 2016-08-14 08:33:23 -04:00
undo.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
unknown_type.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
unwind.h NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
uuid_boost.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
uuid.h
whitespace.h globally remove all trailing whitespace from ardour code base. 2015-10-04 14:51:05 -04:00
windows_mmcss.h Make sure that those recently moved functions will be visible if they're needed outside of libpbd 2015-09-18 10:27:27 +01:00
windows_special_dirs.h Change return type and name of get_win_special_folder 2015-08-18 15:33:03 +10:00
windows_timer_utils.h Make sure that those recently moved functions will be visible if they're needed outside of libpbd 2015-09-18 10:27:27 +01:00
xml++.h Allow to construct a XML tree from a text buffer 2016-10-29 19:57:43 +02:00