iceoryx2
C++ Language Bindings
Loading...
Searching...
No Matches
iox2::bb::detail Namespace Reference

Classes

struct  ExtractIntoType
 Helper struct to get the actual destination type 'T' for 'into' with an additional indirection like 'into<Lossy<T>>'. More...
 
struct  ExtractIntoType< Lossy< T > >
 Helper struct to get the actual destination type 'T' for 'into<Lossy<T>>'. More...
 
class  RawByteStorage
 
struct  SourceLocation
 
class  StaticFunction
 
class  StaticFunction< Capacity, Signature< ReturnType, Args... > >
 A static alternative of std::function which is fixed size. More...
 

Typedefs

template<typename ReturnType , typename... Args>
using Signature = ReturnType(Args...)
 
template<uint64_t N>
using CharArray = char[N]
 

Enumerations

enum class  RelativePathComponents : uint8_t { Reject , Accept }
 

Functions

template<typename T >
void iox2_discard_result_impl (T &&) noexcept
 
template<uint64_t StringCapacity>
auto is_valid_path_entry (const bb::StaticString< StringCapacity > &name, RelativePathComponents relative_path_components) noexcept -> bool
 checks if the given string is a valid path entry. A path entry is the string between two path separators.
 
template<uint64_t StringCapacity>
auto is_valid_file_name (const bb::StaticString< StringCapacity > &name) noexcept -> bool
 checks if the given string is a valid filename. It must fulfill the requirements of a valid path entry (see, isValidPathEntry) and is not allowed to contain relative path components
 
template<uint64_t StringCapacity>
auto does_end_with_path_separator (const bb::StaticString< StringCapacity > &name) noexcept -> bool
 returns true if the provided name ends with a path separator, otherwise false
 
template<uint64_t StringCapacity>
auto is_valid_path_to_file (const StaticString< StringCapacity > &name) noexcept -> bool
 verifies if the given string is a valid path to a file
 
template<uint64_t StringCapacity>
auto is_valid_path_to_directory (const StaticString< StringCapacity > &name) noexcept -> bool
 returns true if the provided name is a valid path, otherwise false
 
template<uint64_t Capacity, typename T >
void swap (StaticFunction< Capacity, T > &left, StaticFunction< Capacity, T > &right) noexcept
 swap two static functions
 
template<uint64_t N>
auto get_size (const StaticString< N > &data) -> uint64_t
 
template<uint64_t N>
auto get_size (const CharArray< N > &data) -> uint64_t
 
template<uint64_t N>
auto get_data (const StaticString< N > &data) -> const char *
 
template<uint64_t N>
auto get_data (const CharArray< N > &data) -> const char *
 
auto file_name_does_contain_invalid_characters (const bb::StaticString< platform::IOX2_MAX_FILENAME_LENGTH > &value) noexcept -> bool
 
auto file_name_does_contain_invalid_content (const bb::StaticString< platform::IOX2_MAX_FILENAME_LENGTH > &value) noexcept -> bool
 
auto file_path_does_contain_invalid_characters (const bb::StaticString< platform::IOX2_MAX_PATH_LENGTH > &value) noexcept -> bool
 
auto file_path_does_contain_invalid_content (const bb::StaticString< platform::IOX2_MAX_PATH_LENGTH > &value) noexcept -> bool
 
auto path_does_contain_invalid_content (const bb::StaticString< platform::IOX2_MAX_PATH_LENGTH > &value IOX2_MAYBE_UNUSED) noexcept -> bool
 

Variables

constexpr char ASCII_A { 'a' }
 
constexpr char ASCII_Z { 'z' }
 
constexpr char ASCII_CAPITAL_A { 'A' }
 
constexpr char ASCII_CAPITAL_Z { 'Z' }
 
constexpr char ASCII_0 { '0' }
 
constexpr char ASCII_9 { '9' }
 
constexpr char ASCII_DASH { '-' }
 
constexpr char ASCII_DOT { '.' }
 
constexpr char ASCII_COLON { ':' }
 
constexpr char ASCII_UNDERSCORE { '_' }
 

Typedef Documentation

◆ CharArray

template<uint64_t N>
using iox2::bb::detail::CharArray = typedef char[N]

Definition at line 28 of file string_internal.hpp.

◆ Signature

template<typename ReturnType , typename... Args>
using iox2::bb::detail::Signature = typedef ReturnType(Args...)

Definition at line 27 of file static_function.hpp.

Enumeration Type Documentation

◆ RelativePathComponents

enum class iox2::bb::detail::RelativePathComponents : uint8_t
strong
Enumerator
Reject 
Accept 

Definition at line 50 of file path_and_file_verifier.hpp.

Function Documentation

◆ does_end_with_path_separator()

template<uint64_t StringCapacity>
auto iox2::bb::detail::does_end_with_path_separator ( const bb::StaticString< StringCapacity > &  name) -> bool
inlinenoexcept

returns true if the provided name ends with a path separator, otherwise false

Parameters
[in]namethe string which may contain a path separator at the end

Definition at line 222 of file path_and_file_verifier.hpp.

References iox2::bb::platform::IOX2_PATH_SEPARATORS.

Referenced by is_valid_path_to_file().

◆ file_name_does_contain_invalid_characters()

auto iox2::bb::detail::file_name_does_contain_invalid_characters ( const bb::StaticString< platform::IOX2_MAX_FILENAME_LENGTH > &  value) -> bool
inlinenoexcept

◆ file_name_does_contain_invalid_content()

auto iox2::bb::detail::file_name_does_contain_invalid_content ( const bb::StaticString< platform::IOX2_MAX_FILENAME_LENGTH > &  value) -> bool
inlinenoexcept

Definition at line 72 of file file_name.hpp.

◆ file_path_does_contain_invalid_characters()

auto iox2::bb::detail::file_path_does_contain_invalid_characters ( const bb::StaticString< platform::IOX2_MAX_PATH_LENGTH > &  value) -> bool
inlinenoexcept

◆ file_path_does_contain_invalid_content()

auto iox2::bb::detail::file_path_does_contain_invalid_content ( const bb::StaticString< platform::IOX2_MAX_PATH_LENGTH > &  value) -> bool
inlinenoexcept

Definition at line 83 of file file_path.hpp.

References is_valid_path_to_file().

◆ get_data() [1/2]

template<uint64_t N>
auto iox2::bb::detail::get_data ( const CharArray< N > &  data) -> const char*

Definition at line 46 of file string_internal.hpp.

◆ get_data() [2/2]

template<uint64_t N>
auto iox2::bb::detail::get_data ( const StaticString< N > &  data) -> const char*

Definition at line 41 of file string_internal.hpp.

◆ get_size() [1/2]

template<uint64_t N>
auto iox2::bb::detail::get_size ( const CharArray< N > &  data) -> uint64_t

Definition at line 36 of file string_internal.hpp.

◆ get_size() [2/2]

template<uint64_t N>
auto iox2::bb::detail::get_size ( const StaticString< N > &  data) -> uint64_t

◆ iox2_discard_result_impl()

template<typename T >
void iox2::bb::detail::iox2_discard_result_impl ( T &&  )
inlinenoexcept

We use this as an alternative to "static_cast<void>(someVar)" to signal the compiler an unused variable. "static_cast" produces an useless-cast warning on gcc and this approach solves it cleanly.

Definition at line 26 of file attributes.hpp.

◆ is_valid_file_name()

template<uint64_t StringCapacity>
auto iox2::bb::detail::is_valid_file_name ( const bb::StaticString< StringCapacity > &  name) -> bool
inlinenoexcept

checks if the given string is a valid filename. It must fulfill the requirements of a valid path entry (see, isValidPathEntry) and is not allowed to contain relative path components

Parameters
[in]namethe string to verify
Returns
true if the string is a filename, otherwise false

Definition at line 132 of file path_and_file_verifier.hpp.

References is_valid_path_entry(), and Reject.

Referenced by is_valid_path_to_directory(), and is_valid_path_to_file().

◆ is_valid_path_entry()

template<uint64_t StringCapacity>
auto iox2::bb::detail::is_valid_path_entry ( const bb::StaticString< StringCapacity > &  name,
RelativePathComponents  relative_path_components 
) -> bool
inlinenoexcept

checks if the given string is a valid path entry. A path entry is the string between two path separators.

Note
A valid path entry for iceoryx must be platform independent and also supported by various file systems. The file systems we intend to support are
  • linux: ext3, ext4, btrfs
  • windows: ntfs, exfat, fat
  • freebsd: ufs, ffs
  • apple: apfs
  • qnx: etfs
  • android: ext3, ext4, fat

Sometimes it is also possible that a certain file character is supported by the filesystem itself but not by the platforms SDK. One example are files which end with a dot like "myFile." which are supported by ntfs but not by the Windows SDK.

Parameters
[in]namethe path entry in question
[in]relativePathComponentsare relative path components are allowed for this path entry
Returns
true if it is valid, otherwise false

Definition at line 90 of file path_and_file_verifier.hpp.

References Accept, ASCII_0, ASCII_9, ASCII_A, ASCII_CAPITAL_A, ASCII_CAPITAL_Z, ASCII_COLON, ASCII_DASH, ASCII_DOT, ASCII_UNDERSCORE, ASCII_Z, and iox2::bb::StaticString< N >::from_utf8_unchecked().

Referenced by is_valid_file_name(), and is_valid_path_to_directory().

◆ is_valid_path_to_directory()

template<uint64_t StringCapacity>
auto iox2::bb::detail::is_valid_path_to_directory ( const StaticString< StringCapacity > &  name) -> bool
inlinenoexcept

returns true if the provided name is a valid path, otherwise false

Parameters
[in]namethe string to verify

Definition at line 173 of file path_and_file_verifier.hpp.

References Accept, iox2::bb::StaticString< N >::from_utf8_unchecked(), iox2::bb::platform::IOX2_PATH_SEPARATORS, is_valid_file_name(), and is_valid_path_entry().

Referenced by is_valid_path_to_file().

◆ is_valid_path_to_file()

template<uint64_t StringCapacity>
auto iox2::bb::detail::is_valid_path_to_file ( const StaticString< StringCapacity > &  name) -> bool
inlinenoexcept

verifies if the given string is a valid path to a file

Parameters
[in]namethe string to verify
Returns
true if the string is a path to a file, otherwise false

Definition at line 142 of file path_and_file_verifier.hpp.

References does_end_with_path_separator(), iox2::bb::platform::IOX2_PATH_SEPARATORS, is_valid_file_name(), and is_valid_path_to_directory().

Referenced by file_path_does_contain_invalid_content().

◆ path_does_contain_invalid_content()

auto iox2::bb::detail::path_does_contain_invalid_content ( const bb::StaticString< platform::IOX2_MAX_PATH_LENGTH > &value  IOX2_MAYBE_UNUSED) -> bool
inlinenoexcept

Definition at line 24 of file path.hpp.

◆ swap()

template<uint64_t Capacity, typename T >
void iox2::bb::detail::swap ( StaticFunction< Capacity, T > &  left,
StaticFunction< Capacity, T > &  right 
)
inlinenoexcept

swap two static functions

Parameters
fthe first function to swap with g
gthe second function to swap with f

Definition at line 339 of file static_function.hpp.

References swap().

Referenced by swap().

Variable Documentation

◆ ASCII_0

constexpr char iox2::bb::detail::ASCII_0 { '0' }
constexpr

◆ ASCII_9

constexpr char iox2::bb::detail::ASCII_9 { '9' }
constexpr

◆ ASCII_A

constexpr char iox2::bb::detail::ASCII_A { 'a' }
constexpr

◆ ASCII_CAPITAL_A

constexpr char iox2::bb::detail::ASCII_CAPITAL_A { 'A' }
constexpr

◆ ASCII_CAPITAL_Z

constexpr char iox2::bb::detail::ASCII_CAPITAL_Z { 'Z' }
constexpr

◆ ASCII_COLON

constexpr char iox2::bb::detail::ASCII_COLON { ':' }
constexpr

◆ ASCII_DASH

constexpr char iox2::bb::detail::ASCII_DASH { '-' }
constexpr

◆ ASCII_DOT

constexpr char iox2::bb::detail::ASCII_DOT { '.' }
constexpr

◆ ASCII_UNDERSCORE

constexpr char iox2::bb::detail::ASCII_UNDERSCORE { '_' }
constexpr

◆ ASCII_Z

constexpr char iox2::bb::detail::ASCII_Z { 'z' }
constexpr