Ardour  9.0-pre0-582-g084a23a80d
PBD Namespace Reference

Namespaces

 DEBUG
 
 MMCSS
 
 MMTIMERS
 
 sys
 

Classes

class  PlaybackBuffer
 
class  atomic_counter
 
struct  CartesianVector
 
struct  AngularVector
 
class  Command
 
class  Configuration
 
class  ConfigVariableBase
 
class  ConfigVariable
 
class  ConfigVariable< std::string >
 
class  ConfigVariableWithMutation
 
class  ConfigVariableWithMutation< std::string >
 
class  Controllable
 
class  Destructible
 
class  Downloader
 
class  unknown_enumeration
 
class  EnumWriter
 
class  EnvironmentalProtectionAgency
 
class  EventLoop
 
class  FileArchive
 
union  Float_t
 
class  FPU
 
class  HistoryOwner
 
class  ID
 
class  Inflater
 
struct  LocaleGuard
 
class  MPMCQueue
 
class  PCGRand
 
class  Pool
 
class  SingleAllocMultiReleasePool
 
class  MultiAllocSingleReleasePool
 
class  CrossThreadPool
 
class  PerThreadPool
 
class  Progress
 
class  PropertyTemplate
 
class  Property
 
class  Property< std::string >
 
class  EnumProperty
 
class  SharedStatefulProperty
 
struct  PropertyDescriptor
 
class  PropertyChange
 
class  PropertyBase
 
class  PropertyList
 
class  OwnedPropertyList
 
class  Thread
 
class  ReallocPool
 
struct  ResourceLimit
 
class  RingBuffer
 
class  RingBufferNPT
 
struct  ScopedFileDescriptor
 
class  Searchpath
 
class  Semaphore
 
class  SequenceProperty
 
class  SignalBase
 
class  OptionalLastValue
 
class  SignalWithCombiner
 
class  SignalWithCombiner< Combiner, R(A...)>
 
class  Signal
 
class  Signal< R(A...)>
 
class  Connection
 
class  ScopedConnection
 
class  ScopedConnectionList
 
struct  spinlock_t
 
class  SpinLock
 
class  StackAllocator
 
class  thing_with_backtrace
 
class  Stateful
 
class  StatefulDiffCommand
 
class  StatefulDestructible
 
class  SystemExec
 execute an external command More...
 
class  Timer
 
class  StandardTimer
 
class  BlinkTimer
 
class  Timing
 
class  TimingStats
 
class  TimerRAII
 
class  WaitTimerRAII
 
class  TimingData
 
class  Timed
 
class  TLSF
 
class  UndoTransaction
 
class  UndoHistory
 
class  Unwinder
 
class  ExceptionSafeIncDec
 
class  UUID
 

Typedefs

typedef std::set< std::shared_ptr< Controllable > > ControllableSet
 
typedef std::bitset< 256 > DebugBits
 
typedef int64_t microseconds_t
 
typedef void(* PoolDumpCallback) (size_t, void *)
 
typedef GQuark PropertyID
 
typedef uint64_t rlimit_t
 
template<typename R >
using DefaultCombiner = OptionalLastValue< R >
 
typedef std::shared_ptr< ConnectionUnscopedConnection
 
typedef sigc::slot< void > UndoAction
 

Enumerations

enum  ResourceType { OpenFiles }
 

Functions

 DEFINE_ENUM_CONVERT (ARDOUR::Track::FreezeState)
 
 DEFINE_ENUM_CONVERT (ARDOUR::FollowAction::Type)
 
 DEFINE_ENUM_CONVERT (ARDOUR::Trigger::LaunchStyle)
 
 DEFINE_ENUM_CONVERT (ARDOUR::Trigger::StretchMode)
 
template<>
bool to_string (ARDOUR::AnyTime const &at, std::string &str)
 
template<>
bool string_to (std::string const &str, ARDOUR::AnyTime &at)
 
template<>
std::string to_string (ARDOUR::AnyTime at)
 
template<>
ARDOUR::AnyTime string_to (std::string const &str)
 
template<>
std::string to_string (ARDOUR::timepos_t val)
 
template<>
bool to_string (ARDOUR::timepos_t val, std::string &str)
 
template<>
bool string_to (std::string const &str, ARDOUR::timepos_t &val)
 
template<>
std::string to_string (ARDOUR::timecnt_t val)
 
template<>
bool to_string (ARDOUR::timecnt_t val, std::string &str)
 
template<>
bool string_to (std::string const &str, ARDOUR::timecnt_t &val)
 
template<>
bool to_string (ARDOUR::AutoState val, std::string &str)
 
template<>
bool string_to (const std::string &str, ARDOUR::AutoState &as)
 
template<>
bool to_string (ARDOUR::DataType val, std::string &str)
 
template<>
bool string_to (const std::string &str, ARDOUR::DataType &dt)
 
template<>
bool to_string (ARDOUR::FollowAction fa, std::string &str)
 
template<>
bool string_to (const std::string &str, ARDOUR::FollowAction &fa)
 
template<>
std::string to_string (ARDOUR::FollowAction fa)
 
template<typename T >
bool atomic_dec_and_test (std::atomic< T > &aval)
 
template<typename T >
void atomic_inc (std::atomic< T > &aval)
 
Glib::ustring basename_nosuffix (Glib::ustring)
 
void spherical_to_cartesian (double azi, double ele, double len, double &x, double &y, double &z)
 
void cartesian_to_spherical (double x, double y, double z, double &azi, double &ele, double &len)
 
std::string short_version (std::string, std::string::size_type target_length)
 
int atoi (const std::string &)
 
int32_t atol (const std::string &)
 
int64_t atoll (const std::string &)
 
double atof (const std::string &)
 
std::string url_decode (std::string const &)
 
std::string capitalize (const std::string &)
 
std::string downcase (const std::string &)
 
const char * downcase (const char *)
 
std::vector< std::string > upcase (char const *[])
 
std::string length2string (const int64_t samples, const double sample_rate)
 
std::vector< std::string > internationalize (const char *, const char **)
 
bool strings_equal_ignore_case (const std::string &a, const std::string &b)
 
const char * sgettext (const char *, const char *)
 
DebugBits new_debug_bit (const char *name)
 
void debug_print (const char *prefix, std::string str)
 
void debug_only_print (const char *prefix, std::string str)
 
void set_debug_bits (DebugBits bits)
 
int parse_debug_options (const char *str)
 
void list_debug_options ()
 
std::string demangle_symbol (const std::string &symbol)
 
std::string demangle (const std::string &str)
 
template<typename T >
std::string demangled_name (T const &obj)
 
int ffs (int x)
 
void get_paths (std::vector< std::string > &result, const Searchpath &paths, bool files_only=true, bool recurse=false)
 
void get_files (std::vector< std::string > &result, const Searchpath &paths)
 
void find_files_matching_pattern (std::vector< std::string > &result, const Searchpath &paths, const Glib::PatternSpec &pattern)
 
void find_files_matching_pattern (std::vector< std::string > &result, const Searchpath &paths, const std::string &pattern)
 
bool find_file (const Searchpath &search_path, const std::string &filename, std::string &result)
 
void find_files_matching_regex (std::vector< std::string > &results, const Searchpath &paths, const std::string &regexp, bool recurse=false)
 
void find_paths_matching_filter (std::vector< std::string > &results, const Searchpath &paths, bool(*filter)(const std::string &, void *), void *arg, bool pass_fullpath, bool return_fullpath, bool recurse=false)
 
void find_files_matching_filter (std::vector< std::string > &results, const Searchpath &paths, bool(*filter)(const std::string &, void *), void *arg, bool pass_fullpath, bool return_fullpath, bool recurse=false)
 
bool copy_file (const std::string &from_path, const std::string &to_path)
 
void copy_files (const std::string &from_path, const std::string &to_dir)
 
void copy_recurse (const std::string &from_path, const std::string &to_dir, bool preseve_timestamps=false)
 
bool touch_file (const std::string &path)
 
bool hard_link (const std::string &existing_file, const std::string &new_path)
 
std::string get_absolute_path (const std::string &)
 
std::string canonical_path (const std::string &path)
 
std::string get_suffix (const std::string &)
 
bool path_is_within (const std::string &, std::string)
 
bool equivalent_paths (const std::string &p1, const std::string &p2)
 
bool exists_and_writable (const std::string &p)
 
int clear_directory (const std::string &dir, size_t *size=0, std::vector< std::string > *removed_files=0)
 
void remove_directory (const std::string &dir)
 
std::string tmp_writable_directory (const char *domain, const std::string &prefix)
 
int toggle_file_existence (std::string const &path)
 
static bool floateq (float a, float b, int max_ulps_diff)
 
int64_t muldiv_round (int64_t v, int64_t n, int64_t d)
 
int64_t muldiv_floor (int64_t v, int64_t n, int64_t d)
 
static bool match_search_strings (std::string const &haystack, std::string const &needle)
 
microseconds_t get_microseconds ()
 
void microsecond_timer_init ()
 
bool is_integer (const char *i)
 
int64_t order_of_magnitude (const char *i)
 
bool numerically_less (const char *a, const char *b)
 
int natcmp (const char *a, const char *b)
 
bool naturally_less (const char *a, const char *b)
 
bool open_uri (const char *)
 
bool open_uri (const std::string &)
 
bool open_folder (const std::string &)
 
std::string path_expand (std::string path)
 
std::string search_path_expand (std::string path)
 
std::vector< std::string > parse_path (std::string path, bool check_if_exists=false)
 
bool init ()
 
void cleanup ()
 
template<class T >
std::ostream & operator<< (std::ostream &os, PropertyTemplate< T > const &s)
 
void notify_event_loops_about_thread_creation (pthread_t, const std::string &, int requests=256)
 
bool get_resource_limit (ResourceType resource, ResourceLimit &limit)
 
bool set_resource_limit (ResourceType resource, const ResourceLimit &limit)
 
void export_search_path (const std::string &base_dir, const char *varname, const char *dir)
 
void stacktrace (std::ostream &out, int levels=0, size_t start_level=0)
 
void trace_twb ()
 
bool bool_to_string (bool val, std::string &str)
 
bool int16_to_string (int16_t val, std::string &str)
 
bool uint16_to_string (uint16_t val, std::string &str)
 
bool int32_to_string (int32_t val, std::string &str)
 
bool uint32_to_string (uint32_t val, std::string &str)
 
bool int64_to_string (int64_t val, std::string &str)
 
bool uint64_to_string (uint64_t val, std::string &str)
 
bool float_to_string (float val, std::string &str)
 
bool double_to_string (double val, std::string &str)
 
bool string_to_bool (const std::string &str, bool &val)
 
bool string_to_int16 (const std::string &str, int16_t &val)
 
bool string_to_uint16 (const std::string &str, uint16_t &val)
 
bool string_to_int32 (const std::string &str, int32_t &val)
 
bool string_to_uint32 (const std::string &str, uint32_t &val)
 
bool string_to_int64 (const std::string &str, int64_t &val)
 
bool string_to_uint64 (const std::string &str, uint64_t &val)
 
bool string_to_float (const std::string &str, float &val)
 
bool string_to_double (const std::string &str, double &val)
 
template<class T >
bool to_string (T val, std::string &str)
 
template<class T >
bool to_string (bool val, std::string &str)
 
template<class T >
bool to_string (int8_t val, std::string &str)
 
template<class T >
bool to_string (uint8_t val, std::string &str)
 
template<class T >
bool to_string (int16_t val, std::string &str)
 
template<class T >
bool to_string (uint16_t val, std::string &str)
 
template<class T >
bool to_string (int32_t val, std::string &str)
 
template<class T >
bool to_string (uint32_t val, std::string &str)
 
template<class T >
bool to_string (int64_t val, std::string &str)
 
template<class T >
bool to_string (uint64_t val, std::string &str)
 
template<class T >
bool to_string (float val, std::string &str)
 
template<class T >
bool to_string (double val, std::string &str)
 
template<class T >
bool string_to (const std::string &str, T &val)
 
template<class T >
bool string_to (const std::string &str, bool &val)
 
template<class T >
bool string_to (const std::string &str, int8_t &val)
 
template<class T >
bool string_to (const std::string &str, uint8_t &val)
 
template<class T >
bool string_to (const std::string &str, int16_t &val)
 
template<class T >
bool string_to (const std::string &str, uint16_t &val)
 
template<class T >
bool string_to (const std::string &str, int32_t &val)
 
template<class T >
bool string_to (const std::string &str, uint32_t &val)
 
template<class T >
bool string_to (const std::string &str, int64_t &val)
 
template<class T >
bool string_to (const std::string &str, uint64_t &val)
 
template<class T >
bool string_to (const std::string &str, float &val)
 
template<class T >
bool string_to (const std::string &str, double &val)
 
template<class T >
std::string to_string (T val)
 
template<>
std::string to_string (bool val)
 
template<>
std::string to_string (int8_t val)
 
template<>
std::string to_string (uint8_t val)
 
template<>
std::string to_string (int16_t val)
 
template<>
std::string to_string (uint16_t val)
 
template<>
std::string to_string (int32_t val)
 
template<>
std::string to_string (uint32_t val)
 
template<>
std::string to_string (int64_t val)
 
template<>
std::string to_string (uint64_t val)
 
template<>
std::string to_string (float val)
 
template<>
std::string to_string (double val)
 
bool get_min_max_avg_total (const std::vector< microseconds_t > &values, microseconds_t &min, microseconds_t &max, microseconds_t &avg, microseconds_t &total)
 
std::string timing_summary (const std::vector< microseconds_t > &values)
 
template<typename StringType , typename Iter >
unsigned int tokenize (const StringType &str, const StringType &delims, Iter it, bool strip_whitespace=false)
 
template<>
bool to_string (ID val, std::string &str)
 
template<>
bool string_to (const std::string &str, ID &val)
 
template<>
std::string to_string (ID val)
 
std::string sanitize_utf8 (std::string const &)
 
void strip_whitespace_edges (std::string &str)
 
void remove_extra_whitespace (std::string const &in, std::string &out)
 
std::string get_win_special_folder_path (int csidl)
 
bool windows_query_registry (const char *regkey, const char *regval, std::string &rv, HKEY root=HKEY_LOCAL_MACHINE)
 
template<>
bool to_string (Temporal::BBT_Time val, std::string &str)
 
template<>
std::string to_string (Temporal::BBT_Time val)
 
template<>
bool string_to (std::string const &str, Temporal::BBT_Time &val)
 
template<>
bool to_string (Temporal::BBT_Offset val, std::string &str)
 
template<>
std::string to_string (Temporal::BBT_Offset val)
 
template<>
bool string_to (std::string const &str, Temporal::BBT_Offset &val)
 
template<>
bool to_string (Temporal::Beats val, std::string &str)
 
template<>
bool string_to (std::string const &str, Temporal::Beats &val)
 
 DEFINE_ENUM_CONVERT (Temporal::Tempo::Type)
 

Variables

DebugBits debug_bits
 
Transmitter debug
 
Transmitter info
 
Transmitter warning
 
Transmitter error
 
Transmitter fatal
 
PBD::Signal< void(pthread_t, std::string, uint32_t)> ThreadCreatedWithRequestSize
 

Detailed Description

Locale independent and thread-safe string conversion utility functions.

All conversions are done as if they were performed in the C locale without actually changing the current locale.

Typedef Documentation

◆ ControllableSet

typedef std::set<std::shared_ptr<Controllable> > PBD::ControllableSet

Definition at line 41 of file controllable.h.

◆ DebugBits

typedef std::bitset<256> PBD::DebugBits

Definition at line 41 of file libs/pbd/pbd/debug.h.

◆ DefaultCombiner

template<typename R >
using PBD::DefaultCombiner = typedef OptionalLastValue<R>

Definition at line 166 of file signals.h.

◆ microseconds_t

typedef int64_t PBD::microseconds_t

Definition at line 28 of file microseconds.h.

◆ PoolDumpCallback

typedef void(* PBD::PoolDumpCallback) (size_t, void *)

Definition at line 34 of file pool.h.

◆ PropertyID

typedef GQuark PBD::PropertyID

A unique identifier for a property of a Stateful object

Definition at line 37 of file property_basics.h.

◆ rlimit_t

typedef uint64_t PBD::rlimit_t

Definition at line 24 of file resource.h.

◆ UndoAction

typedef sigc::slot<void> PBD::UndoAction

Definition at line 43 of file undo.h.

◆ UnscopedConnection

typedef std::shared_ptr<Connection> PBD::UnscopedConnection

Definition at line 233 of file signals.h.

Enumeration Type Documentation

◆ ResourceType

Enumerator
OpenFiles 

Definition at line 26 of file resource.h.

Function Documentation

◆ atof()

double PBD::atof ( const std::string &  )

◆ atoi()

int PBD::atoi ( const std::string &  )

◆ atol()

int32_t PBD::atol ( const std::string &  )

◆ atoll()

int64_t PBD::atoll ( const std::string &  )

◆ atomic_dec_and_test()

template<typename T >
bool PBD::atomic_dec_and_test ( std::atomic< T > &  aval)

Definition at line 26 of file atomic.h.

◆ atomic_inc()

template<typename T >
void PBD::atomic_inc ( std::atomic< T > &  aval)

Definition at line 29 of file atomic.h.

◆ basename_nosuffix()

Glib::ustring PBD::basename_nosuffix ( Glib::ustring  )

◆ bool_to_string()

bool PBD::bool_to_string ( bool  val,
std::string &  str 
)

◆ canonical_path()

std::string PBD::canonical_path ( const std::string &  path)

The equivalent of realpath on POSIX systems, on Windows hard links/junctions etc are not resolved.

◆ capitalize()

std::string PBD::capitalize ( const std::string &  )

◆ cartesian_to_spherical()

void PBD::cartesian_to_spherical ( double  x,
double  y,
double  z,
double &  azi,
double &  ele,
double &  len 
)

◆ cleanup()

void PBD::cleanup ( )

◆ clear_directory()

int PBD::clear_directory ( const std::string &  dir,
size_t *  size = 0,
std::vector< std::string > *  removed_files = 0 
)

Remove all the files in a directory recursively leaving the directory structure in place.

Note
dir will not be removed
Parameters
dirThe directory to clear of files.
sizeof removed files in bytes.
removed_fileslist of files that were removed.

◆ copy_file()

bool PBD::copy_file ( const std::string &  from_path,
const std::string &  to_path 
)

Attempt to copy the contents of the file from_path to a new file at path to_path. If to_path exists it is overwritten.

Returns
true if file was successfully copied

◆ copy_files()

void PBD::copy_files ( const std::string &  from_path,
const std::string &  to_dir 
)

Attempt to copy all regular files from from_path to a new directory. This method does not recurse.

◆ copy_recurse()

void PBD::copy_recurse ( const std::string &  from_path,
const std::string &  to_dir,
bool  preseve_timestamps = false 
)

Attempt to copy all regular files from from_path to a new directory.

◆ debug_only_print()

void PBD::debug_only_print ( const char *  prefix,
std::string  str 
)

◆ debug_print()

void PBD::debug_print ( const char *  prefix,
std::string  str 
)

◆ DEFINE_ENUM_CONVERT() [1/5]

PBD::DEFINE_ENUM_CONVERT ( ARDOUR::FollowAction::Type  )

◆ DEFINE_ENUM_CONVERT() [2/5]

PBD::DEFINE_ENUM_CONVERT ( ARDOUR::Track::FreezeState  )

◆ DEFINE_ENUM_CONVERT() [3/5]

PBD::DEFINE_ENUM_CONVERT ( ARDOUR::Trigger::LaunchStyle  )

◆ DEFINE_ENUM_CONVERT() [4/5]

PBD::DEFINE_ENUM_CONVERT ( ARDOUR::Trigger::StretchMode  )

◆ DEFINE_ENUM_CONVERT() [5/5]

PBD::DEFINE_ENUM_CONVERT ( Temporal::Tempo::Type  )

◆ demangle()

std::string PBD::demangle ( const std::string &  str)
Parameters
stra string containing a mangled symbol/name
Returns
a string with the mangled symbol/name replaced with a demangled name

◆ demangle_symbol()

std::string PBD::demangle_symbol ( const std::string &  symbol)
Parameters
symbola mangled symbol/name
Returns
a demangled symbol/name

◆ demangled_name()

template<typename T >
std::string PBD::demangled_name ( T const &  obj)

Definition at line 45 of file demangle.h.

◆ double_to_string()

bool PBD::double_to_string ( double  val,
std::string &  str 
)

◆ downcase() [1/2]

const char* PBD::downcase ( const char *  )

◆ downcase() [2/2]

std::string PBD::downcase ( const std::string &  )

◆ equivalent_paths()

bool PBD::equivalent_paths ( const std::string &  p1,
const std::string &  p2 
)
Returns
true if p1 and p2 both resolve to the same file
Parameters
p1a file path.
p2a file path.

Uses g_stat to check for identical st_dev and st_ino values.

◆ exists_and_writable()

bool PBD::exists_and_writable ( const std::string &  p)
Returns
true if path at p exists and is writable, false otherwise

◆ export_search_path()

void PBD::export_search_path ( const std::string &  base_dir,
const char *  varname,
const char *  dir 
)

◆ ffs()

int PBD::ffs ( int  x)

◆ find_file()

bool PBD::find_file ( const Searchpath search_path,
const std::string &  filename,
std::string &  result 
)

Takes a search path and a file name and places the full path to that file in result if it is found within the search path.

Note
the parameter order of this function doesn't match the others. At the time of writing it is the most widely used file utility function so I didn't change it but it may be worth doing at some point if it causes any confusion.
Returns
true If file is found within the search path.

◆ find_files_matching_filter()

void PBD::find_files_matching_filter ( std::vector< std::string > &  results,
const Searchpath paths,
bool(*)(const std::string &, void *)  filter,
void *  arg,
bool  pass_fullpath,
bool  return_fullpath,
bool  recurse = false 
)

Find paths in a Searchpath that match a supplied filter(functor)

Note
results include only files.
Parameters
resultsA vector in which to place the resulting matches.
pathsA Searchpath
filterA functor to use to filter paths
argadditonal argument to filter if required
pass_fullpathpass the full path to the filter or just the basename
return_fullpathput the full path in results or just the basename
recurseRecurse into child directories to find files.

◆ find_files_matching_pattern() [1/2]

void PBD::find_files_matching_pattern ( std::vector< std::string > &  result,
const Searchpath paths,
const Glib::PatternSpec &  pattern 
)

Takes a Searchpath and returns all the files contained in the directory paths that match a particular pattern.

Parameters
resultA vector in which to place the resulting matches.
pathsA Searchpath
patternA Glib::PatternSpec used to match the files.

◆ find_files_matching_pattern() [2/2]

void PBD::find_files_matching_pattern ( std::vector< std::string > &  result,
const Searchpath paths,
const std::string &  pattern 
)

Takes a Searchpath and returns all the files contained in the directory paths that match a particular pattern.

This is a convenience method to avoid explicitly declaring temporary variables such as: find_files_matching_pattern (result, paths, string("*.ext"))

Parameters
resultA vector in which to place the resulting matches.
pathsA Searchpath
patternA string representing the Glib::PatternSpec used to match the files.

◆ find_files_matching_regex()

void PBD::find_files_matching_regex ( std::vector< std::string > &  results,
const Searchpath paths,
const std::string &  regexp,
bool  recurse = false 
)

Find files in paths that match a regular expression

Parameters
resultsA vector in which to place the resulting matches.
pathsA Searchpath
regexpA regular expression
recurseSearch directories recursively

◆ find_paths_matching_filter()

void PBD::find_paths_matching_filter ( std::vector< std::string > &  results,
const Searchpath paths,
bool(*)(const std::string &, void *)  filter,
void *  arg,
bool  pass_fullpath,
bool  return_fullpath,
bool  recurse = false 
)

Find paths in a Searchpath that match a supplied filter(functor)

Note
results include files and directories.
Parameters
resultsA vector in which to place the resulting matches.
pathsA Searchpath
filterA functor to use to filter paths
argadditonal argument to filter if required
pass_fullpathpass the full path to the filter or just the basename
return_fullpathput the full path in results or just the basename
recurseRecurse into child directories to find paths.

◆ float_to_string()

bool PBD::float_to_string ( float  val,
std::string &  str 
)

◆ floateq()

static bool PBD::floateq ( float  a,
float  b,
int  max_ulps_diff 
)
inlinestatic

Definition at line 52 of file floating.h.

◆ get_absolute_path()

std::string PBD::get_absolute_path ( const std::string &  )

Take a (possibly) relative path and make it absolute

Returns
An absolute path

◆ get_files()

void PBD::get_files ( std::vector< std::string > &  result,
const Searchpath paths 
)

Get a list of files in a Searchpath.

Parameters
pathsA Searchpath
resultA vector of absolute paths to files.

◆ get_microseconds()

microseconds_t PBD::get_microseconds ( )

◆ get_min_max_avg_total()

bool PBD::get_min_max_avg_total ( const std::vector< microseconds_t > &  values,
microseconds_t min,
microseconds_t max,
microseconds_t avg,
microseconds_t total 
)

◆ get_paths()

void PBD::get_paths ( std::vector< std::string > &  result,
const Searchpath paths,
bool  files_only = true,
bool  recurse = false 
)

Get a list of path entries in a directory or within a directory tree if recursing.

Note
paths in result will be absolute
Parameters
resultA vector of absolute paths to the directory entries in filename encoding.
pathsA Searchpath
files_onlyOnly include file entries in result
recurseRecurse into child directories

◆ get_resource_limit()

bool PBD::get_resource_limit ( ResourceType  resource,
ResourceLimit limit 
)
Returns
true on success, false on error

◆ get_suffix()

std::string PBD::get_suffix ( const std::string &  )

Take a path/filename and return the suffix (characters beyond the last '.'

Returns
A string containing the suffix, which will be empty if there are no '.' characters in the path/filename.

◆ get_win_special_folder_path()

std::string PBD::get_win_special_folder_path ( int  csidl)

Gets the full path that corresponds of one of the Windows special folders, such as "My Documents" and the like.

Parameters
csidlcorresponds to CSIDL values, such as CSIDL_SYSTEM etc.
Returns
A string containing the name of the special folder or an empty string on failure.

◆ hard_link()

bool PBD::hard_link ( const std::string &  existing_file,
const std::string &  new_path 
)

try hard-link a file

Returns
true if file was successfully linked

◆ init()

bool PBD::init ( )

◆ int16_to_string()

bool PBD::int16_to_string ( int16_t  val,
std::string &  str 
)

◆ int32_to_string()

bool PBD::int32_to_string ( int32_t  val,
std::string &  str 
)

◆ int64_to_string()

bool PBD::int64_to_string ( int64_t  val,
std::string &  str 
)

◆ internationalize()

std::vector<std::string> PBD::internationalize ( const char *  ,
const char **   
)

◆ is_integer()

bool PBD::is_integer ( const char *  i)
inline

Definition at line 29 of file natsort.h.

◆ length2string()

std::string PBD::length2string ( const int64_t  samples,
const double  sample_rate 
)

◆ list_debug_options()

void PBD::list_debug_options ( )

◆ match_search_strings()

static bool PBD::match_search_strings ( std::string const &  haystack,
std::string const &  needle 
)
inlinestatic

Definition at line 27 of file match.h.

◆ microsecond_timer_init()

void PBD::microsecond_timer_init ( )

◆ muldiv_floor()

int64_t PBD::muldiv_floor ( int64_t  v,
int64_t  n,
int64_t  d 
)
inline

Definition at line 90 of file integer_division.h.

◆ muldiv_round()

int64_t PBD::muldiv_round ( int64_t  v,
int64_t  n,
int64_t  d 
)
inline

Definition at line 52 of file integer_division.h.

◆ natcmp()

int PBD::natcmp ( const char *  a,
const char *  b 
)
inline

Definition at line 118 of file natsort.h.

◆ naturally_less()

bool PBD::naturally_less ( const char *  a,
const char *  b 
)
inline

Definition at line 174 of file natsort.h.

◆ new_debug_bit()

DebugBits PBD::new_debug_bit ( const char *  name)

◆ notify_event_loops_about_thread_creation()

void PBD::notify_event_loops_about_thread_creation ( pthread_t  ,
const std::string &  ,
int  requests = 256 
)

◆ numerically_less()

bool PBD::numerically_less ( const char *  a,
const char *  b 
)
inline

Definition at line 76 of file natsort.h.

◆ open_folder()

bool PBD::open_folder ( const std::string &  )

◆ open_uri() [1/2]

bool PBD::open_uri ( const char *  )

◆ open_uri() [2/2]

bool PBD::open_uri ( const std::string &  )

◆ operator<<()

template<class T >
std::ostream& PBD::operator<< ( std::ostream &  os,
PropertyTemplate< T > const &  s 
)

Definition at line 217 of file properties.h.

◆ order_of_magnitude()

int64_t PBD::order_of_magnitude ( const char *  i)
inline

Definition at line 38 of file natsort.h.

◆ parse_debug_options()

int PBD::parse_debug_options ( const char *  str)

◆ parse_path()

std::vector<std::string> PBD::parse_path ( std::string  path,
bool  check_if_exists = false 
)

◆ path_expand()

std::string PBD::path_expand ( std::string  path)

◆ path_is_within()

bool PBD::path_is_within ( const std::string &  ,
std::string   
)

Find out if ‘needle’ is a file or directory within the directory ‘haystack’.

Returns
true if it is.

◆ remove_directory()

void PBD::remove_directory ( const std::string &  dir)

Remove all the contents of a directory recursively. including the dir itself (rm -rf $dir)

Parameters
dirThe directory to remove recursively

◆ remove_extra_whitespace()

void PBD::remove_extra_whitespace ( std::string const &  in,
std::string &  out 
)

◆ sanitize_utf8()

std::string PBD::sanitize_utf8 ( std::string const &  )

◆ search_path_expand()

std::string PBD::search_path_expand ( std::string  path)

◆ set_debug_bits()

void PBD::set_debug_bits ( DebugBits  bits)

◆ set_resource_limit()

bool PBD::set_resource_limit ( ResourceType  resource,
const ResourceLimit limit 
)
Returns
true on success, false on error

◆ sgettext()

const char* PBD::sgettext ( const char *  ,
const char *   
)

◆ short_version()

std::string PBD::short_version ( std::string  ,
std::string::size_type  target_length 
)

◆ spherical_to_cartesian()

void PBD::spherical_to_cartesian ( double  azi,
double  ele,
double  len,
double &  x,
double &  y,
double &  z 
)

◆ stacktrace()

void PBD::stacktrace ( std::ostream &  out,
int  levels = 0,
size_t  start_level = 0 
)

◆ string_to() [1/23]

template<>
bool PBD::string_to ( const std::string &  str,
ARDOUR::AutoState as 
)
inline

Definition at line 186 of file ardour/ardour/types_convert.h.

◆ string_to() [2/23]

template<>
bool PBD::string_to ( const std::string &  str,
ARDOUR::DataType dt 
)
inline

Definition at line 200 of file ardour/ardour/types_convert.h.

◆ string_to() [3/23]

template<>
bool PBD::string_to ( const std::string &  str,
ARDOUR::FollowAction fa 
)
inline

Definition at line 214 of file ardour/ardour/types_convert.h.

◆ string_to() [4/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
bool &  val 
)
inline

Definition at line 156 of file string_convert.h.

◆ string_to() [5/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
double &  val 
)
inline

Definition at line 224 of file string_convert.h.

◆ string_to() [6/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
float &  val 
)
inline

Definition at line 218 of file string_convert.h.

◆ string_to() [7/23]

template<>
bool PBD::string_to ( const std::string &  str,
ID val 
)
inline

Definition at line 39 of file pbd/pbd/types_convert.h.

◆ string_to() [8/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
int16_t &  val 
)
inline

Definition at line 182 of file string_convert.h.

◆ string_to() [9/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
int32_t &  val 
)
inline

Definition at line 194 of file string_convert.h.

◆ string_to() [10/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
int64_t &  val 
)
inline

Definition at line 206 of file string_convert.h.

◆ string_to() [11/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
int8_t &  val 
)
inline

Definition at line 162 of file string_convert.h.

◆ string_to() [12/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
T &  val 
)
inline

Definition at line 147 of file string_convert.h.

◆ string_to() [13/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
uint16_t &  val 
)
inline

Definition at line 188 of file string_convert.h.

◆ string_to() [14/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
uint32_t &  val 
)
inline

Definition at line 200 of file string_convert.h.

◆ string_to() [15/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
uint64_t &  val 
)
inline

Definition at line 212 of file string_convert.h.

◆ string_to() [16/23]

template<class T >
bool PBD::string_to ( const std::string &  str,
uint8_t &  val 
)
inline

Definition at line 172 of file string_convert.h.

◆ string_to() [17/23]

template<>
Temporal::BBT_Offset PBD::string_to ( std::string const &  str)
inline

Definition at line 118 of file ardour/ardour/types_convert.h.

◆ string_to() [18/23]

template<>
bool PBD::string_to ( std::string const &  str,
ARDOUR::AnyTime at 
)
inline

Definition at line 105 of file ardour/ardour/types_convert.h.

◆ string_to() [19/23]

template<>
bool PBD::string_to ( std::string const &  str,
ARDOUR::timecnt_t val 
)
inline

Definition at line 173 of file ardour/ardour/types_convert.h.

◆ string_to() [20/23]

template<>
bool PBD::string_to ( std::string const &  str,
ARDOUR::timepos_t val 
)
inline

Definition at line 145 of file ardour/ardour/types_convert.h.

◆ string_to() [21/23]

template<>
bool PBD::string_to ( std::string const &  str,
Temporal::BBT_Offset val 
)
inline

Definition at line 414 of file bbt_time.h.

◆ string_to() [22/23]

template<>
bool PBD::string_to ( std::string const &  str,
Temporal::BBT_Time val 
)
inline

Definition at line 381 of file bbt_time.h.

◆ string_to() [23/23]

template<>
bool PBD::string_to ( std::string const &  str,
Temporal::Beats val 
)
inline

Definition at line 319 of file beats.h.

◆ string_to_bool()

bool PBD::string_to_bool ( const std::string &  str,
bool &  val 
)

◆ string_to_double()

bool PBD::string_to_double ( const std::string &  str,
double &  val 
)

◆ string_to_float()

bool PBD::string_to_float ( const std::string &  str,
float &  val 
)

◆ string_to_int16()

bool PBD::string_to_int16 ( const std::string &  str,
int16_t &  val 
)

◆ string_to_int32()

bool PBD::string_to_int32 ( const std::string &  str,
int32_t &  val 
)

◆ string_to_int64()

bool PBD::string_to_int64 ( const std::string &  str,
int64_t &  val 
)

◆ string_to_uint16()

bool PBD::string_to_uint16 ( const std::string &  str,
uint16_t &  val 
)

◆ string_to_uint32()

bool PBD::string_to_uint32 ( const std::string &  str,
uint32_t &  val 
)

◆ string_to_uint64()

bool PBD::string_to_uint64 ( const std::string &  str,
uint64_t &  val 
)

◆ strings_equal_ignore_case()

bool PBD::strings_equal_ignore_case ( const std::string &  a,
const std::string &  b 
)

◆ strip_whitespace_edges()

void PBD::strip_whitespace_edges ( std::string &  str)

◆ timing_summary()

std::string PBD::timing_summary ( const std::vector< microseconds_t > &  values)

◆ tmp_writable_directory()

std::string PBD::tmp_writable_directory ( const char *  domain,
const std::string &  prefix 
)

Create a temporary writable directory in which to create temporary files. The directory will be created under the top level "domain" directory.

For instance tmp_writable_directory ("pbd", "foo") on POSIX systems may return a path to a new directory something like to /tmp/pbd/foo-1423

Parameters
domainThe top level directory
prefixA prefix to use when creating subdirectory name
Returns
new temporary directory

◆ to_string() [1/41]

template<>
std::string PBD::to_string ( ARDOUR::AnyTime  at)
inline

Definition at line 112 of file ardour/ardour/types_convert.h.

◆ to_string() [2/41]

template<>
bool PBD::to_string ( ARDOUR::AnyTime const &  at,
std::string &  str 
)
inline

Definition at line 98 of file ardour/ardour/types_convert.h.

◆ to_string() [3/41]

template<>
bool PBD::to_string ( ARDOUR::AutoState  val,
std::string &  str 
)
inline

Definition at line 179 of file ardour/ardour/types_convert.h.

◆ to_string() [4/41]

template<>
bool PBD::to_string ( ARDOUR::DataType  val,
std::string &  str 
)
inline

Definition at line 193 of file ardour/ardour/types_convert.h.

◆ to_string() [5/41]

template<>
std::string PBD::to_string ( ARDOUR::FollowAction  fa)
inline

Definition at line 221 of file ardour/ardour/types_convert.h.

◆ to_string() [6/41]

template<>
bool PBD::to_string ( ARDOUR::FollowAction  fa,
std::string &  str 
)
inline

Definition at line 207 of file ardour/ardour/types_convert.h.

◆ to_string() [7/41]

template<>
std::string PBD::to_string ( ARDOUR::timecnt_t  val)
inline

Definition at line 152 of file ardour/ardour/types_convert.h.

◆ to_string() [8/41]

template<>
bool PBD::to_string ( ARDOUR::timecnt_t  val,
std::string &  str 
)
inline

Definition at line 166 of file ardour/ardour/types_convert.h.

◆ to_string() [9/41]

template<>
std::string PBD::to_string ( ARDOUR::timepos_t  val)
inline

Definition at line 124 of file ardour/ardour/types_convert.h.

◆ to_string() [10/41]

template<>
bool PBD::to_string ( ARDOUR::timepos_t  val,
std::string &  str 
)
inline

Definition at line 138 of file ardour/ardour/types_convert.h.

◆ to_string() [11/41]

template<>
std::string PBD::to_string ( bool  val)
inline

Definition at line 243 of file string_convert.h.

◆ to_string() [12/41]

template<class T >
bool PBD::to_string ( bool  val,
std::string &  str 
)
inline

Definition at line 81 of file string_convert.h.

◆ to_string() [13/41]

template<>
std::string PBD::to_string ( double  val)
inline

Definition at line 323 of file string_convert.h.

◆ to_string() [14/41]

template<class T >
bool PBD::to_string ( double  val,
std::string &  str 
)
inline

Definition at line 141 of file string_convert.h.

◆ to_string() [15/41]

template<>
std::string PBD::to_string ( float  val)
inline

Definition at line 315 of file string_convert.h.

◆ to_string() [16/41]

template<class T >
bool PBD::to_string ( float  val,
std::string &  str 
)
inline

Definition at line 135 of file string_convert.h.

◆ to_string() [17/41]

template<>
std::string PBD::to_string ( ID  val)
inline

Definition at line 46 of file pbd/pbd/types_convert.h.

◆ to_string() [18/41]

template<>
bool PBD::to_string ( ID  val,
std::string &  str 
)
inline

Definition at line 32 of file pbd/pbd/types_convert.h.

◆ to_string() [19/41]

template<>
std::string PBD::to_string ( int16_t  val)
inline

Definition at line 267 of file string_convert.h.

◆ to_string() [20/41]

template<class T >
bool PBD::to_string ( int16_t  val,
std::string &  str 
)
inline

Definition at line 99 of file string_convert.h.

◆ to_string() [21/41]

template<>
std::string PBD::to_string ( int32_t  val)
inline

Definition at line 283 of file string_convert.h.

◆ to_string() [22/41]

template<class T >
bool PBD::to_string ( int32_t  val,
std::string &  str 
)
inline

Definition at line 111 of file string_convert.h.

◆ to_string() [23/41]

template<>
std::string PBD::to_string ( int64_t  val)
inline

Definition at line 299 of file string_convert.h.

◆ to_string() [24/41]

template<class T >
bool PBD::to_string ( int64_t  val,
std::string &  str 
)
inline

Definition at line 123 of file string_convert.h.

◆ to_string() [25/41]

template<>
std::string PBD::to_string ( int8_t  val)
inline

Definition at line 251 of file string_convert.h.

◆ to_string() [26/41]

template<class T >
bool PBD::to_string ( int8_t  val,
std::string &  str 
)
inline

Definition at line 87 of file string_convert.h.

◆ to_string() [27/41]

template<class T >
std::string PBD::to_string ( val)
inline

Definition at line 234 of file string_convert.h.

◆ to_string() [28/41]

template<class T >
bool PBD::to_string ( val,
std::string &  str 
)
inline

Definition at line 72 of file string_convert.h.

◆ to_string() [29/41]

template<>
std::string PBD::to_string ( Temporal::BBT_Offset  val)
inline

Definition at line 406 of file bbt_time.h.

◆ to_string() [30/41]

template<>
bool PBD::to_string ( Temporal::BBT_Offset  val,
std::string &  str 
)
inline

Definition at line 397 of file bbt_time.h.

◆ to_string() [31/41]

template<>
std::string PBD::to_string ( Temporal::BBT_Time  val)
inline

Definition at line 373 of file bbt_time.h.

◆ to_string() [32/41]

template<>
bool PBD::to_string ( Temporal::BBT_Time  val,
std::string &  str 
)
inline

Definition at line 364 of file bbt_time.h.

◆ to_string() [33/41]

template<>
bool PBD::to_string ( Temporal::Beats  val,
std::string &  str 
)
inline

Definition at line 310 of file beats.h.

◆ to_string() [34/41]

template<>
std::string PBD::to_string ( uint16_t  val)
inline

Definition at line 275 of file string_convert.h.

◆ to_string() [35/41]

template<class T >
bool PBD::to_string ( uint16_t  val,
std::string &  str 
)
inline

Definition at line 105 of file string_convert.h.

◆ to_string() [36/41]

template<>
std::string PBD::to_string ( uint32_t  val)
inline

Definition at line 291 of file string_convert.h.

◆ to_string() [37/41]

template<class T >
bool PBD::to_string ( uint32_t  val,
std::string &  str 
)
inline

Definition at line 117 of file string_convert.h.

◆ to_string() [38/41]

template<>
std::string PBD::to_string ( uint64_t  val)
inline

Definition at line 307 of file string_convert.h.

◆ to_string() [39/41]

template<class T >
bool PBD::to_string ( uint64_t  val,
std::string &  str 
)
inline

Definition at line 129 of file string_convert.h.

◆ to_string() [40/41]

template<>
std::string PBD::to_string ( uint8_t  val)
inline

Definition at line 259 of file string_convert.h.

◆ to_string() [41/41]

template<class T >
bool PBD::to_string ( uint8_t  val,
std::string &  str 
)
inline

Definition at line 93 of file string_convert.h.

◆ toggle_file_existence()

int PBD::toggle_file_existence ( std::string const &  path)

If path exists, unlink it. If it doesn't exist, create it.

Returns
zero if required action was successful, non-zero otherwise.

◆ tokenize()

template<typename StringType , typename Iter >
unsigned int PBD::tokenize ( const StringType &  str,
const StringType &  delims,
Iter  it,
bool  strip_whitespace = false 
)

Tokenize string, this should work for standard strings as well as Glib::ustring. This is a bit of a hack, there are much better string tokenizing patterns out there. If strip_whitespace is set to true, tokens will be checked to see that they still have a length after stripping. If no length, they are discarded.

Definition at line 41 of file tokenizer.h.

◆ touch_file()

bool PBD::touch_file ( const std::string &  path)

Update the access and modification times of file at path, creating file if it doesn't already exist.

Parameters
pathfile path to touch
Returns
true if file exists or was created and access time updated.

◆ trace_twb()

void PBD::trace_twb ( )

◆ uint16_to_string()

bool PBD::uint16_to_string ( uint16_t  val,
std::string &  str 
)

◆ uint32_to_string()

bool PBD::uint32_to_string ( uint32_t  val,
std::string &  str 
)

◆ uint64_to_string()

bool PBD::uint64_to_string ( uint64_t  val,
std::string &  str 
)

◆ upcase()

std::vector<std::string> PBD::upcase ( char const *  [])

◆ url_decode()

std::string PBD::url_decode ( std::string const &  )

◆ windows_query_registry()

bool PBD::windows_query_registry ( const char *  regkey,
const char *  regval,
std::string &  rv,
HKEY  root = HKEY_LOCAL_MACHINE 
)

Convenience function to query registry keys. Test for both native, as well as WindowsOnWindows 64/32 key and returns the value as UTF-8 string.

Variable Documentation

◆ debug

Transmitter PBD::debug
extern

◆ debug_bits

DebugBits PBD::debug_bits
extern

◆ error

Transmitter PBD::error
extern

◆ fatal

Transmitter PBD::fatal
extern

◆ info

Transmitter PBD::info
extern

◆ ThreadCreatedWithRequestSize

PBD::Signal<void(pthread_t,std::string,uint32_t)> PBD::ThreadCreatedWithRequestSize
extern

◆ warning

Transmitter PBD::warning
extern