Stroika Library 3.0d23
 
Loading...
Searching...
No Matches
LocalDocumentDB.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3 */
4
5namespace Stroika::Foundation::Database::Document::LocalDocumentDB {
6
7 /*
8 ********************************************************************************
9 ****************************** LocalDocumentDB::Ptr ****************************
10 ********************************************************************************
11 */
12 inline LocalDocumentDB::Ptr::Ptr (const Ptr& src)
13 : Ptr{Debug::UncheckedDynamicPointerCast<IRep> (src)}
14 {
15 }
16 inline LocalDocumentDB::Ptr::Ptr (const shared_ptr<IRep>& src)
17 : inherited{src}
18 {
19 }
20 inline LocalDocumentDB::Ptr::Ptr (nullptr_t) noexcept
21 : inherited{static_cast<shared_ptr<IRep>> (nullptr)}
22 {
23 }
24 inline LocalDocumentDB::Ptr& LocalDocumentDB::Ptr::operator= (const Ptr& src)
25 {
26 inherited::operator= (src);
27 return *this;
28 }
29 inline LocalDocumentDB::Ptr& LocalDocumentDB::Ptr::operator= (Ptr&& src) noexcept
30 {
31 inherited::operator= (move (src));
32 return *this;
33 }
34 inline LocalDocumentDB::IRep* LocalDocumentDB::Ptr::operator->() const noexcept
35 {
36 return Debug::UncheckedDynamicPointerCast<IRep> (*this).get ();
37 }
38 inline void LocalDocumentDB::Ptr::Flush () const
39 {
40 Debug::UncheckedDynamicPointerCast<IRep> (*this)->Flush ();
41 }
42
43}
std::shared_ptr< T > UncheckedDynamicPointerCast(const std::shared_ptr< T1 > &arg) noexcept
Produce the same result as dynamic_pointer_cast if the successful case (non-null) - with better perfo...
Definition Cast.inl:42