|
RAVENNAKIT
|
Namespaces | |
| namespace | aes67 |
| namespace | clock |
| namespace | file |
| namespace | common_paths |
| namespace | rank |
| namespace | dnssd |
| namespace | nmos |
| namespace | ntp |
| namespace | ptp |
| namespace | rtp |
| namespace | rtcp |
| namespace | rtsp |
| namespace | sdp |
Classes | |
| class | AudioBuffer |
| A dynamically sizeable buffer to store non-interleaved audio, along with an array of pointers to the beginning of each channel. More... | |
| class | AudioBufferView |
| A non-owning view of a non-interleaved audio buffer. More... | |
| class | AudioData |
| class | AudioFifoBuffer |
| struct | AudioFormat |
| class | WavAudioFormat |
| class | BufferView |
| A class similar to std::string_view but for raw data buffers. More... | |
| class | ByteBuffer |
| A wrapper around std::vector with some facilities for writing different types to it in different byte orders. More... | |
| struct | Fifo |
| class | FifoBuffer |
| A classic FIFO buffer implementation with different strategies F. More... | |
| class | StringBuffer |
| Simple buffer around a string that allows for easy reading and writing of values. More... | |
| class | VectorBuffer |
| Simple buffer around a vector that allows for easy reading and writing of values. More... | |
| class | Exception |
| struct | Fraction |
| Little tiny struct to represent a fraction without loss. More... | |
| struct | IntervalStats |
| Keeps track of an ema with outliers filtered out and a max deviation. More... | |
| class | Range |
| Represents a range of values. More... | |
| class | RunningAverage |
| A running average. More... | |
| class | SlidingStats |
| Values can be added after which different calculations can be performed on the values. More... | |
| class | HttpClientBase |
| class | HttpClient |
| A high level wrapper around boost::beast for making HTTP requests. More... | |
| class | HttpRouter |
| A simple HTTP router that matches HTTP requests to handlers based on the method and path. More... | |
| class | HttpServer |
| A high-level wrapper around boost::beast for creating an HTTP server. More... | |
| class | MacAddress |
| Represents a MAC address. More... | |
| class | NetworkInterface |
| Represents a network interface in the system. More... | |
| class | NetworkInterfaceConfig |
| class | NetworkInterfaceList |
| A list of network interfaces with some convenience functions to operate on them. More... | |
| class | ExtendedUdpSocket |
| A customized UDP socket class which extends usual UDP socket functionality by adding the ability to receive the destination address of a received packet. More... | |
| class | AsioTimer |
| A timer that uses boost::asio::steady_timer to provide a simple way of creating a timer without thinking about the lifetimes. More... | |
| class | Random |
| class | ByteStream |
| Simple stream implementation that writes to and reads from a vector. More... | |
| class | FileInputStream |
| An implementation of input_stream for reading from a file. More... | |
| class | FileOutputStream |
| An implementation of output_stream for writing to a file. More... | |
| class | InputStream |
| Baseclass for classes that want to provide stream-like access to data. More... | |
| class | InputStreamView |
| A non-owning view of some data that can be read from. More... | |
| class | OutputStream |
| An abstract class representing an output stream, providing all kinds of write operations. More... | |
| class | StringParser |
| A handy utility class for parsing strings. More... | |
| class | AtomicRwLock |
| A lock-free (and sometimes wait-free) reader writer lock. More... | |
| class | RealtimeSharedObject |
| This class provides a real-time safe way to share objects among a single reader. More... | |
| class | int24_t |
| A custom type to represent a 3-byte audio sample. More... | |
| class | SafeInt |
| A safe integer type that checks for overflow and underflow when performing arithmetic operations. More... | |
| class | uint48_t |
| Custom 48 bit unsigned integer type. More... | |
| class | Defer |
| A class that holds a rollback function, calling it upon destruction unless a commit is made. More... | |
| class | Id |
| A class which represents a unique identifier. More... | |
| class | ObjectCounter |
| Holds the number of instances created and destroyed. More... | |
| class | CountedObject |
| Little helper class which keeps track of how many instances of this class have been created and how many are still alive. More... | |
| class | PathMatcher |
| A simple path matcher that matches paths against patterns. More... | |
| class | SafeFunction |
| A simple callback function wrapper that can be used to store and call a function with a specific signature. More... | |
| class | SafeFunction< R(Args...)> |
| class | SubscriberList |
| Super basic list of subscribers. More... | |
| class | SubscriberList< T, void > |
| Specialize the void case. More... | |
| class | Throttle |
| A class that throttles a value to a given interval. More... | |
| class | Throttle< void > |
| Specialization for void, which doesn't store a value. More... | |
| struct | Uri |
| URI parser and encoder. More... | |
| class | WrappingUint |
| Represents sequence numbers with rollover (wraparound) semantics. More... | |
| class | RavennaBrowser |
| Convenience class which contains a dnssd browser for nodes and sessions. More... | |
| class | RavennaNode |
| This class contains all the components to act like a RAVENNA node as specified in the RAVENNA protocol. More... | |
| class | RavennaReceiver |
| class | RavennaRtspClient |
| Maintains connections to one or more RAVENNA RTSP servers, upon request. More... | |
| class | RavennaSender |
Typedefs | |
| using | ip_address = boost::asio::ip::address |
| using | ip_address_v4 = boost::asio::ip::address_v4 |
| using | ip_address_v6 = boost::asio::ip::address_v6 |
| using | udp_socket = boost::asio::ip::udp::socket |
| using | udp_endpoint = boost::asio::ip::udp::endpoint |
| using | tcp = boost::asio::ip::tcp |
| using | SafeInt8 = SafeInt<int8_t> |
| using | SafeInt16 = SafeInt<int16_t> |
| using | SafeInt32 = SafeInt<int32_t> |
| using | SafeInt64 = SafeInt<int64_t> |
| using | SafeUint8 = SafeInt<uint8_t> |
| using | SafeUint16 = SafeInt<uint16_t> |
| using | SafeUint32 = SafeInt<uint32_t> |
| using | SafeUint64 = SafeInt<uint64_t> |
| using | WrappingUint8 = WrappingUint<uint8_t> |
| 8-bit wrapping unsigned integer. | |
| using | WrappingUint16 = WrappingUint<uint16_t> |
| 16-bit wrapping unsigned integer. | |
| using | WrappingUint32 = WrappingUint<uint32_t> |
| 32-bit wrapping unsigned integer. | |
| using | WrappingUint64 = WrappingUint<uint64_t> |
| 64-bit wrapping unsigned integer. | |
Enumerations | |
| enum class | AudioEncoding : uint8_t { undefined , pcm_s8 , pcm_u8 , pcm_s16 , pcm_s24 , pcm_s32 , pcm_f32 , pcm_f64 } |
| enum class | SafeIntError { overflow , underflow , div_by_zero } |
Functions | |
| uint8_t | audio_encoding_bytes_per_sample (const AudioEncoding encoding) |
| uint8_t | audio_encoding_ground_value (const AudioEncoding encoding) |
| const char * | to_string (const AudioEncoding encoding) |
| std::optional< AudioEncoding > | audio_encoding_from_string (const char *str) |
| void | swap_bytes (uint8_t *data, const size_t size) |
| Swaps given amount of bytes in the given data, in place. | |
| void | swap_bytes (uint8_t *data, const size_t size, const size_t stride) |
| Swaps given amount of bytes in the given data, in place, with the given stride. | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| Type | swap_bytes (Type value) |
| template<> | |
| float | swap_bytes< float > (const float value) |
| Specialization of swap_bytes for floats. | |
| template<> | |
| double | swap_bytes< double > (const double value) |
| Specialization of swap_bytes for doubles. | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| Type | swap_if_le (const Type value) |
| Swaps the bytes of the given value if the system is little-endian. | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| Type | swap_if_be (const Type value) |
| Swaps the bytes of the given value if the system is big-endian. | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| Type | read_ne (const uint8_t *data) |
| Reads a value from the given data in native byte order (not to be confused with network-endian). | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| Type | read_be (const uint8_t *data) |
| Reads a big-endian value from the given data. | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| Type | read_le (const uint8_t *data) |
| Reads a little-endian value from the given data. | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| void | write_ne (uint8_t *dst, const Type value) |
| Writes a value to the given destination in native byte order (not to be confused with network-endian). | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| void | write_be (uint8_t *dst, const Type value) |
| Writes a big-endian value to the given destination. | |
| template<typename Type, std::enable_if_t< std::is_trivially_copyable_v< Type >, bool > = true> | |
| void | write_le (uint8_t *dst, const Type value) |
| Writes a little-endian value to the given destination. | |
| bool | is_little_endian_at_runtime () noexcept |
| Checks if the system is little-endian at runtime. | |
| void | validate_byte_order () |
| Validates whether the compiled byte order matches the runtime byte order. | |
| std::optional< std::string > | get_env (const char *name) |
| Gets the value of an environment variable. | |
| template<typename T> | |
| boost::system::result< T > | parse_json (const std::string_view json_str) |
| void | set_log_level (const char *level) |
| Sets the log level for the application based on the given string. | |
| void | set_log_level_from_env (const char *env_var="RAV_LOG_LEVEL") |
| Tries to find given environment variable and set the log level accordingly. | |
| std::optional< NetworkInterfaceConfig > | parse_network_interface_config_from_string (const std::string &input, const char delimiter=',') |
| size_t | receive_from_socket (boost::asio::ip::udp::socket &socket, std::array< uint8_t, 1500 > &data_buf, boost::asio::ip::udp::endpoint &src_endpoint, boost::asio::ip::udp::endpoint &dst_endpoint, uint64_t &recv_time, boost::system::error_code &ec) |
| std::string_view | string_up_to_first_occurrence_of (std::string_view string_to_search_in, const std::string_view string_to_search_for, const bool include_sub_string_in_result) |
| Returns a string truncated up to the first occurrence of a needle. | |
| std::string_view | string_up_to_the_nth_occurrence_of (const size_t nth, std::string_view string_to_search_in, const std::string_view string_to_search_for, const bool include_sub_string_in_result) |
| Returns a string truncated up to the nth occurrence of a needle. | |
| std::string_view | string_up_to_last_occurrence_of (const std::string_view string_to_search_in, const std::string_view string_to_search_for, const bool include_sub_string_in_result) |
| Returns a string truncated up to the last occurrence of a needle. | |
| std::string_view | string_from_first_occurrence_of (std::string_view string_to_search_in, const std::string_view string_to_search_for, const bool include_sub_string_in_result) |
| Returns a string truncated starting from to first last occurrence of a needle. | |
| std::string_view | string_from_nth_occurrence_of (const size_t nth, std::string_view string_to_search_in, const std::string_view string_to_search_for, const bool include_sub_string_in_result) |
| Returns a string truncated from the nth occurrence of a needle. | |
| std::string_view | string_from_last_occurrence_of (const std::string_view string_to_search_in, const std::string_view string_to_search_for, const bool include_sub_string_in_result) |
| Returns a string truncated starting from to last occurrence of a needle. | |
| std::string_view | string_remove_prefix (const std::string_view &string, const std::string_view prefix_to_remove, bool *found=nullptr) |
| Returns a copy of string with given prefix removed, if prefix is found at the beginning of the string. | |
| std::string_view | string_remove_suffix (const std::string_view &string, const std::string_view suffix_to_remove, bool *found=nullptr) |
| Returns a copy of string with given suffix removed, if suffix is found at the end of the string. | |
| std::string_view | string_trim (const std::string_view input) |
| Trims given string by removing whitespace at the start and the end or the string. | |
| template<typename Type> | |
| std::enable_if_t< std::is_integral_v< Type >, std::optional< Type > > | string_to_int (std::string_view string, const bool strict=false, const int base=10) |
| String to number - a small convenience function around std::from_chars. | |
| std::optional< float > | string_to_float (const std::string &str) |
| String to float - converts a string to a float, or returns an empty optional if the conversion failed. | |
| std::optional< double > | string_to_double (const std::string &str) |
| String to double - converts a string to a double, or returns an empty optional if the conversion failed. | |
| bool | string_starts_with (const std::string_view text, const std::string_view starts_with) |
| Tests whether given text starts with a certain string. | |
| bool | string_ends_with (const std::string_view text, const std::string_view ends_with) |
| Tests whether given text ends with a certain string. | |
| bool | string_contains (const std::string_view string, char c) |
| Returns whether given string contains a certain character. | |
| bool | string_contains (const std::string_view string, const std::string_view sub_string) |
| Returns whether given string contains a certain substring. | |
| std::vector< std::string > | string_split (const std::string &string, const char *delimiter) |
| Splits a string into a vector of strings based on a delimiter. | |
| std::vector< std::string > | string_split (const std::string &string, const char delimiter) |
| Splits a string into a vector of strings based on a delimiter. | |
| std::string | string_replace (const std::string_view original, const std::string_view to_replace, const std::string_view replacement) |
| Replaces all sequences of to_replace with replacement. | |
| std::string_view | string_unquoted (std::string_view input) |
| If given string is quoted, it will remove the quotes. | |
| bool | string_compare_case_insensitive (const std::string_view lhs, const std::string_view rhs) |
| Compares 2 strings case-insensitively. | |
| std::string | string_to_upper (const std::string &str, std::size_t count=std::numeric_limits< size_t >::max()) |
| Converts the first count characters of a string to upper case. | |
| std::string | string_to_lower (const std::string &str, std::size_t count=std::numeric_limits< size_t >::max()) |
| Converts the first count characters of a string to lower case. | |
| template<typename T> | |
| T & | get_global_instance_of_type () |
| This function returns a reference to a read/write, default-constructed static object of type T. | |
| template<typename T> | |
| const T & | get_global_const_instance_of_type () |
| This function returns a reference to a read-only, default-constructed static object of type T. | |
| void | do_system_checks () |
| template<typename Type, size_t N> | |
| constexpr size_t | num_elements_in_array (Type(&)[N]) noexcept |
| Returns the number of elements in a c-style array. | |
| template<typename T> | |
| bool | is_within (T a, T b, T tolerance) |
| Tests if two values are within a certain tolerance of each other. | |
| template<typename T> | |
| bool | is_between (T a, T min, T max) |
| Tests if a value is between two other values, inclusive. | |
| std::ostream & | operator<< (std::ostream &os, const PathMatcher::Error err) |
| BOOST_NORETURN BOOST_NOINLINE void | throw_exception_from_error (PathMatcher::Error const &e, boost::source_location const &loc) |
| template<typename Container, typename Pred> | |
| size_t | stl_remove_if (Container &container, Pred pred) |
| Convenience function to remove items from an stl container which match pred. | |
| template<typename Map, typename Key> | |
| auto | stl_get_or_default (const Map &map, const Key &key) -> typename Map::mapped_type |
| Convenience function to get an item from a map, or if the item doesn't exist return a default value. | |
| template<typename T, std::size_t N, typename F, std::size_t... Is> | |
| std::array< T, N > | generate_array_impl (F &&f, std::index_sequence< Is... >) |
| template<typename T, std::size_t N, typename F> | |
| std::array< T, N > | generate_array (F &&f) |
| Helper function to initialize std::array with non-copyable types. | |
| void | tracy_point () |
| Sometimes you want to know when something happened, but you don't want to instrument functions which get called into. | |
| std::string | to_string (const RavennaNode::Configuration &configuration) |
| tl::expected< rtp::AudioReceiver::ReaderParameters, std::string > | create_rtp_receiver_parameters (const sdp::SessionDescription &sdp) |
| Creates rtp receiver parameters from the given SDP. | |
| void | tag_invoke (const boost::json::value_from_tag &, boost::json::value &jv, const RavennaReceiver::Configuration &config) |
| RavennaReceiver::Configuration | tag_invoke (const boost::json::value_to_tag< RavennaReceiver::Configuration > &, const boost::json::value &jv) |
| void | tag_invoke (const boost::json::value_from_tag &, boost::json::value &jv, const RavennaSender::Destination &destination) |
| RavennaSender::Destination | tag_invoke (const boost::json::value_to_tag< RavennaSender::Destination > &, const boost::json::value &jv) |
| void | tag_invoke (const boost::json::value_from_tag &, boost::json::value &jv, const RavennaSender::Configuration &config) |
| RavennaSender::Configuration | tag_invoke (const boost::json::value_to_tag< RavennaSender::Configuration > &, const boost::json::value &jv) |
Variables | |
| static constexpr bool | little_endian = true |
| static constexpr bool | big_endian = false |
| using rav::ip_address = boost::asio::ip::address |
Definition at line 31 of file asio_helpers.hpp.
| using rav::ip_address_v4 = boost::asio::ip::address_v4 |
Definition at line 32 of file asio_helpers.hpp.
| using rav::ip_address_v6 = boost::asio::ip::address_v6 |
Definition at line 33 of file asio_helpers.hpp.
| using rav::SafeInt16 = SafeInt<int16_t> |
Definition at line 294 of file safe_int.hpp.
| using rav::SafeInt32 = SafeInt<int32_t> |
Definition at line 295 of file safe_int.hpp.
| using rav::SafeInt64 = SafeInt<int64_t> |
Definition at line 296 of file safe_int.hpp.
| using rav::SafeInt8 = SafeInt<int8_t> |
Definition at line 293 of file safe_int.hpp.
| using rav::SafeUint16 = SafeInt<uint16_t> |
Definition at line 298 of file safe_int.hpp.
| using rav::SafeUint32 = SafeInt<uint32_t> |
Definition at line 299 of file safe_int.hpp.
| using rav::SafeUint64 = SafeInt<uint64_t> |
Definition at line 300 of file safe_int.hpp.
| using rav::SafeUint8 = SafeInt<uint8_t> |
Definition at line 297 of file safe_int.hpp.
| using rav::tcp = boost::asio::ip::tcp |
Definition at line 38 of file http_client.hpp.
| using rav::udp_endpoint = boost::asio::ip::udp::endpoint |
Definition at line 35 of file asio_helpers.hpp.
| using rav::udp_socket = boost::asio::ip::udp::socket |
Definition at line 34 of file asio_helpers.hpp.
| using rav::WrappingUint16 = WrappingUint<uint16_t> |
16-bit wrapping unsigned integer.
Definition at line 261 of file wrapping_uint.hpp.
| using rav::WrappingUint32 = WrappingUint<uint32_t> |
32-bit wrapping unsigned integer.
Definition at line 264 of file wrapping_uint.hpp.
| using rav::WrappingUint64 = WrappingUint<uint64_t> |
64-bit wrapping unsigned integer.
Definition at line 267 of file wrapping_uint.hpp.
| using rav::WrappingUint8 = WrappingUint<uint8_t> |
8-bit wrapping unsigned integer.
Definition at line 258 of file wrapping_uint.hpp.
|
strong |
| Enumerator | |
|---|---|
| undefined | |
| pcm_s8 | |
| pcm_u8 | |
| pcm_s16 | |
| pcm_s24 | |
| pcm_s32 | |
| pcm_f32 | |
| pcm_f64 | |
Definition at line 33 of file audio_encoding.hpp.
|
strong |
| Enumerator | |
|---|---|
| overflow | |
| underflow | |
| div_by_zero | |
Definition at line 33 of file safe_int.hpp.
|
inline |
Definition at line 47 of file audio_encoding.hpp.
|
inline |
Definition at line 109 of file audio_encoding.hpp.
|
inline |
Definition at line 70 of file audio_encoding.hpp.
| tl::expected< rtp::AudioReceiver::ReaderParameters, std::string > rav::create_rtp_receiver_parameters | ( | const sdp::SessionDescription & | sdp | ) |
Creates rtp receiver parameters from the given SDP.
| sdp | The SDP to create the parameters from. |
|
inline |
Definition at line 33 of file system.hpp.
| std::array< T, N > rav::generate_array | ( | F && | f | ) |
Helper function to initialize std::array with non-copyable types.
Definition at line 73 of file stl_helpers.hpp.
| std::array< T, N > rav::generate_array_impl | ( | F && | f, |
| std::index_sequence< Is... > | ) |
Definition at line 65 of file stl_helpers.hpp.
|
inline |
| const T & rav::get_global_const_instance_of_type | ( | ) |
This function returns a reference to a read-only, default-constructed static object of type T.
There will be exactly one of these objects present per instantiated type, per process.
Definition at line 44 of file support.hpp.
| T & rav::get_global_instance_of_type | ( | ) |
This function returns a reference to a read/write, default-constructed static object of type T.
There will be exactly one of these objects present per instantiated type, per process.
Definition at line 34 of file support.hpp.
| bool rav::is_between | ( | T | a, |
| T | min, | ||
| T | max ) |
Tests if a value is between two other values, inclusive.
| T | The type of the values to compare. |
| a | The value to test. |
| min | The minimum value. |
| max | The maximum value. |
|
inlinenoexcept |
Checks if the system is little-endian at runtime.
Definition at line 265 of file byte_order.hpp.
| bool rav::is_within | ( | T | a, |
| T | b, | ||
| T | tolerance ) |
Tests if two values are within a certain tolerance of each other.
| T | The type of the values to compare. |
| a | The first value. |
| b | The second value. |
| tolerance | The tolerance. |
|
constexprnoexcept |
|
inline |
Definition at line 225 of file path_matcher.hpp.
| boost::system::result< T > rav::parse_json | ( | const std::string_view | json_str | ) |
|
inline |
Definition at line 186 of file network_interface_config.hpp.
| Type rav::read_be | ( | const uint8_t * | data | ) |
Reads a big-endian value from the given data.
| Type | The type of the value to read. |
| data | The data which holds the encoded value. |
Definition at line 213 of file byte_order.hpp.
| Type rav::read_le | ( | const uint8_t * | data | ) |
Reads a little-endian value from the given data.
| Type | The type of the value to read. |
| data | The data which holds the encoded value. |
Definition at line 224 of file byte_order.hpp.
| Type rav::read_ne | ( | const uint8_t * | data | ) |
Reads a value from the given data in native byte order (not to be confused with network-endian).
| Type | The type of the value to read. |
| data | The data which holds the encoded value. |
Definition at line 200 of file byte_order.hpp.
|
nodiscard |
|
inline |
|
inline |
Tries to find given environment variable and set the log level accordingly.
The following are valid values for the log level:
| env_var | The environment variable to read the log level from. |
| auto rav::stl_get_or_default | ( | const Map & | map, |
| const Key & | key ) -> typename Map::mapped_type |
Convenience function to get an item from a map, or if the item doesn't exist return a default value.
| Map | The type of the map. |
| Key | The key type. |
| map | The map to get the item from. |
| key | The key of the item to get. |
Definition at line 57 of file stl_helpers.hpp.
| size_t rav::stl_remove_if | ( | Container & | container, |
| Pred | pred ) |
Convenience function to remove items from an stl container which match pred.
| Container | The container type. |
| Pred | The predicate type. |
| container | The container to remove item(s) from. |
| pred | The predicate. If it returns true the item will be removed. |
Definition at line 42 of file stl_helpers.hpp.
|
inline |
Compares 2 strings case-insensitively.
| lhs | Left hand side |
| rhs | Right hand side |
Definition at line 430 of file string.hpp.
|
inline |
Returns whether given string contains a certain character.
| string | String to look into. |
| c | Character to find. |
Definition at line 327 of file string.hpp.
|
inline |
Returns whether given string contains a certain substring.
| string | String to look into. |
| sub_string | Substring to find. |
Definition at line 339 of file string.hpp.
|
inline |
Tests whether given text ends with a certain string.
| text | The text to test. |
| ends_with | The string to test for. |
Definition at line 314 of file string.hpp.
|
inline |
Returns a string truncated starting from to first last occurrence of a needle.
| string_to_search_in | String to search in. |
| string_to_search_for | String to search for. |
| include_sub_string_in_result | If true the needle will be included in the resulting string, when false it will not. |
Definition at line 113 of file string.hpp.
|
inline |
Returns a string truncated starting from to last occurrence of a needle.
| string_to_search_in | String to search in. |
| string_to_search_for | String to search for. |
| include_sub_string_in_result | If true the needle will be included in the resulting string, when false it will not. |
Definition at line 162 of file string.hpp.
|
inline |
Returns a string truncated from the nth occurrence of a needle.
| nth | Nth needle to find, 0 will always return the full string, 1 will find the 1st needle, and so on. |
| string_to_search_in | String to search in. |
| string_to_search_for | String to search for. |
| include_sub_string_in_result | If true the needle will be included in the resulting string, when false it will not. |
Definition at line 133 of file string.hpp.
|
inline |
Returns a copy of string with given prefix removed, if prefix is found at the beginning of the string.
| string | String to remove prefix from. |
| prefix_to_remove | Prefix to find and remove. |
| found | If not null, will be set to true if the prefix was found and removed, false otherwise. |
Definition at line 182 of file string.hpp.
|
inline |
Returns a copy of string with given suffix removed, if suffix is found at the end of the string.
| string | String to remove suffix from. |
| suffix_to_remove | Suffix to find and remove. |
Definition at line 206 of file string.hpp.
|
inline |
Replaces all sequences of to_replace with replacement.
| original | The original string, |
| to_replace | The sequence to replace. |
| replacement | The replacement. |
Definition at line 387 of file string.hpp.
|
inline |
Splits a string into a vector of strings based on a delimiter.
| string | The string to split. |
| delimiter | The delimiter to split the string by. |
Definition at line 349 of file string.hpp.
|
inline |
Splits a string into a vector of strings based on a delimiter.
| string | The string to split. |
| delimiter | The delimiter to split the string by. |
Definition at line 375 of file string.hpp.
|
inline |
Tests whether given text starts with a certain string.
| text | The text to test. |
| starts_with | The string to test for. |
Definition at line 304 of file string.hpp.
|
inline |
String to double - converts a string to a double, or returns an empty optional if the conversion failed.
| str | String to convert. |
Definition at line 290 of file string.hpp.
|
inline |
String to float - converts a string to a float, or returns an empty optional if the conversion failed.
| str | String to convert. |
Definition at line 277 of file string.hpp.
| std::enable_if_t< std::is_integral_v< Type >, std::optional< Type > > rav::string_to_int | ( | std::string_view | string, |
| const bool | strict = false, | ||
| const int | base = 10 ) |
String to number - a small convenience function around std::from_chars.
| Type | Type of the value to convert from a string. |
| string | String to convert to a value. |
| strict | If true, the whole string must be a number, otherwise only the beginning of the string must be a number. |
| base | Base of the number to convert. When 16, the "0x" and "0X" prefixes are not recognized. |
Definition at line 264 of file string.hpp.
|
inline |
Converts the first count characters of a string to lower case.
| str | The string to convert. |
| count | The number of leading characters to convert to lower case. |
Definition at line 468 of file string.hpp.
|
inline |
Converts the first count characters of a string to upper case.
| str | The string to convert. |
| count | The number of leading characters to convert to upper case. |
Definition at line 450 of file string.hpp.
|
inline |
Trims given string by removing whitespace at the start and the end or the string.
| input | The input to trim. |
Definition at line 228 of file string.hpp.
|
inline |
If given string is quoted, it will remove the quotes.
It will also trim the strim before doing that. If there are unmatched quoted ('some"), nothing will happen.
| input | The input to unquote. |
Definition at line 405 of file string.hpp.
|
inline |
Returns a string truncated up to the first occurrence of a needle.
| string_to_search_in | String to search in. |
| string_to_search_for | String to search for. |
| include_sub_string_in_result | If true the needle will be included in the resulting string, when false it will not. |
Definition at line 45 of file string.hpp.
|
inline |
Returns a string truncated up to the last occurrence of a needle.
| string_to_search_in | String to search in. |
| string_to_search_for | String to search for. |
| include_sub_string_in_result | If true the needle will be included in the resulting string, when false it will not. |
Definition at line 94 of file string.hpp.
|
inline |
Returns a string truncated up to the nth occurrence of a needle.
| nth | Nth needle to find, 0 will always return an empty string, 1 will find the 1st needle, and so on. |
| string_to_search_in | String to search in. |
| string_to_search_for | String to search for. |
| include_sub_string_in_result | If true the needle will be included in the resulting string, when false it will not. |
Definition at line 65 of file string.hpp.
| Type rav::swap_bytes | ( | Type | value | ) |
| Type | The type of the value to swap. |
| value | The value to swap. |
Definition at line 111 of file byte_order.hpp.
|
inline |
Swaps given amount of bytes in the given data, in place.
| data | The data to swap. |
| size | The size of the data (in bytes). |
Definition at line 75 of file byte_order.hpp.
|
inline |
Swaps given amount of bytes in the given data, in place, with the given stride.
| data | The data to swap. |
| size | The size of the data (in bytes). |
| stride | The stride of the data (in bytes). |
Definition at line 92 of file byte_order.hpp.
|
inline |
Specialization of swap_bytes for doubles.
| value | The value to swap. |
Definition at line 151 of file byte_order.hpp.
|
inline |
Specialization of swap_bytes for floats.
| value | The value to swap. |
Definition at line 133 of file byte_order.hpp.
| Type rav::swap_if_be | ( | const Type | value | ) |
Swaps the bytes of the given value if the system is big-endian.
| Type | The type of the value to swap. |
| value | The value to swap. |
Definition at line 185 of file byte_order.hpp.
| Type rav::swap_if_le | ( | const Type | value | ) |
Swaps the bytes of the given value if the system is little-endian.
| Type | The type of the value to swap. |
| value | The value to swap. |
Definition at line 170 of file byte_order.hpp.
| void rav::tag_invoke | ( | const boost::json::value_from_tag & | , |
| boost::json::value & | jv, | ||
| const RavennaReceiver::Configuration & | config ) |
| void rav::tag_invoke | ( | const boost::json::value_from_tag & | , |
| boost::json::value & | jv, | ||
| const RavennaSender::Configuration & | config ) |
| void rav::tag_invoke | ( | const boost::json::value_from_tag & | , |
| boost::json::value & | jv, | ||
| const RavennaSender::Destination & | destination ) |
| RavennaReceiver::Configuration rav::tag_invoke | ( | const boost::json::value_to_tag< RavennaReceiver::Configuration > & | , |
| const boost::json::value & | jv ) |
| RavennaSender::Configuration rav::tag_invoke | ( | const boost::json::value_to_tag< RavennaSender::Configuration > & | , |
| const boost::json::value & | jv ) |
| RavennaSender::Destination rav::tag_invoke | ( | const boost::json::value_to_tag< RavennaSender::Destination > & | , |
| const boost::json::value & | jv ) |
|
inline |
Definition at line 238 of file path_matcher.hpp.
|
inline |
Definition at line 86 of file audio_encoding.hpp.
| std::string rav::to_string | ( | const RavennaNode::Configuration & | configuration | ) |
|
inline |
|
inline |
Validates whether the compiled byte order matches the runtime byte order.
If not throws an exception.
Definition at line 273 of file byte_order.hpp.
| void rav::write_be | ( | uint8_t * | dst, |
| const Type | value ) |
Writes a big-endian value to the given destination.
| Type | The type of the value to write. |
| dst | The destination where the value should be written. |
| value | The value to write. |
Definition at line 246 of file byte_order.hpp.
| void rav::write_le | ( | uint8_t * | dst, |
| const Type | value ) |
Writes a little-endian value to the given destination.
| Type | The type of the value to write. |
| dst | The destination where the value should be written. |
| value | The value to write. |
Definition at line 257 of file byte_order.hpp.
| void rav::write_ne | ( | uint8_t * | dst, |
| const Type | value ) |
Writes a value to the given destination in native byte order (not to be confused with network-endian).
| Type | The type of the value to write. |
| dst | The destination where the value should be written. |
| value | The value to write. |
Definition at line 235 of file byte_order.hpp.
|
staticconstexpr |
Definition at line 49 of file byte_order.hpp.
|
staticconstexpr |
Definition at line 48 of file byte_order.hpp.