mn_any.hpp
Go to the documentation of this file.
The real impl of the basic_any holder.
Definition: mn_any.hpp:59
T get()
Get the stored value.
Definition: mn_any.hpp:87
basic_any_holder_impl(T const &value)
Definition: mn_any.hpp:63
const T get() const
Get the stored value.
Definition: mn_any.hpp:92
static const int TYPE_SIZE()
Definition: mn_any.hpp:61
virtual basic_any_holder * clone() const override
Get a clone from this.
Definition: mn_any.hpp:79
virtual std::type_info const & type() const override
Get the type info of the given type.
Definition: mn_any.hpp:71
basic_any_holder_impl(T &&value)
Definition: mn_any.hpp:64
virtual std::type_info const & type() const =0
virtual iholder * clone() const =0
An Any class represents a general type and is capable of storing any type.
Definition: mn_any.hpp:45
~basic_any()
Deconstructor of this basic_any object.
Definition: mn_any.hpp:142
T * to_pointer()
Get the content as pointer.
Definition: mn_any.hpp:200
void construct(const self_type &other)
Helper function to construct the basic_any from other basic_any.
Definition: mn_any.hpp:241
self_type & swap(any &other) noexcept
Swaps the content of the two Anys.
Definition: mn_any.hpp:154
bool has_value() const noexcept
Has the basic_any any value?
Definition: mn_any.hpp:165
basic_any(const self_type &other)
Copy constructor, works with both empty and initialized Any values.
Definition: mn_any.hpp:126
self_type & operator=(self_type &&other) noexcept
Assignment operator for basic_any.
Definition: mn_any.hpp:216
void deconstruct(bool bdelete=false)
Helper function to deconstruct.
Definition: mn_any.hpp:261
self_type & operator=(const T &other) noexcept
Assignment operator for all types.
Definition: mn_any.hpp:225
holder_type m_asyContent
Holder of the value.
Definition: mn_any.hpp:269
const T * to_pointer() const
Get the content as pointer.
Definition: mn_any.hpp:190
const std::type_info & type() const noexcept
Returns the type information of the stored content.
Definition: mn_any.hpp:181
constexpr basic_any() noexcept
Construct an empty basic_any type.
Definition: mn_any.hpp:112
bool is_empty() const noexcept
if the basic_any empty?
Definition: mn_any.hpp:173
basic_any(const T &other)
Construct an any which stores the init parameter inside.
Definition: mn_any.hpp:119
self_type & operator=(const self_type &other) noexcept
Assignment operator for basic_any.
Definition: mn_any.hpp:208
basic_any(self_type &&other) noexcept
Copy constructor, works with both empty and initialized Any values.
Definition: mn_any.hpp:134
void construct(const T &other)
Helper function to construct the basic_any from value.
Definition: mn_any.hpp:252
Basic algorithmens This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniT...
const T * any_cast(const basic_any *other) noexcept
Definition: mn_any.hpp:292
struct mn::memory::detail::ptr_difference T
Definition: mn_atomic_singleton.hpp:38
Definition: mn_allocator_typetraits.hpp:25