Stroika Library 3.0d20
 
Loading...
Searching...
No Matches
Archive/Writer.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
5namespace Stroika::Foundation::DataExchange::Archive::Writer {
6
7 /*
8 ********************************************************************************
9 ******************** DataExchange::Archive::Writer::Ptr ************************
10 ********************************************************************************
11 */
12 inline Ptr::Ptr (const shared_ptr<IRep>& rep)
13 : fRep_{rep}
14 {
15 }
16 inline Ptr::Ptr (Ptr&& src)
17 : fRep_{move (src.fRep_)}
18 {
19 }
20 inline IRep& Ptr::_GetRep ()
21 {
22 EnsureNotNull (fRep_.get ());
23 return *fRep_;
24 }
25 inline const IRep& Ptr::_GetRep () const
26 {
27 EnsureNotNull (fRep_.get ());
28 return *fRep_;
29 }
30 inline void Ptr::Add (const String& fileName, const Memory::BLOB& data)
31 {
32#if qCompilerAndStdLib_span_requires_explicit_type_for_BLOBCVT_Buggy
33 return _GetRep ().Add (fileName, span<const byte>{data});
34#else
35 return _GetRep ().Add (fileName, span{data});
36#endif
37 }
38
39}
#define EnsureNotNull(p)
Definition Assertions.h:340