Go to the documentation of this file.
15 #ifndef _FASTCDR_XCDR_EXTERNAL_HPP_
16 #define _FASTCDR_XCDR_EXTERNAL_HPP_
20 #include "../exceptions/LockedExternalAccessException.hpp"
41 bool locked =
false) noexcept
49 std::shared_ptr<T> pointer) noexcept
61 pointer_ = std::make_shared<T>(*other.pointer_);
124 const T*
get() const noexcept
158 return !(*
this == other);
162 operator bool() const noexcept
190 #endif //_FASTCDR_XCDR_EXTERNAL_HPP_
static const Cdr_DllAPI char *const LOCKED_EXTERNAL_ACCESS_MESSAGE_DEFAULT
Default message used in the library.
T * get() noexcept
Get pointer.
external(std::shared_ptr< T > pointer) noexcept
Constructor from a shared pointer.
external(const external< T > &other) noexcept
Copy constructor.
~external()=default
Destructor.
bool operator==(const external< T > &other) const
Compares they manage the same object or empty both.
This class is thrown as an exception when accessing to set the value of a locked external.
bool operator!=(const external< T > &other) const
Compares they don't manages the same object.
This class template manages an external member, a member declared to be external to the storage of a ...
external< T > & operator=(const external< T > &other)
Assignment.
void lock() noexcept
Locks the managed object.
T & operator*() noexcept
Dereference object.
std::shared_ptr< T > pointer_
external(T *pointer, bool locked=false) noexcept
Constructor from a pointer.
T * operator->() noexcept
Dereference object member.
bool is_locked() const noexcept
Checks if locked.
external()=default
Default constructor.
std::shared_ptr< T > get_shared_ptr() noexcept
Get shared pointer.
const T * get() const noexcept
Get pointer.
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:44