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

Namespaces

namespace  concurrent
 
namespace  detail
 
namespace  er
 
namespace  internal
 
namespace  log
 

Classes

struct  add_const_conditionally
 Conditionally add const to type T if C has the const qualifier. More...
 
struct  add_const_conditionally< T, const C >
 
struct  bool_pack
 
struct  conjunction
 Implementation of C++17 std::conjunction. More...
 
struct  conjunction< Arg >
 
struct  conjunction< Arg, Args... >
 
class  convert
 Collection of static methods for conversion from and to string. More...
 
class  expected
 Implementation of the C++23 expected class which can contain an error or a success value. More...
 
class  HoofsErrorType
 
struct  in_place_index
 helper struct to perform an emplacement at a predefined index in the constructor of a variant More...
 
struct  in_place_t
 helper struct which is used to call the in-place-construction constructor More...
 
struct  in_place_type
 helper struct to perform an emplacement of a predefined type in in the constructor of a variant More...
 
struct  is_char_array
 struct to check whether an argument is a char array More...
 
struct  is_char_array< char[N]>
 
struct  is_function_pointer
 Check whether T is a function pointer with arbitrary signature. More...
 
struct  is_function_pointer< ReturnType(*)(ArgTypes...)>
 
struct  is_invocable
 Verifies whether the passed Callable type is in fact invocable with the given arguments. More...
 
struct  is_invocable_r
 Verifies whether the passed Callable type is in fact invocable with the given arguments and the result of the invocation is convertible to ReturnType. More...
 
struct  negation
 Implementation of C++17 negation. More...
 
struct  NonZeroedBuffer
 struct used as policy parameter in UninitializedArray to wrap an uninitialized array More...
 
class  PolymorphicHandler
 Implements a singleton handler that has a default instance and can be changed to another instance at runtime. All instances have to derive from the same interface. The singleton handler owns the default instance but all other instances are created externally. More...
 
class  PosixCallBuilder
 
class  PosixCallEvaluator
 class which is created by the verificator to evaluate the result of a posix call More...
 
struct  PosixCallResult
 result of a posix call More...
 
class  PosixCallVerificator
 class which verifies the return value of a posix function call More...
 
struct  remove_cvref
 Implementation of C++20's std::remove_cvref. More...
 
class  StaticLifetimeGuard
 Manages a static instance of type T in a way so that each existing StaticLifetimeGuard prevents the destruction of the instance. More...
 
struct  unexpect_t
 helper struct which is used to call the in-place-construction constructor for error types More...
 
class  UninitializedArray
 Wrapper class for a C-style array of type ElementType and size Capacity. Per default it is uninitialized but all elements can be zeroed via template parameter ZeroedBuffer. More...
 
class  variant
 Variant implementation from the C++17 standard with C++11. The interface is inspired by the C++17 standard but it has changes in get and emplace since we are not allowed to throw exceptions. More...
 
struct  ZeroedBuffer
 struct used as policy parameter in UninitializedArray to wrap an array with all elements zeroed More...
 

Typedefs

template<typename T >
using enable_if_non_void_t = typename std::enable_if<!std::is_void< T >::value, T >::type
 helper trait for SFINEA to disable specific functions for 'void' value type
 
template<typename T >
using enable_if_void_t = typename std::enable_if< std::is_void< T >::value, T >::type
 helper trait for SFINEA to disable specific functions for non 'void' value type
 
template<typename T >
using enable_if_not_lvalue_referece_t = typename std::enable_if<!std::is_lvalue_reference< T >::value, T >::type
 helper trait for SFINEA to disable specific functions for lvalue references
 
template<typename T = void>
using success = detail::ok< T >
 
template<typename T >
using error = detail::err< T >
 
template<typename T , typename C >
using add_const_conditionally_t = typename add_const_conditionally< T, C >::type
 Helper type for add_const_conditionally which adds const to type T if C has the const qualifier.
 
template<typename C , typename... Cargs>
using invoke_result = std::result_of< C(Cargs...)>
 
template<typename... >
using void_t = void
 Maps a sequence of any types to the type void.
 
template<bool B>
using bool_constant = std::integral_constant< bool, B >
 Implementation C++17 bool_constant helper.
 
template<typename T >
using remove_cvref_t = typename remove_cvref< T >::type_t
 Implementation of C++20's std::remove_cvref_t.
 
template<typename T >
using is_c_array_t = std::is_array< std::remove_reference_t< T > >
 
template<typename T >
using is_not_c_array_t = iox2::legacy::negation< is_c_array_t< T > >
 
template<typename From , typename To >
using is_convertible_t = std::is_convertible< From(*)[], To(*)[]>
 
template<typename Iter >
using iter_reference_t = decltype(*std::declval< Iter & >())
 
template<typename Iter , typename T >
using iter_has_convertible_ref_type_t = iox2::legacy::is_convertible_t< std::remove_reference_t< iter_reference_t< Iter > >, T >
 

Enumerations

enum class  HoofsError : iox2::legacy::er::ErrorCode::type { IOX2_CREATE_ERROR_ENUM =(DO_NOT_USE_AS_ERROR_THIS_IS_AN_INTERNAL_MARKER) }
 

Functions

static const charasStringLiteral (const HoofsError error)
 
const charasStringLiteral (const er::ViolationErrorCode error) noexcept
 
template<typename T = void, typename = enable_if_void_t<T>>
detail::ok< voidok ()
 convenience function to create an 'expected' with a 'void' value type
 
template<typename T , typename = enable_if_non_void_t<T>>
detail::ok< Tok (const T &value)
 convenience function to create an 'expected' with a value type by copy
 
template<typename T , typename = enable_if_non_void_t<T>, typename = enable_if_not_lvalue_referece_t<T>>
detail::ok< Tok (T &&value)
 convenience function to create an 'expected' with a value type by move
 
template<typename T , typename... Targs, typename = enable_if_non_void_t<T>>
detail::ok< Tok (Targs &&... args)
 convenience function to create an 'expected' with a value type by argument forwarding
 
template<typename T >
detail::err< Terr (const T &error)
 convenience function to create an 'expected' with an error type by copy
 
template<typename T , typename = enable_if_not_lvalue_referece_t<T>>
detail::err< Terr (T &&error)
 convenience function to create an 'expected' with an error type by move
 
template<typename T , typename... Targs>
detail::err< Terr (Targs &&... args)
 convenience function to create an 'expected' with an error type by argument forwarding
 
template<typename ValueType , typename ErrorType >
constexpr bool operator== (const expected< ValueType, ErrorType > &lhs, const expected< ValueType, ErrorType > &rhs) noexcept
 equality check for two distinct expected types
 
template<typename ValueType , typename ErrorType >
constexpr bool operator!= (const expected< ValueType, ErrorType > &lhs, const expected< ValueType, ErrorType > &rhs) noexcept
 inequality check for two distinct expected types
 
template<typename T , uint64_t N, template< typename, uint64_t > class Buffer>
constexpr uint64_t size (const UninitializedArray< T, N, Buffer > &) noexcept
 Returns N.
 
template<typename T , typename... Types>
constexpr bool holds_alternative (const variant< Types... > &variant) noexcept
 returns true if the variant holds a given type T, otherwise false
 
template<typename... Types>
constexpr bool operator== (const variant< Types... > &lhs, const variant< Types... > &rhs) noexcept
 equality check for two distinct variant types
 
template<typename... Types>
constexpr bool operator!= (const variant< Types... > &lhs, const variant< Types... > &rhs) noexcept
 inequality check for two distinct variant types
 

Variables

constexpr in_place_t in_place {}
 
constexpr unexpect_t unexpect {}
 
static constexpr uint32_t POSIX_CALL_ERROR_STRING_SIZE = 128U
 
static constexpr uint64_t POSIX_CALL_EINTR_REPETITIONS = 5U
 
static constexpr int32_t POSIX_CALL_INVALID_ERRNO = -1
 
template<typename >
constexpr bool always_false_v { false }
 Helper value to bind a static_assert to a type.
 
template<class From , class To >
constexpr bool is_convertible_v = std::is_convertible<From, To>::value
 Helper template from C++17.
 
static constexpr uint64_t INVALID_VARIANT_INDEX { std::numeric_limits<uint64_t>::max() }
 value which an invalid variant index occupies
 

Typedef Documentation

◆ add_const_conditionally_t

Helper type for add_const_conditionally which adds const to type T if C has the const qualifier.

Definition at line 39 of file type_traits.hpp.

◆ bool_constant

template<bool B>
using iox2::legacy::bool_constant = typedef std::integral_constant<bool, B>

Implementation C++17 bool_constant helper.

Definition at line 132 of file type_traits.hpp.

◆ enable_if_non_void_t

template<typename T >
using iox2::legacy::enable_if_non_void_t = typedef typename std::enable_if<!std::is_void<T>::value, T>::type

helper trait for SFINEA to disable specific functions for 'void' value type

Template Parameters
Ttype to be checked for 'void'

Definition at line 35 of file expected_helper.hpp.

◆ enable_if_not_lvalue_referece_t

template<typename T >
using iox2::legacy::enable_if_not_lvalue_referece_t = typedef typename std::enable_if<!std::is_lvalue_reference<T>::value, T>::type

helper trait for SFINEA to disable specific functions for lvalue references

Template Parameters
Ttype to be checked for lvalue reference

Definition at line 45 of file expected_helper.hpp.

◆ enable_if_void_t

template<typename T >
using iox2::legacy::enable_if_void_t = typedef typename std::enable_if<std::is_void<T>::value, T>::type

helper trait for SFINEA to disable specific functions for non 'void' value type

Template Parameters
Ttype to be checked for 'void'

Definition at line 40 of file expected_helper.hpp.

◆ error

Definition at line 32 of file expected.hpp.

◆ invoke_result

template<typename C , typename... Cargs>
using iox2::legacy::invoke_result = typedef std::result_of<C(Cargs...)>

Definition at line 55 of file type_traits.hpp.

◆ is_c_array_t

template<typename T >
using iox2::legacy::is_c_array_t = typedef std::is_array<std::remove_reference_t<T> >

Definition at line 170 of file type_traits.hpp.

◆ is_convertible_t

template<typename From , typename To >
using iox2::legacy::is_convertible_t = typedef std::is_convertible<From (*)[], To (*)[]>

Definition at line 177 of file type_traits.hpp.

◆ is_not_c_array_t

◆ iter_has_convertible_ref_type_t

◆ iter_reference_t

Definition at line 180 of file type_traits.hpp.

◆ remove_cvref_t

Implementation of C++20's std::remove_cvref_t.

Definition at line 167 of file type_traits.hpp.

◆ success

Definition at line 29 of file expected.hpp.

◆ void_t

template<typename... >
using iox2::legacy::void_t = typedef void

Maps a sequence of any types to the type void.

Definition at line 128 of file type_traits.hpp.

Enumeration Type Documentation

◆ HoofsError

Enumerator
IOX2_CREATE_ERROR_ENUM 

Definition at line 47 of file hoofs_error_reporting.hpp.

Function Documentation

◆ asStringLiteral() [1/2]

const char * iox2::legacy::asStringLiteral ( const er::ViolationErrorCode  error)
noexcept

◆ asStringLiteral() [2/2]

static const char * iox2::legacy::asStringLiteral ( const HoofsError  error)
static

◆ err() [1/3]

template<typename T >
detail::err< T > iox2::legacy::err ( const T error)

convenience function to create an 'expected' with an error type by copy

Template Parameters
Terror type for the 'expected'
Parameters
[in]erroris the error for the 'expected'
//...
return err(37);
}
Implementation of the C++23 expected class which can contain an error or a success value.
Definition expected.hpp:150
constexpr bool always_false_v
Helper value to bind a static_assert to a type.
detail::err< T > err(const T &error)
convenience function to create an 'expected' with an error type by copy

◆ err() [2/3]

template<typename T , typename = enable_if_not_lvalue_referece_t<T>>
detail::err< T > iox2::legacy::err ( T &&  error)

convenience function to create an 'expected' with an error type by move

Template Parameters
Terror type for the 'expected'
Parameters
[in]erroris the error for the 'expected'
//...
//...
return err(std::move(e));
}

◆ err() [3/3]

template<typename T , typename... Targs>
detail::err< T > iox2::legacy::err ( Targs &&...  args)

convenience function to create an 'expected' with an error type by argument forwarding

Template Parameters
Terror type for the 'expected'
Targstypes for the constructor of the error type
Parameters
[in]args...arguments which will be perfectly forwarded to the error type constructor
//...
return err<SomeError>(13, "Friday");
}

◆ holds_alternative()

template<typename T , typename... Types>
constexpr bool iox2::legacy::holds_alternative ( const variant< Types... > &  variant)
constexprnoexcept

returns true if the variant holds a given type T, otherwise false

◆ ok() [1/4]

template<typename T = void, typename = enable_if_void_t<T>>
detail::ok< void > iox2::legacy::ok ( )

convenience function to create an 'expected' with a 'void' value type

Template Parameters
Thelper template parameter for SFINEA
//...
return ok();
}
detail::ok< void > ok()
convenience function to create an 'expected' with a 'void' value type

◆ ok() [2/4]

template<typename T , typename = enable_if_non_void_t<T>>
detail::ok< T > iox2::legacy::ok ( const T value)

convenience function to create an 'expected' with a value type by copy

Template Parameters
Tvalue type for the 'expected'
Parameters
[in]valueis the value for the 'expected'
//...
return ok(true);
}

◆ ok() [3/4]

template<typename T , typename = enable_if_non_void_t<T>, typename = enable_if_not_lvalue_referece_t<T>>
detail::ok< T > iox2::legacy::ok ( T &&  value)

convenience function to create an 'expected' with a value type by move

Template Parameters
Tvalue type for the 'expected'
Parameters
[in]valueis the value for the 'expected'
//...
//...
return ok(std::move(m));
}

◆ ok() [4/4]

template<typename T , typename... Targs, typename = enable_if_non_void_t<T>>
detail::ok< T > iox2::legacy::ok ( Targs &&...  args)

convenience function to create an 'expected' with a value type by argument forwarding

Template Parameters
Tvalue type for the 'expected'
Targstypes for the constructor of the value type
Parameters
[in]args...arguments which will be perfectly forwarded to the value type constructor

◆ operator!=() [1/2]

template<typename ValueType , typename ErrorType >
constexpr bool iox2::legacy::operator!= ( const expected< ValueType, ErrorType > &  lhs,
const expected< ValueType, ErrorType > &  rhs 
)
constexprnoexcept

inequality check for two distinct expected types

Template Parameters
ValueTypetype of the value stored in the expected
ErrorTypetype of the error stored in the expected
Parameters
[in]lhsleft side of the comparison
[in]rhsright side of the comparison
Returns
true if the expecteds are not equal, otherwise false

◆ operator!=() [2/2]

template<typename... Types>
constexpr bool iox2::legacy::operator!= ( const variant< Types... > &  lhs,
const variant< Types... > &  rhs 
)
constexprnoexcept

inequality check for two distinct variant types

Template Parameters
Typesvariadic number of types which can be stored in the variant
Parameters
[in]lhsleft side of the comparison
[in]rhsright side of the comparison
Returns
true if the variants are not equal, otherwise false

◆ operator==() [1/2]

template<typename ValueType , typename ErrorType >
constexpr bool iox2::legacy::operator== ( const expected< ValueType, ErrorType > &  lhs,
const expected< ValueType, ErrorType > &  rhs 
)
constexprnoexcept

equality check for two distinct expected types

Template Parameters
ValueTypetype of the value stored in the expected
ErrorTypetype of the error stored in the expected
Parameters
[in]lhsleft side of the comparison
[in]rhsright side of the comparison
Returns
true if the expecteds are equal, otherwise false

◆ operator==() [2/2]

template<typename... Types>
constexpr bool iox2::legacy::operator== ( const variant< Types... > &  lhs,
const variant< Types... > &  rhs 
)
constexprnoexcept

equality check for two distinct variant types

Template Parameters
Typesvariadic number of types which can be stored in the variant
Parameters
[in]lhsleft side of the comparison
[in]rhsright side of the comparison
Returns
true if the variants are equal, otherwise false

◆ size()

template<typename T , uint64_t N, template< typename, uint64_t > class Buffer>
constexpr uint64_t iox2::legacy::size ( const UninitializedArray< T, N, Buffer > &  )
constexprnoexcept

Returns N.

Template Parameters
TType of the iox2::legacy::UninitializedArray
NSize of the iox2::legacy::UninitializedArray
Parameters
Aniox2::legacy::UninitializedArray
Returns
Size of the iox2::legacy::UninitializedArray

Variable Documentation

◆ always_false_v

template<typename >
constexpr bool iox2::legacy::always_false_v { false }
constexpr

Helper value to bind a static_assert to a type.

static_assert(always_false_v<Foo>, "Not implemented for the given type!");

Definition at line 48 of file type_traits.hpp.

Referenced by asStringLiteral(), iox2::legacy::concurrent::Atomic< T >::Atomic(), iox2::legacy::concurrent::Atomic< T >::compare_exchange_strong(), iox2::legacy::concurrent::Atomic< T >::compare_exchange_strong(), iox2::legacy::concurrent::Atomic< T >::compare_exchange_strong(), iox2::legacy::concurrent::Atomic< T >::compare_exchange_strong(), iox2::legacy::concurrent::Atomic< T >::compare_exchange_weak(), iox2::legacy::concurrent::Atomic< T >::compare_exchange_weak(), iox2::legacy::concurrent::Atomic< T >::compare_exchange_weak(), iox2::legacy::concurrent::Atomic< T >::compare_exchange_weak(), iox2::legacy::internal::call_at_index< N, T, Targs >::copy(), iox2::legacy::internal::call_at_index< N, T >::copy(), iox2::legacy::internal::call_at_index< N, T, Targs >::copyConstructor(), iox2::legacy::internal::call_at_index< N, T >::copyConstructor(), iox2::legacy::StaticLifetimeGuard< T >::count(), iox2::legacy::internal::call_at_index< N, T, Targs >::destructor(), iox2::legacy::internal::call_at_index< N, T >::destructor(), iox2::legacy::internal::call_at_index< N, T, Targs >::equality(), iox2::legacy::internal::call_at_index< N, T >::equality(), iox2::legacy::detail::expected_storage< ValueType, ErrorType >::error_unchecked(), iox2::legacy::detail::expected_storage< void, ErrorType >::error_unchecked(), iox2::legacy::detail::expected_storage< ValueType, ErrorType >::error_unchecked(), iox2::legacy::detail::expected_storage< void, ErrorType >::error_unchecked(), iox2::legacy::concurrent::Atomic< T >::exchange(), iox2::legacy::concurrent::Atomic< T >::exchange(), iox2::legacy::concurrent::Atomic< T >::fetch_add(), iox2::legacy::concurrent::Atomic< T >::fetch_add(), iox2::legacy::concurrent::Atomic< T >::fetch_add(), iox2::legacy::concurrent::Atomic< T >::fetch_add(), iox2::legacy::concurrent::Atomic< T >::fetch_and(), iox2::legacy::concurrent::Atomic< T >::fetch_and(), iox2::legacy::concurrent::Atomic< T >::fetch_or(), iox2::legacy::concurrent::Atomic< T >::fetch_or(), iox2::legacy::concurrent::Atomic< T >::fetch_sub(), iox2::legacy::concurrent::Atomic< T >::fetch_sub(), iox2::legacy::concurrent::Atomic< T >::fetch_sub(), iox2::legacy::concurrent::Atomic< T >::fetch_sub(), iox2::legacy::concurrent::Atomic< T >::fetch_xor(), iox2::legacy::concurrent::Atomic< T >::fetch_xor(), iox2::legacy::er::forwardFatalError(), iox2::legacy::er::forwardFatalError(), iox2::legacy::er::forwardNonFatalError(), iox2::legacy::er::forwardPanic(), iox2::bb::From< SourceType, DestinationType >::from(), iox2::legacy::convert::from_string(), iox2::legacy::log::internal::is_log_level_active(), iox2::legacy::detail::compare_expected_value< T, E >::is_same_value_unchecked(), iox2::legacy::concurrent::Atomic< T >::load(), iox2::legacy::concurrent::Atomic< T >::load(), iox2::legacy::log::ConsoleLogger::logRaw(), iox2::legacy::er::detail::logStringifiedCondition(), iox2::legacy::internal::call_at_index< N, T, Targs >::move(), iox2::legacy::internal::call_at_index< N, T >::move(), iox2::legacy::internal::call_at_index< N, T, Targs >::moveConstructor(), iox2::legacy::internal::call_at_index< N, T >::moveConstructor(), iox2::legacy::concurrent::Atomic< bool >::operator bool(), iox2::legacy::concurrent::Atomic< bool >::operator bool(), iox2::legacy::er::ErrorCode::operator!=(), iox2::legacy::er::ModuleId::operator!=(), iox2::legacy::er::Violation::operator!=(), iox2::bb::operator*=(), iox2::legacy::er::ErrorCode::operator==(), iox2::legacy::er::ModuleId::operator==(), iox2::legacy::er::Violation::operator==(), iox2::legacy::er::panic(), iox2::legacy::er::panic(), iox2::legacy::er::report(), iox2::legacy::er::report(), iox2::legacy::er::report(), iox2::legacy::er::report(), iox2::legacy::er::report(), iox2::legacy::er::detail::report(), iox2::legacy::er::detail::report(), iox2::legacy::er::report(), iox2::legacy::concurrent::Atomic< T >::store(), iox2::legacy::concurrent::Atomic< T >::store(), iox2::legacy::er::detail::unreachable_wrapped(), iox2::legacy::detail::expected_storage< ValueType, ErrorType >::value_unchecked(), and iox2::legacy::detail::expected_storage< ValueType, ErrorType >::value_unchecked().

◆ in_place

constexpr in_place_t iox2::legacy::in_place {}
constexpr

Definition at line 26 of file expected_helper.hpp.

◆ INVALID_VARIANT_INDEX

constexpr uint64_t iox2::legacy::INVALID_VARIANT_INDEX { std::numeric_limits<uint64_t>::max() }
staticconstexpr

value which an invalid variant index occupies

// every unset variant has an invalid variant in the beginning
if ( someVariant.index() == INVALID_VARIANT_INDEX ) ...
// variant with setted value therefore the index is not invalid
if ( someVariant.index() != INVALID_VARIANT_INDEX ) ...
Variant implementation from the C++17 standard with C++11. The interface is inspired by the C++17 sta...
Definition variant.hpp:101
constexpr variant() noexcept=default
the default constructor constructs a variant which does not contain an element and returns INVALID_VA...
static constexpr uint64_t INVALID_VARIANT_INDEX
value which an invalid variant index occupies
Definition variant.hpp:65
helper struct to perform an emplacement of a predefined type in in the constructor of a variant
Definition variant.hpp:49

Definition at line 65 of file variant.hpp.

◆ is_convertible_v

template<class From , class To >
constexpr bool iox2::legacy::is_convertible_v = std::is_convertible<From, To>::value
constexpr

Helper template from C++17.

Template Parameters
FromSource type
ToDestination type

Definition at line 190 of file type_traits.hpp.

◆ POSIX_CALL_EINTR_REPETITIONS

constexpr uint64_t iox2::legacy::POSIX_CALL_EINTR_REPETITIONS = 5U
staticconstexpr

Definition at line 27 of file posix_call.hpp.

◆ POSIX_CALL_ERROR_STRING_SIZE

constexpr uint32_t iox2::legacy::POSIX_CALL_ERROR_STRING_SIZE = 128U
staticconstexpr

Definition at line 26 of file posix_call.hpp.

◆ POSIX_CALL_INVALID_ERRNO

constexpr int32_t iox2::legacy::POSIX_CALL_INVALID_ERRNO = -1
staticconstexpr

Definition at line 28 of file posix_call.hpp.

◆ unexpect

constexpr unexpect_t iox2::legacy::unexpect {}
constexpr

Definition at line 30 of file expected_helper.hpp.