29 template<
class type_t>
66 template<
class po
inter_t>
70 template<
class value_t>
74 template<
class value_t>
78 template<
class value_t>
82 template<
class value_t>
83 explicit shared_ptr_object(
const std::shared_ptr<value_t>& value) noexcept : ptr_ {value} {}
96 template<
class value_t>
101 template<
class value_t>
106 template<
class value_t>
152 void reset() noexcept {ptr_.reset();}
156 template<
class po
inter_t>
170 template<
typename target_t>
180 template<
typename target_t>
194 ptr_ = std::move(value.ptr_);
207 template<
class value_t>
209 ptr_ = std::move(value.ptr_);
215 template<
class value_t>
223 template<
class value_t>
225 ptr_ = std::move(value);
231 template<
class value_t>
239 type_t&
operator *() const noexcept {
return ptr_.operator *();}
252 explicit operator bool() const noexcept {
return ptr_.operator bool();}
260 template<
class other_t>
Represents text as a sequence of character units.
Definition basic_string.hpp:71
static xtd::size combine(args_t... values) noexcept
Combines values into a hash code.
Definition hash_code.hpp:70
Defines a generalized comparison method that a value type or class implements to create a type-specif...
Definition icomparable.hpp:21
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition iequatable.hpp:22
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:43
The xtd::shared_ptr_object is a shared pointer as std::shared_ptr.
Definition shared_ptr_object.hpp:30
element_type & operator[](std::ptrdiff_t index) const
Provides indexed access to the stored array.
Definition shared_ptr_object.hpp:248
bool equals(const shared_ptr_object &value) const noexcept override
Indicates whether the current object is equal to another object of the same type.
Definition shared_ptr_object.hpp:140
type_t * operator->() const noexcept
Gets the stored pointer.
Definition shared_ptr_object.hpp:243
type_t & operator*() const noexcept
Gets the stored object.
Definition shared_ptr_object.hpp:239
shared_ptr_object() noexcept=default
Initializes a new instance of the xtd::shared_ptr_object class.
shared_ptr_object(shared_ptr_object< value_t > &&value) noexcept
Initializes a new instance of the xtd::shared_ptr_object class with specified shared pointer object.
Definition shared_ptr_object.hpp:71
bool is_unique() const noexcept
Checks whether the managed object is managed only by the current xtd::shared_ptr_object object.
Definition shared_ptr_object.hpp:91
void reset() noexcept
Reset the current object. Set the current object to null.
Definition shared_ptr_object.hpp:152
bool equals(const xtd::object &value) const noexcept override
Determines whether the specified object is equal to the current object.
Definition shared_ptr_object.hpp:136
bool owner_before(const shared_ptr_object< value_t > &other) const noexcept
Provides owner-based ordering of shared pointers.
Definition shared_ptr_object.hpp:97
void reset(pointer_t *ptr) noexcept
Reset the current object. Set the current object with specified pointer.
Definition shared_ptr_object.hpp:157
shared_ptr_object & operator=(shared_ptr_object &&value) noexcept
Assignment operator with specified xtd::shared_ptr_object value.
Definition shared_ptr_object.hpp:193
type_t & to_object() const noexcept
Gets the stored object.
Definition shared_ptr_object.hpp:165
shared_ptr_object(const shared_ptr_object &value) noexcept
Initializes a new instance of the xtd::shared_ptr_object class with specified shared pointer object.
Definition shared_ptr_object.hpp:63
shared_ptr_object(pointer_t *ptr) noexcept
Initializes a new instance of the xtd::shared_ptr_object class with specified pointer.
Definition shared_ptr_object.hpp:67
base_type pointer() const noexcept
Returns the underlying base type pointer.
Definition shared_ptr_object.hpp:111
int32 compare_to(const shared_ptr_object &obj) const noexcept override
Compares the current instance with another object of the same type.
Definition shared_ptr_object.hpp:131
static const shared_ptr_object empty
Represents the empty xtd::shared_ptr_object. This field is constant.
Definition shared_ptr_object.hpp:47
element_type * get() const noexcept
Gets the stored pointer.
Definition shared_ptr_object.hpp:144
shared_ptr_object(shared_ptr_object &&value) noexcept
Initializes a new instance of the xtd::shared_ptr_object class with specified shared pointer object.
Definition shared_ptr_object.hpp:60
xtd::string to_string() const noexcept override
Returns a xtd::string that represents the current object.
typename base_type::weak_type weak_type
Represent the weak type.
Definition shared_ptr_object.hpp:40
void swap(shared_ptr_object &ptr) noexcept
Swaps this current instance with specified shared pointer object.
Definition shared_ptr_object.hpp:161
shared_ptr_object(const std::shared_ptr< value_t > &value) noexcept
Initializes a new instance of the xtd::shared_ptr_object class with specified shared pointer object.
Definition shared_ptr_object.hpp:83
shared_ptr_object(base_type &&value) noexcept
Initializes a new instance of the xtd::shared_ptr_object class with specified shared pointer object.
Definition shared_ptr_object.hpp:79
bool owner_before(const std::weak_ptr< value_t > &other) const noexcept
Provides owner-based ordering of shared pointers.
Definition shared_ptr_object.hpp:107
shared_ptr_object(const shared_ptr_object< value_t > &value) noexcept
Initializes a new instance of the xtd::shared_ptr_object class with specified shared pointer object.
Definition shared_ptr_object.hpp:75
bool owner_before(const std::shared_ptr< value_t > &other) const noexcept
Provides owner-based ordering of shared pointers.
Definition shared_ptr_object.hpp:102
std::shared_ptr< type_t > base_type
Represents the base type (std::shared_ptr<type_t>)
Definition shared_ptr_object.hpp:36
xtd::size get_hash_code() const noexcept override
Serves as a hash function for a particular type.
Definition shared_ptr_object.hpp:148
type_t * to_pointer() const noexcept
Gets the stored pointer.
Definition shared_ptr_object.hpp:175
target_t to_object() const
Gets the stored object with specified target_t type.
xtd::size use_count() const noexcept
Gets the number of xtd::shared_ptr_object objects referring to the same managed object.
Definition shared_ptr_object.hpp:115
target_t * to_pointer() const
Gets the stored pointer with specified target_t type.
typename base_type::element_type element_type
Represent the element type.
Definition shared_ptr_object.hpp:38
int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
null_ptr null
Represents a null pointer value.
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
std::nullptr_t null_ptr
Represents the null_opt alias on std::nullptr_t.
Definition null_ptr.hpp:19
@ other
The operating system is other.
Contains xtd::hash_code class.
Contains xtd::icomparable interface.
Contains xtd::iequatable interface.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Contains xtd::null_ptr alias.
Contains xtd::object class.